{ "info": { "author": "Crossref", "author_email": "labs@crossref.org", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Crossref Commons\n\nHigh-level library for getting data from Crossref APIs (REST, XML, ...). Work in progress.\n\n## Installation\n\n pip3 install crossref-commons\n\n## Usage\n\n### Retrieving entities\n\nEntities of various types can be retrieved by giving their respective IDs:\n\n import crossref_commons.retrieval\n\n crossref_commons.retrieval.get_publication_as_json('10.5621/sciefictstud.40.2.0382')\n crossref_commons.retrieval.get_publication_as_xml('10.5621/sciefictstud.40.2.0382')\n crossref_commons.retrieval.get_publication_as_refstring('10.5621/sciefictstud.40.2.0382', 'ieee')\n\n crossref_commons.retrieval.get_member_as_json('15')\n\nEquivalently, you can use `get_entity` function to retrieve any type of entity:\n\n from crossref_commons.retrieval import get_entity\n from crossref_commons.types import EntityType, OutputType\n\n get_entity('10.5621/sciefictstud.40.2.0382', EntityType.PUBLICATION, OutputType.JSON)\n get_entity('10.5621/sciefictstud.40.2.0382', EntityType.PUBLICATION, OutputType.XML)\n get_entity('10.5621/sciefictstud.40.2.0382', EntityType.PUBLICATION, OutputType.REFSTRING, 'ieee')\n\n get_entity('15', EntityType.MEMBER, OutputType.JSON)\n\n### Retrieving relations\n\nCurrently, only retrieving aliases is supported:\n\n from crossref_commons.relations import get_alias\n\n get_alias('10.1037//0022-3514.62.3.434')\n\n### Iterating\n\nIt is possible to iterate over publications meeting specific criteria (JSON only):\n\n from crossref_commons.iteration import iterate_publications_as_json\n\n filter = {'funder': '10.13039/501100000038', 'type': 'journal-article'}\n queries = {'query.author': 'li', 'query.affiliation': 'university'}\n for p in iterate_publications_as_json(max_results=189, filter=filter, queries=queries):\n print(p['DOI'])\n\n### Sampling\n\nInstead of iterating over the items meeting the criteria, in some cases it is better to use a random sample. `get_sample` will automatically handle sizes larger than Crossref REST API's limit of 100:\n\n from crossref_commons.sampling import get_sample\n\n filter = {'funder': '10.13039/501100000038', 'type': 'journal-article'}\n queries = {'query.author': 'li', 'query.affiliation': 'university'}\n sample = get_sample(size=121, filter=filter, queries=queries)\n\n### Authorization\n\nYou can set the Polite information and/or Plus token by creating a file `~/.crapi_key` with the following content:\n\n {\n \"Crossref-Plus-API-Token\": \"<>\",\n \"User-Agent\": \"<>\",\n \"Mailto\": \"<>\"\n }\n\nAlternatively, the same information can be provided through environment variables `CR_API_PLUS`, `CR_API_AGENT` and `CR_API_MAILTO`.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.com/crossref/crossref_commons_py", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "crossref-commons", "package_url": "https://pypi.org/project/crossref-commons/", "platform": "", "project_url": "https://pypi.org/project/crossref-commons/", "project_urls": { "Homepage": "https://gitlab.com/crossref/crossref_commons_py" }, "release_url": "https://pypi.org/project/crossref-commons/0.0.6/", "requires_dist": [ "ratelimit (>=2.2.1)", "requests (>=2.18.4)" ], "requires_python": "", "summary": "Crossref Commons", "version": "0.0.6" }, "last_serial": 5599341, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "c04d3cceeba92f241274bd1f4b03f8b6", "sha256": "01491fc17505c468ab704d2de65ed94ebe5b089fbff477305fd95d3a06e85225" }, "downloads": -1, "filename": "crossref_commons-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "c04d3cceeba92f241274bd1f4b03f8b6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13312, "upload_time": "2019-05-30T18:15:18", "url": "https://files.pythonhosted.org/packages/00/64/487c54b17156fe33c935d5813f20b5ddc58e0b983e6e032dbcbba7fe7e28/crossref_commons-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e23281aada2be617ea3291587af88e41", "sha256": "81a517d8a0f5cf894fdc30c78f619136a34495d6d2790141cc2b2a33bdb6a317" }, "downloads": -1, "filename": "crossref_commons-0.0.1.tar.gz", "has_sig": false, "md5_digest": "e23281aada2be617ea3291587af88e41", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6761, "upload_time": "2019-05-30T18:15:20", "url": "https://files.pythonhosted.org/packages/58/e4/c62a7220f92df702ff389a317d721083aad398789cbfa14f33227c70c0fc/crossref_commons-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "37368d517d323f9b0504f66f9c8a519e", "sha256": "b7cbb35fb276977df4172cab56d7521ed9d8f92fa41333b65d6b9f9f32be00b2" }, "downloads": -1, "filename": "crossref_commons-0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "37368d517d323f9b0504f66f9c8a519e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13353, "upload_time": "2019-05-30T19:21:14", "url": "https://files.pythonhosted.org/packages/66/31/20f81194d8abe16e617e8f45d61a9b24acf8edac6c7b2142d66f660601fa/crossref_commons-0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "56cd4cadf676499d3a8a6910a447ad57", "sha256": "c0976d7e89b47cc627506c8619b7a820d0cde0336cc07f446bd5839712891630" }, "downloads": -1, "filename": "crossref_commons-0.0.2.tar.gz", "has_sig": false, "md5_digest": "56cd4cadf676499d3a8a6910a447ad57", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6848, "upload_time": "2019-05-30T19:21:15", "url": "https://files.pythonhosted.org/packages/e6/9f/8595c72328ded05ba5a97770a9e087374ca6a66c474041ca55c35ffdaf31/crossref_commons-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "00747c80477074f41817ac9cc996d081", "sha256": "18ac72bd3d93f9190845ecdbce0a91416cb200fd74f233e21416133c69724a14" }, "downloads": -1, "filename": "crossref_commons-0.0.3-py3-none-any.whl", "has_sig": false, "md5_digest": "00747c80477074f41817ac9cc996d081", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14574, "upload_time": "2019-06-01T21:04:37", "url": "https://files.pythonhosted.org/packages/12/ff/de810d50e5288e0e979d8607be0100263b2ac34f9f0ef14bfdc8afe7216a/crossref_commons-0.0.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0b0eb37f397b5b54c0346097a48df685", "sha256": "bdce916615c46f7cd39ba60766aade494d1a61f6e34e84c1f4f85d6c09870bd4" }, "downloads": -1, "filename": "crossref_commons-0.0.3.tar.gz", "has_sig": false, "md5_digest": "0b0eb37f397b5b54c0346097a48df685", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7913, "upload_time": "2019-06-01T21:04:38", "url": "https://files.pythonhosted.org/packages/f1/4e/1406440ea6cee9d4f0ec6a0488309b27bc93c56be5fe675de3baf66ef1ba/crossref_commons-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "3c7cf800c3825b68e4d110e5b0b57342", "sha256": "628613a2783270d787cb91cb4996423b4443c356e31ca24d77b051f00d07894c" }, "downloads": -1, "filename": "crossref_commons-0.0.4-py3-none-any.whl", "has_sig": false, "md5_digest": "3c7cf800c3825b68e4d110e5b0b57342", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14575, "upload_time": "2019-06-01T21:30:46", "url": "https://files.pythonhosted.org/packages/05/c0/ef4f77ceb552f43e37b34fdebf2bea4fd70f6ab761586b24f4d6424469ae/crossref_commons-0.0.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0a99d3431f9f85d0adbd245b26388eec", "sha256": "8483cb4cb5e5e808a8ef7836fbd086b0adb811ee38584044707901d71b32350c" }, "downloads": -1, "filename": "crossref_commons-0.0.4.tar.gz", "has_sig": false, "md5_digest": "0a99d3431f9f85d0adbd245b26388eec", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7917, "upload_time": "2019-06-01T21:30:48", "url": "https://files.pythonhosted.org/packages/44/fd/3b3b20f8f58e55d24eb43fd675d836e02e9ccaf750a3ab4238e074c9f837/crossref_commons-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "94880ac6ab0bf7dbda52f9141353b6a4", "sha256": "03cf2aa74084e2dfff5ede08dafa58a8dc9521e092168464ac07f32821113e52" }, "downloads": -1, "filename": "crossref_commons-0.0.5-py3-none-any.whl", "has_sig": false, "md5_digest": "94880ac6ab0bf7dbda52f9141353b6a4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14636, "upload_time": "2019-06-20T10:25:31", "url": "https://files.pythonhosted.org/packages/10/ca/8fe5eb5f18d9c1a3a5907b351e3c048948be6f76a873bb7151d4cadb0770/crossref_commons-0.0.5-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "339861f0a901343f640f78a55eeb779c", "sha256": "08226edfa53a58d946951ecb697568e9f7bc4911ab557069319373e3246d0552" }, "downloads": -1, "filename": "crossref_commons-0.0.5.tar.gz", "has_sig": false, "md5_digest": "339861f0a901343f640f78a55eeb779c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7991, "upload_time": "2019-06-20T10:25:33", "url": "https://files.pythonhosted.org/packages/d9/65/de3762e69c4b58740a8cf8d8ef62d8f5a5527fb655b209a74d0f62b5fc31/crossref_commons-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "2f5f6884e0cc71d5c9604ba8d383c931", "sha256": "83864db7422c0038629e085cd4274db55015ffa0b383a36456f35e7dbf4a4c94" }, "downloads": -1, "filename": "crossref_commons-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "2f5f6884e0cc71d5c9604ba8d383c931", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14665, "upload_time": "2019-07-29T12:38:04", "url": "https://files.pythonhosted.org/packages/26/36/76651ca1ccd2df5efe56ab516931547dd443733dfaa35c884d4a0752a1c4/crossref_commons-0.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ec2714c50d20348c9fdff9b5c378d684", "sha256": "dc06f6153558e97783e06794e19ae2eca590a306a8b05689fd9104c7d8e4a411" }, "downloads": -1, "filename": "crossref_commons-0.0.6.tar.gz", "has_sig": false, "md5_digest": "ec2714c50d20348c9fdff9b5c378d684", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8005, "upload_time": "2019-07-29T12:38:06", "url": "https://files.pythonhosted.org/packages/c3/a7/d728ebcc0cac2514cc92e5c64ba017bf14e779b016c35457a74d11e01be2/crossref_commons-0.0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2f5f6884e0cc71d5c9604ba8d383c931", "sha256": "83864db7422c0038629e085cd4274db55015ffa0b383a36456f35e7dbf4a4c94" }, "downloads": -1, "filename": "crossref_commons-0.0.6-py3-none-any.whl", "has_sig": false, "md5_digest": "2f5f6884e0cc71d5c9604ba8d383c931", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 14665, "upload_time": "2019-07-29T12:38:04", "url": "https://files.pythonhosted.org/packages/26/36/76651ca1ccd2df5efe56ab516931547dd443733dfaa35c884d4a0752a1c4/crossref_commons-0.0.6-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ec2714c50d20348c9fdff9b5c378d684", "sha256": "dc06f6153558e97783e06794e19ae2eca590a306a8b05689fd9104c7d8e4a411" }, "downloads": -1, "filename": "crossref_commons-0.0.6.tar.gz", "has_sig": false, "md5_digest": "ec2714c50d20348c9fdff9b5c378d684", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8005, "upload_time": "2019-07-29T12:38:06", "url": "https://files.pythonhosted.org/packages/c3/a7/d728ebcc0cac2514cc92e5c64ba017bf14e779b016c35457a74d11e01be2/crossref_commons-0.0.6.tar.gz" } ] }