This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
MedBookLib provides a python interface to MedBook (R version should come next).


MedBookConnection(<name optional>, <password optional>)
You begin the conversation by creating a MedBook Connection object which will be used

MedBookConnection("", "test1234");

or using the MedBook environment variables: MEDBOOKUSER, MEDBOOKPASSWORD

medbook = MedBookConnection();

This will throw an exception object if it does not make authenticated connection to the MedBook server.

MedBookConnection.find(<collection required>, <mongo query optional>, <keyword querys optional>)

The simplest find command will return all of the data objects in a collection. For example

data = medbook.find("Clinical_Info");

Some tables such as Expression2 are very large and if just need one gene from one study, you can do this by simply doing:

data = medbook.find("Expression2", { "Study_ID": "prad_wcdt", "gene": "BRCA1" });

This can be more easily expressed using the python keyword idiom:

data = medbook.find("Expression2", Study_ID="prad_wcdt", gene="BRCA1");

But use the mongo syntax to express complicated queriess,

data = medbook.find("Expression2", { "Study_ID": {"$in": [ "prad_tcga", "prad_wcdt"] }, "gene": { "$in": ["EGFR","BRCA1"]}});

You cannot combine keyword queries and mongo queries.

You must provide credentials to MedBook in the form of a name and password. There are two ways
to do this:

Preferred way: Set the MEDBOOKUSER and MEDBOOKPASSWORD environment variables. For exmaple:
export MEDBOOKPASSWORD=test1234

There is also a MEDBOOKSERVER environment variable. If no server is specificed
The default server is But you can also set the server to be your laptop.

Common ones are:



export MEDBOOKSERVER=http://localhost:20012/

Alternatively, you can provide the name and password in the parameters of the MedBookConnection object (see above).

Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
medbooklib-1.0.tar.gz (3.0 kB) Copy SHA256 Checksum SHA256 Source May 21, 2015

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting