{"id":13586146,"url":"https://github.com/sckott/habanero","last_synced_at":"2025-05-15T08:05:23.168Z","repository":{"id":42959833,"uuid":"43704742","full_name":"sckott/habanero","owner":"sckott","description":"client for Crossref search API","archived":false,"fork":false,"pushed_at":"2025-03-19T16:37:03.000Z","size":35137,"stargazers_count":226,"open_issues_count":1,"forks_count":31,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-05-15T08:05:01.538Z","etag":null,"topics":["api","crossref-api","doi","metadata"],"latest_commit_sha":null,"homepage":"https://habanero.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sckott.png","metadata":{"files":{"readme":"README.rst","changelog":"Changelog.rst","contributing":"docs/contributing.rst","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2015-10-05T18:23:28.000Z","updated_at":"2025-05-13T00:56:47.000Z","dependencies_parsed_at":"2023-09-27T19:35:03.653Z","dependency_job_id":"c9b08eef-b48b-44dd-95e7-3696fe7c7def","html_url":"https://github.com/sckott/habanero","commit_stats":{"total_commits":451,"total_committers":12,"mean_commits":"37.583333333333336","dds":0.1352549889135255,"last_synced_commit":"f4f6eec13271df65c70d947c06039314989a4c3b"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sckott%2Fhabanero","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sckott%2Fhabanero/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sckott%2Fhabanero/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sckott%2Fhabanero/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sckott","download_url":"https://codeload.github.com/sckott/habanero/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254301431,"owners_count":22047904,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","crossref-api","doi","metadata"],"created_at":"2024-08-01T15:05:21.247Z","updated_at":"2025-05-15T08:05:23.094Z","avatar_url":"https://github.com/sckott.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"habanero\n========\n\n|pypi| |docs| |ghactions| |coverage| |ruff| |uv|\n\nThis is a low level client for working with Crossref's search API. It's been named to be more generic, as other organizations are/will adopt Crossref's search API, making it possible to interact with all from one client.\n\n`Crossref API docs \u003chttps://api.crossref.org/swagger-ui/index.html\u003e`__\n\nOther Crossref API clients:\n\n- Ruby: `serrano`, `\u003chttps://github.com/sckott/serrano\u003e`__\n\nCrossref's API issue tracker: https://crossref.atlassian.net/jira/software/c/projects/CR/issues/\n\n`habanero` includes three modules you can import as needed (or\nimport all):\n\n`Crossref` - Crossref search API. The `Crossref` module includes methods matching Crossref API routes, and a few convenience methods for getting DOI agency and random DOIs:\n\n- `works` - `/works` route\n- `members` - `/members` route\n- `prefixes` - `/prefixes` route\n- `funders` - `/funders` route\n- `journals` - `/journals` route\n- `types` - `/types` route\n- `licenses` - `/licenses` route\n- `registration_agency` - get DOI minting agency\n- `random_dois` - get random set of DOIs\n\n`counts` - citation counts. Includes the single `citation_count` method\n\n`cn` - content negotiation. Includes the methods:\n\n- `content_negotiation` - get citations in a variety of formats\n- `csl_styles` - get CSL styles, used in `content_negotation` method\n\n`WorksContainer` - A class for handling Crossref works. Pass output of works from methods on the `Crossref` class to more easily extract specific fields of works. \n\nNote about searching:\n\nYou are using the Crossref search API described at https://api.crossref.org/swagger-ui/index.html. When you search with query terms, on Crossref servers they are not searching full text, or even abstracts of articles, but only what is available in the data that is returned to you. That is, they search article titles, authors, etc. For some discussion on this, see https://gitlab.com/crossref/issues/-/issues/101\n\nRate limits\n-----------\n\nSee the headers `X-Rate-Limit-Limit` and `X-Rate-Limit-Interval` for current rate limits.\n\nThe Polite Pool\n---------------\n\nTo get in the polite pool it's a good idea now to include a `mailto` email\naddress. See docs for more information.\n\n\nInstallation\n============\n\nStable version\n\n.. code-block:: console\n\n  pip (or pip3) install habanero\n\n\nIf you would like to fix bibtex format citations using content negotiation you'll have to install the optional dependency bibtexparser \u003e= 2.0.0b7 (done for you with optional `[bibtex]`)\n\n.. code-block:: console\n\n  pip (or pip3) install habanero[bibtex]\n\n\nDev version\n\n.. code-block:: console\n\n    pip install git+https://github.com/sckott/habanero.git#egg=habanero\n\n\nOr build it yourself locally\n\n.. code-block:: console\n\n    git clone https://github.com/sckott/habanero.git\n    cd habanero\n    make install\n\nUsage\n=====\n\nInitialize a client\n\n.. code-block:: python\n\n    from habanero import Crossref\n    cr = Crossref()\n\nWorks route\n\n.. code-block:: python\n  \n  # query\n  x = cr.works(query = \"ecology\")\n  x['message']\n  x['message']['total-results']\n  x['message']['items']\n\n  # fetch data by DOI\n  cr.works(ids = '10.1371/journal.pone.0033693')\n\nMembers route\n\n.. code-block:: python\n  \n  # ids here is the Crossref Member ID; 98 = Hindawi\n  cr.members(ids = 98, works = True)\n\nCitation counts\n\n.. code-block:: python\n\n  from habanero import counts\n  counts.citation_count(doi = \"10.1016/j.fbr.2012.01.001\")\n\nContent negotiation - get citations in many formats\n\n.. code-block:: python\n\n  from habanero import cn\n  cn.content_negotiation(ids = '10.1126/science.169.3946.635')\n  cn.content_negotiation(ids = '10.1126/science.169.3946.635', format = \"citeproc-json\")\n  cn.content_negotiation(ids = \"10.1126/science.169.3946.635\", format = \"rdf-xml\")\n  cn.content_negotiation(ids = \"10.1126/science.169.3946.635\", format = \"text\")\n  cn.content_negotiation(ids = \"10.1126/science.169.3946.635\", format = \"text\", style = \"apa\")\n  cn.content_negotiation(ids = \"10.1126/science.169.3946.635\", format = \"bibentry\")\n\nMeta\n====\n\n* Please note that this project is released with a `Contributor Code of Conduct \u003chttps://github.com/sckott/habanero/blob/main/CODE_OF_CONDUCT.md\u003e`__. By participating in this project you agree to abide by its terms.\n* License: MIT; see `LICENSE file \u003chttps://github.com/sckott/habanero/blob/main/LICENSE\u003e`__\n\n.. |pypi| image:: https://badge.fury.io/py/habanero.svg\n    :target: https://badge.fury.io/py/habanero\n    :alt: pypi\n\n.. |docs| image:: https://readthedocs.org/projects/habanero/badge/?version=latest\n   :target: http://habanero.rtfd.org/\n   :alt: Docs\n\n.. |ghactions| image:: https://github.com/sckott/habanero/actions/workflows/python.yml/badge.svg?branch=main\n   :target: https://github.com/sckott/habanero/actions/workflows/python.yml\n   :alt: ghactions\n\n.. |coverage| image:: https://codecov.io/gh/sckott/habanero/branch/main/graph/badge.svg?token=6RrgNAuQmR\n   :target: https://codecov.io/gh/sckott/habanero\n   :alt: coverage\n\n.. |ruff| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json\n    :target: https://github.com/astral-sh/ruff\n    :alt: Ruff\n\n.. |uv| image:: https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json\n    :target: https://github.com/astral-sh/uv\n    :alt: uv\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsckott%2Fhabanero","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsckott%2Fhabanero","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsckott%2Fhabanero/lists"}