DSW SDK
Introduction
This projects aims at providing unified and easy-to-use Python library for communicating with the Data Stewardship Wizard API. For more info about the DSW project itself, see official webpage or the API documentation.
Installation
You can install this library via PyPI:
pip install dsw-sdk
Quickstart
The only mandatory step need in order to get going is to initialize the whole SDK and tell it, where is the DSW API located and how to connect to it:
from dsw_sdk import DataStewardshipWizardSDK
dsw_sdk = DataStewardshipWizardSDK(
api_url='http://localhost:3000',
email='albert.einstein@example.com',
password='password',
)
Now you are ready to go.
Note that this is only illustrative example and we encourage you not to store secrets like passwords in the source code. There are better mechanisms (env variables) introduced in the docs.
Basic usage
Most actions should be done via the high-level interfaces provided on an
instance of the DataStewardshipWizardSDK class. These interfaces operate with
subclasses of Model class (e.g. user.User) -- these are the DSW data
entities. Basically they are just data classes with bunch of attributes and
methods for saving the entity (save()) on the server and deleting it
(delete()).
import os
user = dsw_sdk.users.create_user(
first_name='John',
last_name='Doe',
email='john.doe@example.com',
)
user.password = os.getenv('SECRET_PASSWORD')
user.save()
...
user.delete()
For more advanced usage, see the docs.
Contributing
Want to fix a bug or help with implementing new features? Don't hesitate to contact us and read the contributing doc.
Metadata
Release files for dsw-sdk 3.8.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 | |
|---|---|---|---|---|
| dsw-sdk-3.8.0.tar.gz | 46.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dsw_sdk-3.8.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 105.6 kB
Release files / dsw-sdk-3.8.0.tar.gz
| Download URL | dsw-sdk-3.8.0.tar.gz |
|---|---|
| Size | 46.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4f7f3f78bdd0774d85726380f58cf25a0f1b16925aea08384acd38e95ca062a0
|
|
BLAKE2b-256 checksum How to use checksums |
3450e811d54ac30e4a81e4ab742f99449769b40fd8af9273da785a902e6d2b30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.8.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.1
|
Release files / dsw_sdk-3.8.0-py3-none-any.whl
| Download URL | dsw_sdk-3.8.0-py3-none-any.whl |
|---|---|
| Size | 58.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b22c5d7fd94a59da6dbf23b72c8241929342025424720ff133e65cd0bed0701d
|
|
BLAKE2b-256 checksum How to use checksums |
4004a5c5339f91b3707b56d2534bbb5f112405728149c7dd4bc1c753920912b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.8.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.1
|
Security for dsw-sdk 3.8.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.