No project description provided
Project description
swh-digestmap Python binding
## Use
from swh.digestmap import DigestMap
digestmap = DigestMap("dest_folder")
digestmap.sha1_from_swhid("swh:1:cnt:0000000000000000000000000000000000000004")
found = digestmap.content_get([b"0000000000000000000000000000000000000004"], algo="sha1_git")
if found and found[0]:
hashes_dict = found[0].hashes()
## Use as a Software Heritage storage backend
The Python package will register digestmap as a
Software Heritage storage backend.
However it only partially implements content_get:
returned content objects should only be used to fetch .hashes() as in the example above.
Note that the returned dict will only contain hashes known to the digestmap,
sha1 and sha1_git.
If you are not bothered by these limitations (for example, you're using swh-fuse)
It can be configured as such:
storage:
cls: digestmap
path: "/path/to/digestmap/folder"
## Develop
pip install -r requirements-swh.txt
pip install -r requirements-tests.txt
cd pyo3/
pip install .
pytest
We test via pytest because the DigestMap binding needs a Python able to import swh.model.model.
Package with cibuildwheel pyo3 from the repository's root.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file swh_digestmap-0.1.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: swh_digestmap-0.1.0-pp311-pypy311_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a8d9eb21f4ac94f58adcb68a7eddf3ee72f8ed947ed6ffe447870a04934cc32
|
|
| MD5 |
ed24db52eeec793e23d4144e93d8f7fb
|
|
| BLAKE2b-256 |
25a262940cd1ac2d9d1c05bcf0e097a9bd974be4815d7c8d250e4c5871f160e3
|
File details
Details for the file swh_digestmap-0.1.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: swh_digestmap-0.1.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af01fb5a7ff28952094eb70d901d519443a21d7a1bf6746e552243851f52d781
|
|
| MD5 |
333804ab222a18679620ec51e5d4bc56
|
|
| BLAKE2b-256 |
f9f2869fd3f286ccce4cf827622a9d635a4618b44575c9ef23563d1445774cfa
|
File details
Details for the file swh_digestmap-0.1.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: swh_digestmap-0.1.0-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
733d2a444ec9cdde2bc91305c25c39897cff27ffe79237ba8ce50bd482110502
|
|
| MD5 |
ca21fdbf7d2deca9dce9733a77ee4d4e
|
|
| BLAKE2b-256 |
4e0968e33cd4f066d961d955e7c6faa38977032eb55ea63d5b1c83ab6dc5e7f5
|
File details
Details for the file swh_digestmap-0.1.0-cp313-cp313-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: swh_digestmap-0.1.0-cp313-cp313-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.13, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
45246791d299ea23fefa04d8962ce608dee6ffa97bdf5701cfc0c1bbdc915025
|
|
| MD5 |
56e7b470474b2574c0b8538211e04832
|
|
| BLAKE2b-256 |
52801c2da6bf269697aadc355f9c42493b0ef63f76632226faa70452c9eb4b57
|
File details
Details for the file swh_digestmap-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: swh_digestmap-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.13, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
079832aa718851055309167c71aa7bdae0c721bbba4525d4a9321c636a941442
|
|
| MD5 |
470694c457997ef7a471259e9c2a819b
|
|
| BLAKE2b-256 |
88bde767cbeaec242249a099a485eee3163dc102a3379e8563bdc414113097a2
|
File details
Details for the file swh_digestmap-0.1.0-cp312-cp312-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: swh_digestmap-0.1.0-cp312-cp312-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.12, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a29a782d72b488d81ef9d4ae01e5e674ed48803f5d239d6a71714a3c8f99a497
|
|
| MD5 |
9404ca8f20543eeee6f1de2d21bd7c37
|
|
| BLAKE2b-256 |
2d518a0275de1e0e437407c3954d478f132efc69301333236d2cbb4b7682a2f1
|
File details
Details for the file swh_digestmap-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: swh_digestmap-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2a741a9850d04cc733c39724d7a2463ef992677bdcb65542e31ba7d8809de993
|
|
| MD5 |
9fe596ce955401768ec1ef7abbb6cadd
|
|
| BLAKE2b-256 |
7573c6f952c389279003b1fb9e4e38450518c5ec516643a58530b21cee08477b
|
File details
Details for the file swh_digestmap-0.1.0-cp311-cp311-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: swh_digestmap-0.1.0-cp311-cp311-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.11, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
acb50c78e6755d5df696e47d7d3a56807a9bbad098e14d7082188aa87b7873d0
|
|
| MD5 |
08987dd3871f85d41c560348bf3111d8
|
|
| BLAKE2b-256 |
608be5d724e6c0b25573aa1096d3f93d2d3b129f4a2d41725d5aaf7780c823e3
|
File details
Details for the file swh_digestmap-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: swh_digestmap-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
202f465b85192793112019ba55d78fd449e5bfea109532b521e02ed75690d6b3
|
|
| MD5 |
49ca76876aac3bb93b830aa4e6d59e7f
|
|
| BLAKE2b-256 |
999d346644412af9cd3ccf805a40aeee4d8d0b4473d6e384631e79117d0981f4
|
File details
Details for the file swh_digestmap-0.1.0-cp310-cp310-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: swh_digestmap-0.1.0-cp310-cp310-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.10, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0c3294387d89800ecabbdd3ec5e1a905fc62c5910c18b336d9c42f87b50aa91
|
|
| MD5 |
c6d291f811706200c2476c2aaaf0eba0
|
|
| BLAKE2b-256 |
046b5beb7c49ec76a34788e3b14b9f7dae0d70789b800415872fe0979a8e2a22
|
File details
Details for the file swh_digestmap-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: swh_digestmap-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af9df6e4663922aadc2c56de653826d313397310477d7ef9d363dc6f5c635002
|
|
| MD5 |
97f77d96d65c57f033a1bc4ec4097b34
|
|
| BLAKE2b-256 |
af73f339b4fabeceeb96f25801f81634e667eafead00ddf8d04a5873e9a7da7e
|
File details
Details for the file swh_digestmap-0.1.0-cp39-cp39-musllinux_1_2_x86_64.whl.
File metadata
- Download URL: swh_digestmap-0.1.0-cp39-cp39-musllinux_1_2_x86_64.whl
- Upload date:
- Size: 1.0 MB
- Tags: CPython 3.9, musllinux: musl 1.2+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
912c1efdfe459760203c11660136c99719768f24c24f52871218fe6611dbfa46
|
|
| MD5 |
e4c07bc09a16bb457d3a9be1365537cd
|
|
| BLAKE2b-256 |
a75dea562bafb34173f65bae0477972a7b35c53261132dbb443100c6bcddc3d7
|
File details
Details for the file swh_digestmap-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.
File metadata
- Download URL: swh_digestmap-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 1.3 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b9964887253e82fb585d858f56d3f550c34e3b712564ee8de0f416544373e5f0
|
|
| MD5 |
2e71da82fe078107a4f2fb601825c025
|
|
| BLAKE2b-256 |
3d70cf901c139468ba8e0fcf9b03a8e517af75ce22ff6ed1ca09b8bf6d9ab839
|