Config

Database

class bamboo.config.db.Database[source]

Container for the MongoDB client.

classmethod client()[source]

Return the database client.

classmethod create_db(db_name)[source]

Create a database db_name.

Parameters:
  • cls – The class to set a client on.
  • db_name – The name of the collection to create.
classmethod db(name=None)[source]

Create the database if it has not been created.

If name is provided, create a new database.

Parameters:
  • cls – The class to set the database for.
  • name – The name of the database to create, default None.
Returns:

The created database.

Routes