Registry / http-networking / sickle

sickle

JSON →
library0.7.0pypypi✓ verified 84d ago

A lightweight OAI (Open Archives Initiative) client library for Python, designed to harvest metadata from OAI-PMH compliant repositories. Current version is 0.7.0, with maintenance releases as needed.

pip install sickle
INSTALL
IMPORT
SIG · SICKLE
S
sickle
http-networkingpythonv0.7.0
Install
2.7s avg
Import
615ms
Disk
31MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.7.0 · 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.95 runs
installs and imports cleanly · install 0.0s · import 0.642s · 33MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.7s · import 0.588s · 33MB
31MB installed
● package 31MB
Code
Verified usage

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

OAIResponse
from sickle import OAIResponse
from sickle.oaipmh import OAIResponse
OAIResponse is now top-level in v0.7+
Sickle
from sickle import Sickle
Main class, always from top-level

Basic setup: create a Sickle instance pointing to an OAI-PMH base URL, then iterate over records. Use 'verify=False' for self-signed certs (not recommended).

from sickle import Sickle sickle = Sickle('https://api.example.com/oai', verify=True) records = sickle.ListRecords(metadataPrefix='oai_dc') for record in records: print(record.header.identifier, record.metadata.get('title', ''))
Debug
Known issues
breakingIn v0.7.0, the 'OAIResponse' class moved from 'sickle.oaipmh' to top-level 'sickle'. Old imports will break.
fix
Change imports from 'from sickle.oaipmh import OAIResponse' to 'from sickle import OAIResponse'.
affects: <0.7.0
gotchaThe 'ListRecords' iterator internally handles resumption tokens automatically. However, if you manually iterate and break early, the underlying HTTP session may not be cleanly closed. Always use context managers or iterate fully.
fix
Wrap usage in a 'with Sickle(...) as app:' context manager to ensure cleanup.
affects: all
deprecatedThe 'max_retries' parameter is deprecated in favor of 'retry_status_codes' and 'retry_backoff_factor' via requests adapter.
fix
Use 'from requests.adapters import HTTPAdapter' to configure retries.
affects: >=0.7.0
Errors
Common errors & fixes
AttributeError: module 'sickle' has no attribute 'OAIResponse'
Trying to use 'sickle.OAIResponse' directly, but it's not a top-level attribute unless explicitly imported.
fix
Use 'from sickle import OAIResponse' or access it as 'sickle.oaipmh.OAIResponse' (deprecated).
requests.exceptions.SSLError: HTTPSConnectionPool(host='...', port=443): Max retries exceeded with url: ... (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed')))
The OAI endpoint uses a self-signed or invalid SSL certificate.
fix
If you trust the endpoint, pass 'verify=False' to Sickle constructor (not recommended in production). For production, use proper certificates.
Upgrade
Version history
0.7.0latest on PyPI · released May 17, 2020
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
OpenAI (training)
1
Resources
sickle — pip install sickle · libregistry