Software Heritage Web client
Project description
Client for Software Heritage Web applications, via their APIs.
Sample usage
from swh.web.client import WebAPIClient
cli = WebAPIClient()
# retrieve any archived object via its PID
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.1.3.tar.gz
(64.1 kB
view hashes)
Built Distribution
Close
Hashes for swh.web.client-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 328623da7e3571db19990a2b1981561df1f2d48d4165ef9a0f695eddb216419e |
|
MD5 | 98502c9ea4bb3ca35838efb55f69138d |
|
BLAKE2b-256 | 5f1cdd1df3a894fc5fd76e4a395455f88935af45da58d8d50bdb5d2705982b2d |