{"id":23835,"library":"habanero","title":"habanero","description":"Low-level async HTTP client for the Crossref Search API. Current version 2.3.0 supports Python >=3.10. Uses httpx instead of requests, with optional bibtexparser for BibTeX handling.","status":"active","version":"2.3.0","language":"python","source_language":"en","source_url":"https://github.com/sckott/habanero","tags":["crossref","api-client","bibliometrics","scholarly"],"install":[{"cmd":"pip install habanero","lang":"bash","label":"Install core"},{"cmd":"pip install habanero[bibtex]","lang":"bash","label":"Install with BibTeX support"}],"dependencies":[],"imports":[{"note":"","wrong":"","symbol":"Crossref","correct":"from habanero import Crossref"}],"quickstart":{"code":"from habanero import Crossref\ncr = Crossref(mailto=\"your@email.com\")  # replace with your email\nresult = cr.works(query=\"open access\", limit=5)\nprint(result)","lang":"python","description":"Instantiate Crossref client with polite pool email and query the works endpoint."},"warnings":[{"fix":"Update any custom HTTP handling; use httpx settings via the client.","message":"v2.0.0 replaced requests with httpx. Code relying on requests.Session or custom adapters will break.","severity":"breaking","affected_versions":"<2.0.0"},{"fix":"Replace query.title=... with query.bibliographic=...","message":"v0.7.4 deprecated query.title filter; use query.bibliographic instead.","severity":"deprecated","affected_versions":">=0.7.4"},{"fix":"Always pass ids to .prefixes().","message":"The ids parameter is now required in Crossref.prefixes method (since v1.2.6). Omitting it causes an error.","severity":"gotcha","affected_versions":">=1.2.6"},{"fix":"Install with pip install habanero[bibtex] or handle ImportError gracefully.","message":"bibtexparser is optional since v2.0.0. Code that imports it directly from habanero will fail unless the [bibtex] extra is installed.","severity":"breaking","affected_versions":">=2.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use: from habanero import Crossref","cause":"Incorrect import statement (e.g., from habanero.crossref import Crossref).","error":"ImportError: cannot import name 'Crossref' from 'habanero'"},{"fix":"Set timeout when creating Crossref instance: cr = Crossref(timeout=30)","cause":"Default timeout in httpx may be insufficient for large queries.","error":"TimeoutError: The read operation timed out"},{"fix":"Use the default user-agent or set custom headers via httpx. Remove ua_string.","cause":"ua_string parameter was renamed or removed in v2.0.0.","error":"TypeError: __init__() got an unexpected keyword argument 'ua_string'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}