{ "info": { "author": "Mindey I.", "author_email": "mindey@qq.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: Public Domain", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Utilities" ], "description": "# infinity-data\n\nThis is a simple package that helps read Infinity data format and get data in such format.\n\n## Quick start\n\n### Get data\n\nJust `pip install infdata`, and start getting data.\n\nFor example,\n```\n$ inf pull example.com/posts==crawler-1.0.0\n```\n\npulls records that are posts from `example.com/posts`, `crawler-1.0.0` version.\n\n### Publish data\n```\n$ int init # initiates folder .inf/\n$ inf login # saves token to .inf/config\n$ inf search example.com/posts # searches for dataset versions\n$ inf push file.json # uploads Infinity JSON or JSON-L data to specified infinity server\n```\n\n**Note:** the tokens `['example.com/posts', 'crawler-1.0.0']` together define a unique `[source-specific, crawler-specific]` schema.\n\n# Infinity JSON\n\nInfinity JSON format includes a header line, which specifies schemas (`[S]`) and types (`[T]`) for its records.\n\nExample:\n\n```\n[\n {'': [[S],[T], 'x': [[S],[T]], 'y': [{'': [[S],[T]], 'z': [[S],[T]]}]},\n {'x': '1,330.98', 'y': [{'z': 1}, {'u': 2}]},\n {'x': '2,011.19', 'y': [{'z': 4}, {'u': 3}]},\n]\n```\n\nThe schemas, types specification for the empty string key `''` specifies the schema and type for the records themselves (required in every level separated by curly braces), whereas the rest of keys specify schemas and types for the data accessible via the keys.\n\nThis way, if we want to specify, that the `x` must be casted to a `float`, and means the [elevation](https://www.wikidata.org/wiki/Q2633778), we can do:\n\n```\n[\n {'': [], 'x': {'': [['str'],['https://www.wikidata.org/wiki/Q2633778']]}},\n {'x': '1,330.98', 'y': [{'z': 1}, {'u': 2}]},\n {'x': '2,011.19', 'y': [{'z': 4}, {'u': 3}]},\n]\n```\n\nIf you want to additionally, add conversion rules, you can include lambda expression after the final type:\n\n```\n[\n {'': [], 'x': {'': [['float', \"lambda x: x.replace(',','')\"],['https://www.wikidata.org/wiki/Q2633778']]}},\n {'x': '1,330.98', 'y': [{'z': 1}, {'u': 2}]},\n {'x': '2,011.19', 'y': [{'z': 4}, {'u': 3}]},\n]\n```\n\nThis way, the final data becomes:\n\n```\nfrom inf import normalize\n\nnormalize(\n [\n {'x': [['float', \"lambda x: x.replace(',','')\"],['https://www.wikidata.org/wiki/Q2633778']]},\n {'x': '1,330.98', 'y': [{'z': 1}, {'u': 2}]},\n {'x': '2,011.19', 'y': [{'z': 4}, {'u': 3}]},\n ]\n)\n```\n\nResult is:\n\n```\n[\n {'Q2633778': 1330.98, 'y': [{'z': 1}, {'u': 2}]},\n {'Q2633778': 2011.19, 'y': [{'z': 4}, {'u': 3}]},\n]\n```\n\n# Infinity CSV\n\nSometimes we want to include schema and type (`S`, `T`) into CSV. In that case, we use `|` to separate them:\n\n```\nColumn Name|S|T,\n```\n\nFor example:\n\n```\nName||,Surname||,\n```\n\nIf we want to enforce some rules, we could do then:\n\n```\nName|str|https://www.wikidata.org/wiki/Q82799,Surname|str,lambda x: x[:10]|https://www.wikidata.org/wiki/Q101352,\n```\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/infamily/infinity-data", "keywords": "inf", "license": "UNLICENSE", "maintainer": "", "maintainer_email": "", "name": "infdata", "package_url": "https://pypi.org/project/infdata/", "platform": "", "project_url": "https://pypi.org/project/infdata/", "project_urls": { "Homepage": "https://github.com/infamily/infinity-data" }, "release_url": "https://pypi.org/project/infdata/1.0.12/", "requires_dist": null, "requires_python": "", "summary": "Package management command for data.", "version": "1.0.12" }, "last_serial": 3774768, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "683497117f90fb2c92288627cd57bd07", "sha256": "e9050462c41e3e9ced839b811e5f6d479a98195ac1ed3f100d805ea8eea5b8a4" }, "downloads": -1, "filename": "infdata-1.0.0.tar.gz", "has_sig": false, "md5_digest": "683497117f90fb2c92288627cd57bd07", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5879, "upload_time": "2018-01-30T13:08:37", "url": "https://files.pythonhosted.org/packages/c7/90/64bb009f6d0ca32c9210a58cb30aa919db2b1c0e8c0cf8c9fd756e9a5d65/infdata-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "dafa0d46bf2767fe611c02c6c947d27f", "sha256": "83d122cb21c0853cb685ed60d134a63c4c6f4ac1b246d47ca0a4a5395d8444db" }, "downloads": -1, "filename": "infdata-1.0.1.tar.gz", "has_sig": false, "md5_digest": "dafa0d46bf2767fe611c02c6c947d27f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9445, "upload_time": "2018-02-03T13:06:33", "url": "https://files.pythonhosted.org/packages/52/4f/fb73f43f5862ee5194441aad702acab1bb06d79af09301093fd0abd86983/infdata-1.0.1.tar.gz" } ], "1.0.10": [ { "comment_text": "", "digests": { "md5": "80ce0e0098a09813571254118fe72e81", "sha256": "f5dc685569609f951b7c0d938816afd4ebf13f6310a758721c854a28f8045f7e" }, "downloads": -1, "filename": "infdata-1.0.10.tar.gz", "has_sig": false, "md5_digest": "80ce0e0098a09813571254118fe72e81", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16110, "upload_time": "2018-03-09T20:12:00", "url": "https://files.pythonhosted.org/packages/9b/da/da6e4c73c4afb34085ca1247256c52c5f6ff4384d5dc666c428bf572f68c/infdata-1.0.10.tar.gz" } ], "1.0.11": [ { "comment_text": "", "digests": { "md5": "a7b49105aa5d87fe8c5a9c52d781e358", "sha256": "807c7831b4a122348dbed71da9da7ac48d229759a3ee461a56bcf7e7950ee466" }, "downloads": -1, "filename": "infdata-1.0.11.tar.gz", "has_sig": false, "md5_digest": "a7b49105aa5d87fe8c5a9c52d781e358", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16448, "upload_time": "2018-04-08T22:05:35", "url": "https://files.pythonhosted.org/packages/1e/8f/4ce2844aa8da49c222c4e2059d504efa19466098de0f30ae464dc41ed81c/infdata-1.0.11.tar.gz" } ], "1.0.12": [ { "comment_text": "", "digests": { "md5": "6672d06df5d2957b33e8bead306fe2ba", "sha256": "d9717cf0403110e30cd059cdfe9500104279d7ae56bf09ec9e7ad11e7e851ac8" }, "downloads": -1, "filename": "infdata-1.0.12.tar.gz", "has_sig": false, "md5_digest": "6672d06df5d2957b33e8bead306fe2ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16410, "upload_time": "2018-04-17T20:48:52", "url": "https://files.pythonhosted.org/packages/77/4f/58c0632e33b0950963d97e78170bf91d7589dbddf75a0d37c24c8e5e5825/infdata-1.0.12.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "f2a7199b8646597c588253282cb0bb8a", "sha256": "2aed5879c61fe30765a657b0eb387fd90cc8dcf06b2d723dbce8bdb9aa9eb1b2" }, "downloads": -1, "filename": "infdata-1.0.2.tar.gz", "has_sig": false, "md5_digest": "f2a7199b8646597c588253282cb0bb8a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10053, "upload_time": "2018-02-04T01:08:09", "url": "https://files.pythonhosted.org/packages/b4/a8/de6fb5baad00dfe87ba85b73db0a1a0addd584730317ca2cd6a042743480/infdata-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "9c4e369b1217794d08b40f957255f863", "sha256": "31f7091270d1582cadc57e50174a25266f1f1a8121d8c4f4f60d3a2244883d54" }, "downloads": -1, "filename": "infdata-1.0.3.tar.gz", "has_sig": false, "md5_digest": "9c4e369b1217794d08b40f957255f863", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10215, "upload_time": "2018-02-04T02:22:53", "url": "https://files.pythonhosted.org/packages/5e/44/1e6d683614a8ebd76d47e66d3787af81271477e1b7603ce779202e070c66/infdata-1.0.3.tar.gz" } ], "1.0.4": [ { "comment_text": "", "digests": { "md5": "e23aff76af4f4eb75122bb3e02a9ed9e", "sha256": "293500f636106a19809080e58c651c119e73da6df471b331a4e48daafd0ff1f7" }, "downloads": -1, "filename": "infdata-1.0.4.tar.gz", "has_sig": false, "md5_digest": "e23aff76af4f4eb75122bb3e02a9ed9e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14245, "upload_time": "2018-02-04T14:33:53", "url": "https://files.pythonhosted.org/packages/01/d6/630b4b03cc4a752de386b888249ac6ead334d9866c140c0f166cd9eda22c/infdata-1.0.4.tar.gz" } ], "1.0.5": [ { "comment_text": "", "digests": { "md5": "f14e103c7a52b1f87ba9842533d3da54", "sha256": "d5911279b6a60cdc3579a0adb9fd670b81f504bc28154183229ebad5acf2f519" }, "downloads": -1, "filename": "infdata-1.0.5.tar.gz", "has_sig": false, "md5_digest": "f14e103c7a52b1f87ba9842533d3da54", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16460, "upload_time": "2018-02-17T16:49:32", "url": "https://files.pythonhosted.org/packages/02/18/a9dfeec65c61c83d63a69d4bad75db649267f1affcd9613b3bdb1bcc1b0b/infdata-1.0.5.tar.gz" } ], "1.0.7": [ { "comment_text": "", "digests": { "md5": "9bd8981e3989b24ee45f9cb88419d692", "sha256": "b27f3c1b0e0f8d84acfc8784e4e5f8c4c7a20e182c1b2b01a0d105e36dc23d95" }, "downloads": -1, "filename": "infdata-1.0.7.tar.gz", "has_sig": false, "md5_digest": "9bd8981e3989b24ee45f9cb88419d692", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17365, "upload_time": "2018-02-26T21:29:21", "url": "https://files.pythonhosted.org/packages/a5/21/f6aacf98e49fa4f626010131ad787845e1c1bfed52ae54ec0c729fba9944/infdata-1.0.7.tar.gz" } ], "1.0.8": [ { "comment_text": "", "digests": { "md5": "0120bbb67c6d71fc9e0b0ebde632a2ac", "sha256": "9a2bee849d80d47b86936142d16ecb9ce956c37d3ccefc589850266c307e9b39" }, "downloads": -1, "filename": "infdata-1.0.8.tar.gz", "has_sig": false, "md5_digest": "0120bbb67c6d71fc9e0b0ebde632a2ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17427, "upload_time": "2018-02-27T02:53:06", "url": "https://files.pythonhosted.org/packages/ee/8c/b470333fb8f5de9d680fe704a070dad8850defa7ebf3dacc30545f1e3e89/infdata-1.0.8.tar.gz" } ], "1.0.9": [ { "comment_text": "", "digests": { "md5": "23c930f2f15f46635813b275f7e4a62b", "sha256": "da1c2855e04c49c85a2fdd2dc1721075b4373e756f0b4a4a077f4b4ce6ebe87d" }, "downloads": -1, "filename": "infdata-1.0.9.tar.gz", "has_sig": false, "md5_digest": "23c930f2f15f46635813b275f7e4a62b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15874, "upload_time": "2018-03-09T14:20:18", "url": "https://files.pythonhosted.org/packages/d1/0b/e3d35d870e378f1c2ae103b14bfac040b315e128def18c63e18113e90e83/infdata-1.0.9.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6672d06df5d2957b33e8bead306fe2ba", "sha256": "d9717cf0403110e30cd059cdfe9500104279d7ae56bf09ec9e7ad11e7e851ac8" }, "downloads": -1, "filename": "infdata-1.0.12.tar.gz", "has_sig": false, "md5_digest": "6672d06df5d2957b33e8bead306fe2ba", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16410, "upload_time": "2018-04-17T20:48:52", "url": "https://files.pythonhosted.org/packages/77/4f/58c0632e33b0950963d97e78170bf91d7589dbddf75a0d37c24c8e5e5825/infdata-1.0.12.tar.gz" } ] }