{ "info": { "author": "Mateusz Susik", "author_email": "mateuszsusik@protonmail.ch", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Internet", "Topic :: Utilities" ], "description": "python-orcid\n============\n\n.. image:: https://badges.gitter.im/ORCID/python-orcid.svg\n :alt: Join the chat at https://gitter.im/ORCID/python-orcid\n :target: https://gitter.im/ORCID/python-orcid?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge\n\n.. image:: https://img.shields.io/travis/ORCID/python-orcid.svg?style=flat-square\n :target: https://travis-ci.org/ORCID/python-orcid\n.. image:: https://img.shields.io/coveralls/ORCID/python-orcid.svg?style=flat-square\n :target: https://coveralls.io/r/ORCID/python-orcid?branch=master\n.. image:: https://img.shields.io/pypi/l/orcid.svg?style=flat-square\n :target: https://pypi.python.org/pypi/orcid/\n.. image:: https://img.shields.io/badge/status-beta-red.svg?style=flat-square\n :target: https://pypi.python.org/pypi/orcid/\n\nAuthors\n-------\n\nMateusz Susik \n\nInstallation\n------------\n\n.. code-block:: bash\n\n pip install orcid\n\n\nNotes\n-----\n\nThis README might be slightly outdated. You can help by submitting a pull request.\n\nException handling\n--------------\n\nThe methods of this library might throw client or server errors. An error is \nan exception coming from the proven\n`requests `_ library. The usual\nway to work with them should be:\n\n.. code-block:: python\n \n from requests import RequestException\n import orcid\n api = orcid.MemberAPI(key, secret, sandbox=True)\n try:\n api.add_record(author-orcid, token, 'work',\n {'title': 'Title', 'type': 'artistic-performance'})\n except RequestException as e:\n # Here the error should be handled. As the exception message might be\n # too generic, additional info can be obtained by:\n print(e.response.text)\n # The response is a requests Response instance.\n\n\nIntroduction\n------------\n\n`ORCID `_ is an open, non-profit, community-based effort to\nprovide a registry of unique researcher identifiers and a transparent method\nof linking research activities and outputs to these identifiers. ORCID is\nunique in its ability to reach across disciplines, research sectors, and\nnational boundaries and its cooperation with other identifier systems.\n\nORCID offers an API (Application Programming Interface) that allows your\nsystems and applications to connect to the ORCID registry, including reading\nfrom and writing to ORCID records.\n\nThere are two types of API available for developers.\n\n\nPublicAPI\n=========\n\nThe public API allows the developers to use the search engine and read author\nrecords. In order to use it, you need to pass institution's key and secret.\n\nThe functionality of this API is also available in the member API.\n\nToken\n-----\n\nIn order to read or update records, the ``token`` is needed. The tokens come\nfrom OAuth 3-legged authorization. You can perform the authorization using\nthis library (examples below).\n\nHowever, if the user is already connected to ORCiD and authenticated (so you\nhave an authorization code), this process can be simplified:\n\n.. code-block:: python\n\n import orcid\n api = orcid.PublicAPI(institution_key, institution_secret, sandbox=True)\n token = api.get_token_from_authorization_code(authorization_code,\n redirect_uri)\n\nA special case are the tokens for performing search queries. Such queries\ndo not need user authentication, only institution credentials are needed.\n\n.. code-block:: python\n\n import orcid\n api = orcid.PublicAPI(institution_key, institution_secret, sandbox=True)\n search_token = api.get_search_token_from_orcid()\n\nBy reusing the same token, the search functions will run faster skipping\nthe authentication process.\n\n\nSearching\n---------\n\n.. code-block:: python\n\n import orcid\n api = orcid.PublicAPI(institution_key, institution_secret, sandbox=True)\n search_results = api.search('text:English', access_token=Token)\n\n\nWhile creating a search query, it is possible to use a generator in\norder to reduce time needed to fetch a record.\n\n.. code-block:: python\n\n search_results = api.search_generator('text:English',\n pagination=20)\n first_result = next(search_results)\n\n\nReading records\n---------------\n\n.. code-block:: python\n\n import orcid\n api = orcid.PublicAPI(institution_key, institution_secret, sandbox=True)\n search_results = api.search_public('text:English')\n # Get the summary\n token = api.get_token(user_id, user_password, redirect_uri)\n summary = api.read_record_public('0000-0001-1111-1111', 'activities',\n token)\n summary = api.read_record_public('0000-0001-1111-1111', 'record',\n token)\n\n\nEvery record in the `summary` dictionary should contain *put-codes*. Using\nthem, it is possible to query the specific record for details. Type of the\nrecord and the put-code need to be provided.\n\n.. code-block:: python\n\n # Get the specific record\n work = api.read_record_public('0000-0001-1111-1111', 'work', token,\n '1111')\n\nAn exception is made for ``works`` `request_type`. It is possible to\nfetch multiple selected works at once by selecting multiple\n``put_codes`` in a list.\n\n.. code-block:: python\n\n work = api.read_record_public('0000-0001-1111-1111', 'works', token,\n ['1111', '2222', '3333'])\n\nAdditional utilities\n--------------------\n\nPython-orcid offers a function for creating a login/register URL.\n\n.. code-block:: python\n\n url = api.get_login_url('/authenticate', redirect_uri, email=email)\n\n\nMemberAPI\n=========\n\nThe member API allows the developers to add/change/remove records.\nTo modify the records one needs a token which can be obtained following\nthe OAuth 3-legged authorization process.\n\nThe member API lets the developer obtain more information when using the\nsearch API or fetching the records.\n\nTo create an instance of the member API handler, the institution key and the\ninstitution secret have to be provided.\n\n.. code-block:: python\n\n import orcid\n api = orcid.MemberAPI(institution_key, institution_secret,\n sandbox=True)\n search_results = api.search('text:English')\n # Get the summary\n token = api.get_token(user_id, user_password, redirect_uri,\n '/read-limited')\n summary = api.read_record_member('0000-0001-1111-1111', 'activities',\n token)\n\nAll the methods from the public API are available in the member API.\n\nGetting ORCID\n-------------\n\nIf the ORCID of an author is not known, one can obtain it by authorizing the\nuser:\n\n.. code-block:: python\n\n orcid = api.get_user_orcid(user_id, password, redirect_uri)\n\n\nAdding/updating/removing records\n--------------------------------\n\nUsing the member API, one can add/update/remove records from the ORCID profile.\n\nAll the types of records are supported.\n\n.. code-block:: python\n\n put_code = api.add_record(author-orcid, token, 'work', json)\n # Change the type to 'other'\n api.update_record(author-orcid, token, 'work', put-code,\n {'type': 'OTHER'})\n api.remove_record(author-orcid, token, 'work', put-code)\n\n\nThe ``token`` is the string received from OAuth 3-legged authorization.\n\nThe last argument is the record itself. The record should\nfollow ORCID's JSON records definitions. Here is an\nexample of a dictionary that can be passed as an argument:\n\n.. code-block:: python\n\n {\n \"title\": {\n \"title\": {\n \"value\": \"Work # 1\"\n },\n \"subtitle\": null,\n \"translated-title\": null\n },\n \"journal-title\": {\n \"value\": \"journal # 1\"\n },\n \"short-description\": null,\n \"type\": \"JOURNAL_ARTICLE\",\n \"external-ids\": {\n \"external-id\": [{\n \"external-id-type\": \"doi\",\n \"external-id-value\": \"ext-id-1\",\n \"external-id-url\": {\n \"value\": \"http://dx.doi.org/ext-id-1\"\n },\n \"external-id-relationship\": \"SELF\"\n }]\n }\n }\n\nIf you do not know how to structure your JSON, visit\n`ORCID swagger `_\n\nIt is possible to update many works in the same time!\nUs ``works`` request type and pass a JSON like this one:\n\n.. code-block:: python\n\n \"bulk\": [\n {\n \"work\": {\n \"title\": {\n \"title\": {\n \"value\": \"Work # 1\"\n },\n },\n \"journal-title\": {\n \"value\": \"journal # 1\"\n },\n \"type\": \"JOURNAL_ARTICLE\",\n \"external-ids\": {\n \"external-id\": [{\n \"external-id-type\": \"doi\",\n \"external-id-value\": \"ext-id-1\",\n \"external-id-url\": {\n \"value\": \"http://dx.doi.org/ext-id-1\"\n },\n \"external-id-relationship\": \"SELF\"\n }]\n }\n }\n },\n {\n \"work\": {\n \"title\": {\n \"title\": {\n \"value\": \"Work # 2\"\n },\n },\n \"journal-title\": {\n \"value\": \"journal # 2\"\n },\n \"type\": \"JOURNAL_ARTICLE\",\n \"external-ids\": {\n \"external-id\": [{\n \"external-id-type\": \"doi\",\n \"external-id-value\": \"ext-id-2\",\n \"external-id-url\": {\n \"value\": \"http://dx.doi.org/ext-id-2\"\n },\n \"external-id-relationship\": \"SELF\"\n }]\n }\n }\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/ORCID/python-orcid", "keywords": "orcid,api,wrapper", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "orcid", "package_url": "https://pypi.org/project/orcid/", "platform": "", "project_url": "https://pypi.org/project/orcid/", "project_urls": { "Homepage": "https://github.com/ORCID/python-orcid" }, "release_url": "https://pypi.org/project/orcid/1.0.3/", "requires_dist": null, "requires_python": "", "summary": "A python wrapper over the ORCID API", "version": "1.0.3" }, "last_serial": 4072683, "releases": { "0.0": [ { "comment_text": "", "digests": { "md5": "2b85e52f33593de3ccaf40716809e0da", "sha256": "16ce5640a40a4a8ad854e76b1e8069689cad3da2fbc620a28750e1b644ba76d8" }, "downloads": -1, "filename": "orcid-0.0.tar.gz", "has_sig": false, "md5_digest": "2b85e52f33593de3ccaf40716809e0da", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10049, "upload_time": "2015-04-17T08:23:37", "url": "https://files.pythonhosted.org/packages/e1/8f/95779c1f6218c94434874e923f7f120dfb4a3405d8ae0fb56653093dca1c/orcid-0.0.tar.gz" } ], "0.1": [ { "comment_text": "", "digests": { "md5": "97d3a48986af84aefafe2e964d66a33e", "sha256": "e9e49d3481b7d6cde302ab169354ac4029c7bbc057a7091030f4940ffc8ae1ba" }, "downloads": -1, "filename": "orcid-0.1.tar.gz", "has_sig": false, "md5_digest": "97d3a48986af84aefafe2e964d66a33e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10539, "upload_time": "2015-04-17T15:07:42", "url": "https://files.pythonhosted.org/packages/64/00/56c9bf4956fb7ed9c40156f15c5182a48b4c1fcf104996cc0f4d843d6172/orcid-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "0875d0f14a8cf806d52f716e89b5ca24", "sha256": "cdc66217906eceba4174c95bfe5bda119f5bcd0efbbab3be92539faf8e979db8" }, "downloads": -1, "filename": "orcid-0.2.tar.gz", "has_sig": false, "md5_digest": "0875d0f14a8cf806d52f716e89b5ca24", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11441, "upload_time": "2015-04-21T14:16:34", "url": "https://files.pythonhosted.org/packages/f4/a6/1935f8e5fd7e39d1e2ac9b39953e81875efd35b6032da2543771f120144e/orcid-0.2.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "1b6e8c8603979b83ff6ea8d97f4c5e9c", "sha256": "10e639e10473b23a2ad4ceb4d2d055ab35b0da31f6e404231b1eeb40cd27ec6e" }, "downloads": -1, "filename": "orcid-0.3.1.tar.gz", "has_sig": false, "md5_digest": "1b6e8c8603979b83ff6ea8d97f4c5e9c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11469, "upload_time": "2015-04-22T07:37:57", "url": "https://files.pythonhosted.org/packages/86/27/94eaaac293db9678bf04be909ea3943735197df23b393c9d47c355735d55/orcid-0.3.1.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "8474f0dfc05cc1c5077f10c33d443c31", "sha256": "d2b0187e2707dce368dc314bc675a6d0a8900162b45bcee3e84c1761b3b968e7" }, "downloads": -1, "filename": "orcid-0.4.0.tar.gz", "has_sig": false, "md5_digest": "8474f0dfc05cc1c5077f10c33d443c31", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11532, "upload_time": "2015-05-04T11:07:54", "url": "https://files.pythonhosted.org/packages/45/e4/427607faa14cb51ab46b3deb540d6330a075753191171872e423ae8a39df/orcid-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "5470d3d8b15c0d079223f5b2ed9d37e5", "sha256": "8b326fecf40608da7ee929e851550da32836a9ff355f50c41e318c9595b63e2a" }, "downloads": -1, "filename": "orcid-0.4.1.tar.gz", "has_sig": false, "md5_digest": "5470d3d8b15c0d079223f5b2ed9d37e5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11892, "upload_time": "2015-05-18T09:21:50", "url": "https://files.pythonhosted.org/packages/3d/24/f4fa38ee236e1faef9b660c53d48508e814ada715741c0e95c88a6e3d637/orcid-0.4.1.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "6139a060fd13b0a92e479916ab5173e7", "sha256": "1fd0f0599a5a15aa7fe4d4aea38e91612e25e9518a940711769696da45895b80" }, "downloads": -1, "filename": "orcid-0.5.0.tar.gz", "has_sig": false, "md5_digest": "6139a060fd13b0a92e479916ab5173e7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11726, "upload_time": "2015-06-18T15:15:46", "url": "https://files.pythonhosted.org/packages/3b/98/246338562050bd156dcfd0815406788e3cd434d5dc6b46cf8e17e9710933/orcid-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "3312dc3b9200333ee4fe3955035c9528", "sha256": "39694967a57a6f00e0bc56b2c630aa21434a865992dda00b2c44a5934e2e94a4" }, "downloads": -1, "filename": "orcid-0.5.1.tar.gz", "has_sig": false, "md5_digest": "3312dc3b9200333ee4fe3955035c9528", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9485, "upload_time": "2015-06-19T09:06:59", "url": "https://files.pythonhosted.org/packages/79/bc/79cb1a762049a7176a9e80543abbfb8c06bff0b0479c4f10ea0a238addbb/orcid-0.5.1.tar.gz" } ], "0.6.0": [ { "comment_text": "", "digests": { "md5": "01bd4c4d8b0013ceb2d7ba35da203765", "sha256": "e598d571a10a97a1982d5919546fb130abaf814ca9ab52f1f72e28eaa2fddc9d" }, "downloads": -1, "filename": "orcid-0.6.0.tar.gz", "has_sig": false, "md5_digest": "01bd4c4d8b0013ceb2d7ba35da203765", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10995, "upload_time": "2016-03-14T12:37:24", "url": "https://files.pythonhosted.org/packages/9d/4a/ca3ea0a1e13954270eaca623c78da6f317cace1fa7d352cafd6a6e8b39f4/orcid-0.6.0.tar.gz" } ], "0.7.0": [ { "comment_text": "", "digests": { "md5": "9c88e7f57a8663a1fe0bfbbce9719c15", "sha256": "299ba93143b2e212fb44cf035b8c43bb4893075edcd3f5fb3c66ebf23d566c05" }, "downloads": -1, "filename": "orcid-0.7.0.tar.gz", "has_sig": false, "md5_digest": "9c88e7f57a8663a1fe0bfbbce9719c15", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11112, "upload_time": "2016-06-27T11:53:50", "url": "https://files.pythonhosted.org/packages/84/6b/5fefd1155c4a214a29f8cf176bada42ce611d2d4e8ccc1c7c2a48122d4a4/orcid-0.7.0.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "8dcf248f40ad619a1c160d99c71223ed", "sha256": "fe1fcded1016a93567f6ad0f34a10dcbe35e16f760781c8802148be3194ea227" }, "downloads": -1, "filename": "orcid-1.0.0.tar.gz", "has_sig": false, "md5_digest": "8dcf248f40ad619a1c160d99c71223ed", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10743, "upload_time": "2018-03-25T21:17:31", "url": "https://files.pythonhosted.org/packages/ab/6a/7ed22266d4679870cd4b4ba714b48705ac591ffc4098430c9809d2be7985/orcid-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "596f7606f411c70e4abbfce90dd8b785", "sha256": "30ccb966ff78384a04075d606c79eec0e119453edd5a64ddd4cd73100a629745" }, "downloads": -1, "filename": "orcid-1.0.1.tar.gz", "has_sig": false, "md5_digest": "596f7606f411c70e4abbfce90dd8b785", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10588, "upload_time": "2018-03-27T20:41:47", "url": "https://files.pythonhosted.org/packages/c7/28/4a07156df4b8180cff56f5b65b37ba86e2c920989e97e806c657acb84354/orcid-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "0017e8b3231333f0b0c183dfbc09b892", "sha256": "fb5d2f0fd7f1c34df0e6b266555fce9906c1a2b2f31be8e874856377ff481c5f" }, "downloads": -1, "filename": "orcid-1.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "0017e8b3231333f0b0c183dfbc09b892", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9432, "upload_time": "2018-05-02T09:34:16", "url": "https://files.pythonhosted.org/packages/1e/d4/bfe83cf9b9d6cbd2fea5a094517304daf2fb042b93e1c285d4e6e9600958/orcid-1.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "74a41ea8a0965c524544446917032aaa", "sha256": "64d88d7574ffeb5a909407f2266d14c8dae666bbe60934eb63f8c84ac25af8fd" }, "downloads": -1, "filename": "orcid-1.0.2.tar.gz", "has_sig": false, "md5_digest": "74a41ea8a0965c524544446917032aaa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10700, "upload_time": "2018-05-02T09:34:19", "url": "https://files.pythonhosted.org/packages/51/bd/664b5ee5d923db0cf3274f3bec78eec283882cf0b7d5315276c221e0a7be/orcid-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "004f2ea940166a5e1dca84ee9f78968a", "sha256": "5fe28b6d92aed5abe7145c959e4fa2afb90260be215ff3f36ad31c94ee41d0db" }, "downloads": -1, "filename": "orcid-1.0.3.tar.gz", "has_sig": false, "md5_digest": "004f2ea940166a5e1dca84ee9f78968a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10768, "upload_time": "2018-07-17T08:02:25", "url": "https://files.pythonhosted.org/packages/fe/d7/a065d914f1312abc02c3dcaecd75bcbb8d03062db33991cfcc9f37b93da6/orcid-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "004f2ea940166a5e1dca84ee9f78968a", "sha256": "5fe28b6d92aed5abe7145c959e4fa2afb90260be215ff3f36ad31c94ee41d0db" }, "downloads": -1, "filename": "orcid-1.0.3.tar.gz", "has_sig": false, "md5_digest": "004f2ea940166a5e1dca84ee9f78968a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 10768, "upload_time": "2018-07-17T08:02:25", "url": "https://files.pythonhosted.org/packages/fe/d7/a065d914f1312abc02c3dcaecd75bcbb8d03062db33991cfcc9f37b93da6/orcid-1.0.3.tar.gz" } ] }