Skip to content

SciLifeLab/statusdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

statusdb

This repository holds a Python package with wrappers and methods designed to work with the Status DB instance of CouchDB at NGI Stockholm. It can be used to retrieve information about project, samples, flow cells and anything else stored in the database.

This code was originally part of the scilifelab GitHub repository. It has been moved into it's own package here to make maintenance simpler.

Installation

To use this package, you need to install it. Clone the repository (remember to fork it if you're intending to make any changes) and download. Then, install the package with the following:

python setup.py install

Swap install for develop if you're going to change any code, to avoid having to reinstall every time you make a change.

Finally, you need a config file with the information that the package requires to connect to the database. This is held within a config file in your home directory:

~/.ngi_config/statusdb.yaml

This file should be yaml formatted and look like this:

statusdb:
    username: <login as user>
    password: <password to use>
    url: <full url of the database>

Usage

Once installed, you can import the package into any other Python script. For example:

from statusdb.db import connections as statusdb

p = statusdb.ProjectSummaryConnection()
proj = p.get_entry('Testing_project')
samples = proj['samples']

Contributors

About

Python wrappers and methods to work with CouchDB's instance at NGI Stockholm

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages