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.3.tar.gz (81.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.2.3-py3-none-any.whl (79.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for swh.web.client-0.2.3.tar.gz
Algorithm Hash digest
SHA256 061f57428abaa15daad10e334f92f4ce1c97528ed513bfb3ac6281e836db8a39
MD5 77f473a4edcca09eab02672e5eabff43
BLAKE2b-256 db0fa5643463c7472b5dca6b48287ab9896a14125279c9f08b34b138a0343b9e

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for swh.web.client-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9b672f7c630166fc95ca3e1dd439298b259f0de0baacfcf7ea000b67a60532ce
MD5 90b38f3d6221560a78971beb93232003
BLAKE2b-256 203c9ab741bec1d1ce40338966a458bf692856dd74388a416d7d27e0d1c2fc85

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