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.3.0.tar.gz (85.0 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.3.0-py3-none-any.whl (84.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: swh.web.client-0.3.0.tar.gz
  • Upload date:
  • Size: 85.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.3

File hashes

Hashes for swh.web.client-0.3.0.tar.gz
Algorithm Hash digest
SHA256 4fb3f4d973486c5141fd1507ef25cc487b677f77358efcf73a3bd682e76ef522
MD5 b697088f771198a71787f66f00c8b1e9
BLAKE2b-256 6736daed5c6ae15f75b9804b0b320db5ddb979c52d5da7df7972ef8f2ba9787d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: swh.web.client-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 84.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.3

File hashes

Hashes for swh.web.client-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a1be48a12b3ec23c2960a39848c655d1d37aaf11dca0040e449248a39cb036d6
MD5 5c0f710c4af7d319f3ba908b0355603c
BLAKE2b-256 9030768ead3808cf746e192603459730c776141ecad2b84d8ccdad7ef779dedd

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