Interface to MongoDB that exposes it as a key-value store.


Return the value associated with a key.

If there is no value with the given key, returns None.

pyphi.db.insert(key, value)

Store a value with a key.

If the key is already present in the database, this does nothing.


Get a key from some input.

This function should be used whenever a key is needed, to keep keys consistent.