Skip to main content

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


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.2.tar.gz (80.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

swh.web.client-0.2.2-py3-none-any.whl (79.6 kB view details)

Uploaded Python 3

File details

Details for the file swh.web.client-0.2.2.tar.gz.

File metadata

  • Download URL: swh.web.client-0.2.2.tar.gz
  • Upload date:
  • Size: 80.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.3

File hashes

Hashes for swh.web.client-0.2.2.tar.gz
Algorithm Hash digest
SHA256 025b8d004ec7ca736f27e62d0661d047ccd84b2133686aef827b8d1fa9433b65
MD5 e01f23a86acbffc9b5c3e1bab2052cb7
BLAKE2b-256 6c15738d9786ac73be3a9aeb9ca185d8e514a2d79acfd6a436afc5df875bf8e0

See more details on using hashes here.

File details

Details for the file swh.web.client-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: swh.web.client-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 79.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.3

File hashes

Hashes for swh.web.client-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 40dd27db42e3b1839ce9ead8a2e24b5a0d3bd03ad13954d184ebf28d95dc6d2f
MD5 1b46ffd12024178e434c3de4046bde9f
BLAKE2b-256 3c2f6d3b9656c89c579404001fbb0ce0d1580a863bc71b601b60c1710248c74c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page