Skip to main content

Python USI submission REST API contain all methods to interact with EMBL-EBI Unified Submissions Interface

Project description

Python USI submission REST API

https://img.shields.io/pypi/v/pyUSIrest.svg https://img.shields.io/travis/cnr-ibba/pyUSIrest.svg Documentation Status https://coveralls.io/repos/github/cnr-ibba/pyUSIrest/badge.png?branch=master Scrutinizer code quality (GitHub/Bitbucket)

Python USI submission REST API contain all methods to interact with EMBL-EBI Unified Submissions Interface

Features

  • Deal with EBI AAP (Authentication, Authorisation and Profile) service, generating tokens and dealing with User and Groups

  • Interact with EBI USI (Unified Submission Interface) in order to submit data to biosample as described by this guide. In details:

API Endpoints

pyUSIrest is written to exploit the BioSamples test environment endpoints. You are incuraged to understand how BioSamples submission works before do a real submission in BioSamples production servers. You can find more information on how to do a real submission in BioSamples production servers in readthedocs documentation: https://pyusirest.readthedocs.io

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

TODO

  • get a Team instance from Submission instance

  • Submission.has_errors make two identical queries, on to determine the status and one to search errors, simplify it by doing only a query

  • filtering sample by status or error make a lot of queries. Consider writing coroutines or reading ValidationResult as pages

0.3.1 (2020-01-27)

  • fix a bug when patching a sample: deal with team in relationship

  • raise USIDataError on 40x status code

  • Change Auth.__str__(): now it returns Token for Foo Bar will expire in HH:MM:SS

  • add Auth.get_domains which returns self.claims['domains']

0.3.0 (2020-01-14)

Features

  • modelled custom exceptions

  • Set a default date if releaseDate attribute is missing

  • improved documentation by describing how to sort and filter objects

  • fix bug when adding samples to a submission retrieved with team.get_submission()

  • Update documentation. Set taxon in sample data (mandatory attribute)

  • displaying dates when print(Submission) instances

  • Root.get_user_submissions() and other methods which returned list of objects now return iterator objects

  • str(auth) will report duration in hh:mm:ss

  • compiling PDF using PNG images (change badges)

  • raise no exceptions where no team is found (using Root.get_user_teams)

  • Using namespaces to configure API endpoints (pyUSIrest.settings)

  • move Root, User, Domain, Team, Submission, Sample ValidationResult classes inside pyUSIrest.usi module

0.2.2 (2019-03-28)

Features

  • Deal with API errors (50x, 40x)

0.2.1 (2019-01-15)

Features

  • test for an empty submission (no samples)

  • updated root.json, userSubmission.json test data

  • submissionStatus is no longer an attribute, when feching submission by name is present when getting user submissions

  • follow submissionStatus link (if necessary)

  • update submission status after create a new submission

  • update submission status after get_submission_by_name

  • update submission status after reload a just finalized submission

  • Domain.users returns User objects in a list

  • improved Submission.get_samples method

0.2.0 (2018-10-23)

Features

  • Fetch submission by name

  • changed library name to pyUSIrest

  • published to pypi

  • Finalize submission with PUT

0.1.0 (2018-10-17)

Features

  • submit into biosample with python methods

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

pyUSIrest-0.3.1.tar.gz (42.5 kB view details)

Uploaded Source

Built Distribution

pyUSIrest-0.3.1-py2.py3-none-any.whl (19.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pyUSIrest-0.3.1.tar.gz.

File metadata

  • Download URL: pyUSIrest-0.3.1.tar.gz
  • Upload date:
  • Size: 42.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.8.0

File hashes

Hashes for pyUSIrest-0.3.1.tar.gz
Algorithm Hash digest
SHA256 6b1c91ab79ce7c1b05b5e5aa2c3a941c1e73dd694a8b79e7eb13065443cac4cc
MD5 d9e958a148a744b13d211d4bfac34f46
BLAKE2b-256 8c5a8d652a528207652dc8740e480a34a2972e70c87ce424b80da66d455db6e7

See more details on using hashes here.

File details

Details for the file pyUSIrest-0.3.1-py2.py3-none-any.whl.

File metadata

  • Download URL: pyUSIrest-0.3.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.8.0

File hashes

Hashes for pyUSIrest-0.3.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 cbe2c17a066a62f1b6898bf7fb88040137f7d041f38a41b0edd7df622358420f
MD5 a90503b38218e4cb1d16805a287581ac
BLAKE2b-256 3c68b545e317459b0af00d6d39b636b6d16125dce1c6faf56cb6982818538e61

See more details on using hashes here.

Supported by

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