Skip to main content

Software development kit for the Data Stewardship Wizard.

Project description

PyPI Static analysis Tests Documentation Status License

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.

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

dsw-sdk-3.5.0.tar.gz (43.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dsw_sdk-3.5.0-py3-none-any.whl (57.9 kB view details)

Uploaded Python 3

File details

Details for the file dsw-sdk-3.5.0.tar.gz.

File metadata

  • Download URL: dsw-sdk-3.5.0.tar.gz
  • Upload date:
  • Size: 43.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for dsw-sdk-3.5.0.tar.gz
Algorithm Hash digest
SHA256 eab1a9abfc7ee28179d4cf028f23c66c14cfb4219ba517d018300ab951271f6c
MD5 657158998b66f52c4930ec27dd5ffb73
BLAKE2b-256 68bb709b92122ea203c94bad2c3c887c30719c01cfbcdebabe9257c7f326fc84

See more details on using hashes here.

File details

Details for the file dsw_sdk-3.5.0-py3-none-any.whl.

File metadata

  • Download URL: dsw_sdk-3.5.0-py3-none-any.whl
  • Upload date:
  • Size: 57.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

File hashes

Hashes for dsw_sdk-3.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 62cf5ae2ac0fce7f0654545c02306a89e95173fb489341a30161bdc91b0b0acd
MD5 84b3b00e811ec4c4678768b5194807a9
BLAKE2b-256 d44c1822d24b45fb0622b35e61227d455c9f887ddfdd067df0cf3e49dea800f4

See more details on using hashes here.

Supported by

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