API that interacts with Illumina Clarity LIMS REST architecture.
Project description
UA-Clarity-API
Provides a simple REST implementation for use with Clarity endpoints.
Motivation
Was designed to implement a simple way to interact with Clarity REST architecture.
Features
- Get will do a batch get if that end point exists, otherwise it will return a response similar to what a batch get returns.
- Caller can add queries to get using a keyword.
- Caches every get to eliminate excessive get calls.
- All REST calls will throw an exception if they failed.
Code Example
from ua_clarity_api import ua_clarity_api
api = ua_clarity_api.ClarityApi(host, username, password)
uris_files = api.download_files("some file uri")
data = api.get("some endpoint")
Installation
pip install ua-clarity-api
Tests
pip install --update nose
cd ./repo
cd ./tests
nosetests test_ua_clarity_api.py
How to Use
- You'll need to instantiate a ClarityApi object with a correct host, and the username/password to access that host's endpoints.
- Get can retrieve resources from endpoints and can utilize queries with the "parameters" keyword.
- Put and Post can update or create new resources given the appropriate endpoint and a well-formed payload.
- Delete can remove a resource from an endpoint.
- Download_files will create temporary files from a list of file uris and returns them as a dictionary mapping of uri: tempfile.
Credits
sterns1 raflopjr RyanJohannesBland
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ua_clarity_api-1.1.4.tar.gz
(5.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ua_clarity_api-1.1.4.tar.gz.
File metadata
- Download URL: ua_clarity_api-1.1.4.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
797d0b98f94fe3f9c13af348c8a1d8947e3261565a80a280c8067552bc477da8
|
|
| MD5 |
9d12ad0de784fa7e3975e096a2ec3a3f
|
|
| BLAKE2b-256 |
cb78023bc969ab8782479b8284658a4e252cc01966224aa0f01c9aa903e3eefe
|
File details
Details for the file ua_clarity_api-1.1.4-py3-none-any.whl.
File metadata
- Download URL: ua_clarity_api-1.1.4-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58ae6c425adf8acf7c0bb773910d4ffe9a4c7ec13ace9c6f6f9fcd88f4336f38
|
|
| MD5 |
a1ba6df94276a5e6dd48a1aec18dbfd0
|
|
| BLAKE2b-256 |
2c8adb25022cb7a1e1673054a1a2289268fdf0a08615c38a2c26a0ad32f547c4
|