{ "info": { "author": "AzukiOtter", "author_email": "ogran.std@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Scientific/Engineering :: Bio-Informatics" ], "description": "# spsearch\nPython tools to get species data from various API, including IUCN Red List and Encyclopedia of Life.\n\n\n## What is spsearch?\nThis is a collection of CLI tools which enable you to use various API with ease.\n\n\n## Why spsearch?\n- **Using asyncio.** \nUnfortunately, some of the APIs are far from fastest (e.g. IUCN Red List API), so asynchronous retrieval will help you getting various info at once.\n\n\n- **For easier search.** \nSome of the APIs accept the only one certain scientific name of the species to search.\nFor example, when you search Asian small-clawed otter with `Aonyx cinerea` via 'Individual species by name' method,\nRed List API returns no result, as it is only referable in `Aonyx cinereus`.\n`spsearch.RedListApiHandler.species_from_name()` both accepts `Aonyx cinerea` and `Aonyx cinereus`.\n\n\n## How to use\n### translator.ja2sci (translate Japanese name into scientific name)\n```python\nfrom spsearch.translator import ja2sci\nprint(ja2sci.convert('\u30e6\u30fc\u30e9\u30b7\u30a2\u30ab\u30ef\u30a6\u30bd')) # Lutra lutra\n```\n\n### Red List API\nYou have to generate your own token [here](http://apiv3.iucnredlist.org/api/v3/token).\n```python\nfrom pprint import pprint\nimport asyncio\nfrom spsearch.redlist import RedListApiHandler\nhandler = RedListApiHandler(token=YOUR_REDLIST_API_TOKEN)\n\nasync def main():\n # Get the info of Eurasian otter (Lutra lutra)\n otter = await handler.species_from_name('Lutra lutra')\n print(otter) # [NT]Lutra lutra\n\n # Print some information about this species\n print(otter.category) # NT\n print(otter.order) # MUSTELIDAE\n print(otter.assessment_date) # 2014-06-20\n\n # Get the list of the threats\n threats = await otter.get_threats()\n\n # Threats are returned in a container class with some convenient method\n print(threats)\n # -> CodeHierarchySeq([\n # ,\n # ,\n # ,\n # ,\n # ,\n # ,\n # ...\n # ])\n\n print(threats[2][4])\n # -> CodeHierarchySeq([\n # ,\n # \n # ])\n\n print(threats.codes()) # [1, 2, 4, 5, 6, 7, 9]\n\n # Use .slice() to slice the container\n print(threats.slice(0)) # 1.1: Housing & urban areas\n\n # Print some data for each threats\n print(threats.code) # 1.1\n print(threats.title) # Housing & urban areas\n\n # The same methods are available for the habitats, conservation measures\n pprint(await otter.get_habitats())\n pprint(await otter.get_conservation_measures())\n\n # Print the list of the countries in which they live\n pprint(await otter.get_country_occurrence())\n\nasyncio.run(main())\n```\n\n### EOL API\nIf you want to use the cypher API, you need a token.\nFollow the guide [here](https://github.com/EOL/eol_website/blob/master/doc/api.md) to get yours.\nClassical API doesn't need it.\n```\nNot yet prepared\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/AzukiOtter/spsearch", "keywords": "bioinformatics biology biodiversity species", "license": "GPL-3.0", "maintainer": "", "maintainer_email": "", "name": "spsearch", "package_url": "https://pypi.org/project/spsearch/", "platform": "", "project_url": "https://pypi.org/project/spsearch/", "project_urls": { "Homepage": "https://github.com/AzukiOtter/spsearch" }, "release_url": "https://pypi.org/project/spsearch/0.1.0/", "requires_dist": null, "requires_python": ">=3.6, <4", "summary": "Python tools to get species data from various API.", "version": "0.1.0" }, "last_serial": 4935130, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "a2359c52ccc83e4e22c1d6d12fbf9474", "sha256": "05d1d360db2ba9a904de42b6bbeaa4721b24bdfdb93eaf696b73b104ec8665b3" }, "downloads": -1, "filename": "spsearch-0.1.0.tar.gz", "has_sig": false, "md5_digest": "a2359c52ccc83e4e22c1d6d12fbf9474", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6, <4", "size": 3215, "upload_time": "2019-03-13T15:29:27", "url": "https://files.pythonhosted.org/packages/df/d0/f6b5199d2ed1b9b982f410a346a82e8b86c4c312811f3eacf8e7d73afd4a/spsearch-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a2359c52ccc83e4e22c1d6d12fbf9474", "sha256": "05d1d360db2ba9a904de42b6bbeaa4721b24bdfdb93eaf696b73b104ec8665b3" }, "downloads": -1, "filename": "spsearch-0.1.0.tar.gz", "has_sig": false, "md5_digest": "a2359c52ccc83e4e22c1d6d12fbf9474", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6, <4", "size": 3215, "upload_time": "2019-03-13T15:29:27", "url": "https://files.pythonhosted.org/packages/df/d0/f6b5199d2ed1b9b982f410a346a82e8b86c4c312811f3eacf8e7d73afd4a/spsearch-0.1.0.tar.gz" } ] }