Aquarium's Python API for planning, executing, and analyzing scientific experiments.
Project description
Trident: Aquarium API Scripting
Trident is the python API scripting for Aquarium.
Documentation
API documentation can be found here at klavinslab.org/trident
Requirements
- Python > 3.4
- An Aquarium login
Quick installation
Pydent can be installed using pip3
.
pip3 install pydent
or upgraded using
pip3 install pydent --upgrade
Basic Usage
Logging in
from pydent import AqSession
# open a session
mysession = AqSession("username", "password", "www.aquarium_nursery.url")
# find a user
u = mysession.User.find(1)
# print the user data
print(u)
Models
print(mysession.models)
Finding models
-
By name:
nursery.SampleType.find_by_name("Primer")
-
By ID:
nursery.SampleType.find(1)
-
By property:
nursery.SampleType.where({'name': 'Primer'})
-
All models:
nursery.SampleType.all()
Getting nested data
# samples are linked to sample_type
primer_type = mysession.SampleType.find_by_name("Primer")
primers = primer_type.samples
# and sample type is linked to sample
p = primers[0]
print(p.sample_type)
Available nested relationships
primer_type = mysession.SampleType.find(1)
print(primer_type.relationships)
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
pydent-0.1.5a11.tar.gz
(96.4 kB
view hashes)
Built Distribution
pydent-0.1.5a11-py3-none-any.whl
(111.2 kB
view hashes)
Close
Hashes for pydent-0.1.5a11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad4bc9b012da9496ef896f97cafc7ef6442d5a4967729a0afd7e494e36d2749a |
|
MD5 | 1cd374def07f5955708093c6cee1dbe3 |
|
BLAKE2b-256 | c6cbdc136f4e404d2d45cb223a91467f23fe80673739c4a1967d6e4f9e57e7c2 |