Skip to main content

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

Release files for pyUSIrest 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyUSIrest 0.3.1
File Size Uploaded
pyUSIrest-0.3.1.tar.gz 42.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyUSIrest 0.3.1
File Interpreter ABI Platform
pyUSIrest-0.3.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 61.5 kB

Release files / pyUSIrest-0.3.1.tar.gz

Download URL pyUSIrest-0.3.1.tar.gz
Size 42.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6b1c91ab79ce7c1b05b5e5aa2c3a941c1e73dd694a8b79e7eb13065443cac4cc
BLAKE2b-256 checksum
How to use checksums
8c5a8d652a528207652dc8740e480a34a2972e70c87ce424b80da66d455db6e7
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / pyUSIrest-0.3.1-py2.py3-none-any.whl

Download URL pyUSIrest-0.3.1-py2.py3-none-any.whl
Size 19.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
cbe2c17a066a62f1b6898bf7fb88040137f7d041f38a41b0edd7df622358420f
BLAKE2b-256 checksum
How to use checksums
3c68b545e317459b0af00d6d39b636b6d16125dce1c6faf56cb6982818538e61
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page