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 Documentation Status Scrutinizer code quality (GitHub/Bitbucket)

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


  • 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:


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



  • 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['domains']

0.3.0 (2020-01-14)


  • 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)


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

0.2.1 (2019-01-15)


  • 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)


  • Fetch submission by name

  • changed library name to pyUSIrest

  • published to pypi

  • Finalize submission with PUT

0.1.0 (2018-10-17)


  • 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 hashes)

Uploaded source

Built Distribution

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

Uploaded py2 py3

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