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.4.tar.gz (83.3 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.4-py3-none-any.whl (82.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: swh.web.client-0.2.4.tar.gz
  • Upload date:
  • Size: 83.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.3

File hashes

Hashes for swh.web.client-0.2.4.tar.gz
Algorithm Hash digest
SHA256 c7f9958c3b3f4c68339cd2e395608aa41d904cf064b53dad259bbedff6efb1ab
MD5 ca45c99209e96c3dccf05e0677e795b9
BLAKE2b-256 beb52a4fb78c3e0714d1322341b6c6b1f40b6e98d22f7bd00f8359cf02bffb6e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: swh.web.client-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 82.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/51.0.0 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.7.3

File hashes

Hashes for swh.web.client-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2175902c6d401aac0d91513371610c39f6203fc0c6a2ba1553e7aa0f6947837a
MD5 f606875a5c3560c2f237eb853b5d63a0
BLAKE2b-256 b7b878593221b0a50def2421fe97b1247fa754d399d690458c4f0ff4c9ddab62

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