pyswh - a Python wrapper library for the Software Heritage API
pyswh aims to wrap interactions with the Software Heritage REST API into a comfortable Python API.
Getting started
Install pyswh via pip:
pip install pyswh
Include pyswh in your project by adding a respective dependency to your project, e.g.,
# requirements.txt
pyswh==0.1.0
# Poetry pyproject.toml
[tool.poetry.dependencies]
pyswh = "^0.1.0"
You can now use pyswh:
from pyswh import swh
from pyswh import errors as swh_errors
try:
swh.save('https://github.com/sdruskat/pyswh', False, 'SWH-API-AUTH-TOKEN')
except swh_errors.SwhSaveError as sse:
raise sse
Refer to the complete documentation to learn more about using pyswh.
Set up for development
Requirements: Python >= 3.10.0.
-
Install Poetry.
-
Clone the repository:
git clone git@github.com:sdruskat/pyswh.git
- Create a virtual environment in
.venv:
python3.10 -m venv .venv
- Activate the Poetry shell and install project:
poetry shell
poetry install
Testing
pyswh uses pytest for testing. To run all tests, do:
poetry shell
poetry run pytest test/
Building documentation locally
Initialize the Poetry virtual environment with poetry shell, go into the docs/ folder and run make html.
Licensing
See LICENSE.md
Metadata
Release files for pyswh 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyswh-0.1.0.tar.gz | 14.9 kB | Without provenance | Details for pyswh-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyswh-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pyswh-0.1.0-py3-none-any.whl |
Total release size: 40.7 kB
Release files / pyswh-0.1.0.tar.gz
| Download URL | pyswh-0.1.0.tar.gz |
|---|---|
| Size | 14.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba0895fe5d7e7350b278e3dcc1db61dcd061b2f06c330af0ed54ad92c331c788
|
|
BLAKE2b-256 checksum How to use checksums |
f3fd44511eb059a6837f856f654e44a6d76137b16a9a3d9d1a9f861374eb3fab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.1 CPython/3.8.10 Linux/5.10.16.3-microsoft-standard-WSL2
|
Release files / pyswh-0.1.0-py3-none-any.whl
| Download URL | pyswh-0.1.0-py3-none-any.whl |
|---|---|
| Size | 25.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0a725999b62aad6e95628a418eeeeef6640ed0f6c14a8f8fc2e8722bded78fd9
|
|
BLAKE2b-256 checksum How to use checksums |
676f5de79241f71d452772c54d1ea1922bd6ebf159d98f7e8cbd43f657f709d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.2.1 CPython/3.8.10 Linux/5.10.16.3-microsoft-standard-WSL2
|
Security for pyswh 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.