{ "info": { "author": "Jeremy Bowers", "author_email": "jeremy.bowers@nytimes.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "NYT Entity Uploader\n===================\n\nA wrapper for making requests to the `NYT Entity Service\nAPI `__.\n\nUsage\n-----\n\nFirst: You should be running an instance of the `NYT Entity Service\nAPI `__.\n\nSecond: You should export ``ENTITYSVC_BASE_URL`` before running the\nuploader to point to your own running entity service API endpoint.\n\nExample 1: As a python module\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYou can run the uploader as a python module and pass the name as a\nkeyword argument.\n\n::\n\n $ export ENTITYSVC_BASE_URL='http://localhost.newsdev.net:8000'\n $ python\n Python 3.6.1 (default, Apr 4 2017, 09:40:21)\n [GCC 4.2.1 Compatible Apple LLVM 8.1.0 (clang-802.0.38)] on darwin\n Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n >>> from entity_uploader import UploadEntity\n >>> e = UploadEntity(name=\"Bank of America\")\n >>> e.to_dict()\n {'name': 'Bank of America', 'uuid': 'f514b0e1-eea5-4676-aed2-2f9ee501cd5e', 'score': 0, 'created': True}\n\nExample 2: Running example.py\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n``example.py`` is a sample implementation that reads a list of entity\nnames from ``example_entities.txt``.\n\n::\n\n $ export ENTITYSVC_BASE_URL='http://localhost.newsdev.net:8000'\n $ python example.py\n\n {'name': 'Bank of America', 'uuid': 'f514b0e1-eea5-4676-aed2-2f9ee501cd5e', 'score': 0, 'created': True}\n {'name': 'Bank of America', 'uuid': 'f514b0e1-eea5-4676-aed2-2f9ee501cd5e', 'score': 95, 'created': False}\n {'name': 'Bank of America', 'uuid': 'f514b0e1-eea5-4676-aed2-2f9ee501cd5e', 'score': 100, 'created': False}\n {'name': \"banque d'amerique\", 'uuid': 'cb626971-1989-4d78-870d-e6835017c936', 'score': 62, 'created': True}\n {'name': 'Bank of America', 'uuid': 'f514b0e1-eea5-4676-aed2-2f9ee501cd5e', 'score': 95, 'created': False}\n {'name': 'Bank of America', 'uuid': 'f514b0e1-eea5-4676-aed2-2f9ee501cd5e', 'score': 90, 'created': False}\n {'name': 'Bank of America', 'uuid': 'f514b0e1-eea5-4676-aed2-2f9ee501cd5e', 'score': 86, 'created': False}\n {'name': 'Bank of America', 'uuid': 'f514b0e1-eea5-4676-aed2-2f9ee501cd5e', 'score': 86, 'created': False}\n {'name': 'Bank of America', 'uuid': 'f514b0e1-eea5-4676-aed2-2f9ee501cd5e', 'score': 86, 'created': False}\n\nIn this example, the default ``create_if_below`` score is 80. The first\nentity, ``Bank of America`` is created. The next entity,\n``Bank of America, N.A.`` is not created because it has a similarity\nscore of 95. The UUID of the matching entity, ``Bank of America``, is\nreturned. The same is true for the next entity, ``BANK OF AMERICA``,\nwhich has an even higher score of 100. The next entity,\n``banque d'amerique``, is created as a new entity because it has a\nmatching score of 62, which is lower than the default\n``create_if_below`` score of 80. The last few entities in\n``example_entities.txt`` match the first entity with varying degrees of\ncloseness.\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/newsdev/nyt-pyiap", "keywords": "entity entity-service nyt", "license": "Apache License 2.0", "maintainer": "", "maintainer_email": "", "name": "nyt-entity-uploader", "package_url": "https://pypi.org/project/nyt-entity-uploader/", "platform": "", "project_url": "https://pypi.org/project/nyt-entity-uploader/", "project_urls": { "Homepage": "https://github.com/newsdev/nyt-pyiap" }, "release_url": "https://pypi.org/project/nyt-entity-uploader/0.0.1/", "requires_dist": null, "requires_python": "", "summary": "Wrapper for making POST requests to an NYT entity service API.", "version": "0.0.1" }, "last_serial": 3684203, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "755bd425df5933ce437b780fbf9fc35a", "sha256": "517a2707868843798d2f87cc2d85f48aa3b04f4166b1a602fa79e9c5d7e40c35" }, "downloads": -1, "filename": "nyt-entity-uploader-0.0.1.tar.gz", "has_sig": false, "md5_digest": "755bd425df5933ce437b780fbf9fc35a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3056, "upload_time": "2017-06-09T20:02:40", "url": "https://files.pythonhosted.org/packages/ad/e6/d98374fc589c6063b489c4435d55dd31c39e8c0d935017976174faf4d33b/nyt-entity-uploader-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "755bd425df5933ce437b780fbf9fc35a", "sha256": "517a2707868843798d2f87cc2d85f48aa3b04f4166b1a602fa79e9c5d7e40c35" }, "downloads": -1, "filename": "nyt-entity-uploader-0.0.1.tar.gz", "has_sig": false, "md5_digest": "755bd425df5933ce437b780fbf9fc35a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3056, "upload_time": "2017-06-09T20:02:40", "url": "https://files.pythonhosted.org/packages/ad/e6/d98374fc589c6063b489c4435d55dd31c39e8c0d935017976174faf4d33b/nyt-entity-uploader-0.0.1.tar.gz" } ] }