Registry / http-networking / habanero

habanero

JSON →
library2.9.2pypypi✓ verified 83d ago

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.

pip install habanero
INSTALL
IMPORT
SIG · HABANERO
H
habanero
http-networkingpythonv2.9.2
Install
2.9s avg
Import
590ms
Disk
24MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.9.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.615s · 27.2MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 2.9s · import 0.564s · 28MB
24MB installed
● package 24MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Crossref
from habanero import Crossref

Instantiate Crossref client with polite pool email and query the works endpoint.

from habanero import Crossref cr = Crossref(mailto="your@email.com") # replace with your email result = cr.works(query="open access", limit=5) print(result)
Debug
Known issues
breakingv2.0.0 replaced requests with httpx. Code relying on requests.Session or custom adapters will break.
fix
Update any custom HTTP handling; use httpx settings via the client.
affects: <2.0.0
deprecatedv0.7.4 deprecated query.title filter; use query.bibliographic instead.
fix
Replace query.title=... with query.bibliographic=...
affects: >=0.7.4
gotchaThe ids parameter is now required in Crossref.prefixes method (since v1.2.6). Omitting it causes an error.
fix
Always pass ids to .prefixes().
affects: >=1.2.6
breakingbibtexparser is optional since v2.0.0. Code that imports it directly from habanero will fail unless the [bibtex] extra is installed.
fix
Install with pip install habanero[bibtex] or handle ImportError gracefully.
affects: >=2.0.0
Errors
Common errors & fixes
ImportError: cannot import name 'Crossref' from 'habanero'
Incorrect import statement (e.g., from habanero.crossref import Crossref).
fix
Use: from habanero import Crossref
TimeoutError: The read operation timed out
Default timeout in httpx may be insufficient for large queries.
fix
Set timeout when creating Crossref instance: cr = Crossref(timeout=30)
TypeError: __init__() got an unexpected keyword argument 'ua_string'
ua_string parameter was renamed or removed in v2.0.0.
fix
Use the default user-agent or set custom headers via httpx. Remove ua_string.
Upgrade
Version history
2.9.2latest on PyPI · released Jun 17, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
28 hits · last 30 days
node
28
Resources
habanero — pip install habanero · libregistry