Skip to main content

Aquarium scripting

Project description

CircleCI PyPI version

Trident is the python API scripting for Aquarium.

  1. Installation - how to install pydent
  2. Examples - example usages
  3. Contributing - contributing and developer notes
  4. API Notes - notes on pydent/Aquarium models
  5. Tests - testing notes

Note: the initial version is tagged as v0.0.1-initial, but is no longer being developed.

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pydent, version 0.0.35
Filename, size File type Python version Upload date Hashes
Filename, size pydent-0.0.35-py3-none-any.whl (51.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pydent-0.0.35.tar.gz (46.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page