Software Heritage Web client
Project description
Client for Software Heritage Web applications, via their APIs.
Sample usage
from swh.web.client.client import WebAPIClient
cli = WebAPIClient()
# retrieve any archived object via its SWHID
cli.get('swh:1:rev:aafb16d69fd30ff58afdd69036a26047f3aebdc6')
# same, but for specific object types
cli.revision('swh:1:rev:aafb16d69fd30ff58afdd69036a26047f3aebdc6')
# get() always retrieve entire objects, following pagination
# WARNING: this might *not* be what you want for large objects
cli.get('swh:1:snp:6a3a2cf0b2b90ce7ae1cf0a221ed68035b686f5a')
# type-specific methods support explicit iteration through pages
next(cli.snapshot('swh:1:snp:cabcc7d7bf639bbe1cc3b41989e1806618dd5764'))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
swh.web.client-0.2.1.tar.gz
(80.0 kB
view hashes)
Built Distribution
Close
Hashes for swh.web.client-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4525c2fb5b36cdeea24f847caf837d8afc88d0d6e036b3851a69943b28bde76 |
|
MD5 | 889f32729ed075de96438dc348f1485d |
|
BLAKE2b-256 | 7f66fd28482856d00cf3111f03c7a5e1e3617bb6739fe73214a1ce637c3fc5d7 |