Skip to main content

Software Heritage Web client

Project description

.. _swh-web-client:

Software Heritage - Web client

Client for Software Heritage Web applications, via their APIs.

Sample usage

.. code-block:: python

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'))

API Reference

.. toctree:: :maxdepth: 2

/apidoc/swh.web.client

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.1.1.tar.gz (59.3 kB view hashes)

Uploaded Source

Built Distribution

swh.web.client-0.1.1-py3-none-any.whl (72.0 kB view hashes)

Uploaded Python 3

Supported by

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