Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F8392199
README.rst
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
811 B
Subscribers
None
README.rst
View Options
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'
))
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Jun 4 2025, 6:56 PM (11 w, 4 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3295720
Attached To
rDWCLI Web client
Event Timeline
Log In to Comment