planemo.database package

Submodules

planemo.database.factory module

Create a DatabaseSource from supplied planemo configuration.

planemo.database.factory.create_database_source(**kwds)[source]

Return a planemo.database.DatabaseSource for configuration.

planemo.database.interface module

Describe the interface classes of the planemo.database package.

class planemo.database.interface.DatabaseSource[source]

Bases: object

Interface describing a source of profile databases.

create_database(identifier)[source]

Create a database with specified short identifier.

Throw an exception if it already exists.

delete_database(identifier)[source]

Delete a database with specified short identifier.

Throw an exception if it already exists.

list_databases()[source]

Return identifiers associated with database source.

sqlalchemy_url(identifier)[source]

Return a URL string for use by sqlalchemy.

planemo.database.postgres module

Module describes a DatabaseSource for local postgres databases.

class planemo.database.postgres.LocalPostgresDatabaseSource(**kwds)[source]

Bases: planemo.database.postgres.ExecutesPostgresSqlMixin, planemo.database.interface.DatabaseSource

Local postgres database source managed through psql application.

sqlalchemy_url(identifier)[source]

Return URL or form postgresql://username:password@localhost/mydatabase.

planemo.database.postgres_docker module

Module describes a DatabaseSource for managed, dockerized postgres databases.

class planemo.database.postgres_docker.DockerPostgresDatabaseSource(**kwds)[source]

Bases: planemo.database.postgres.ExecutesPostgresSqlMixin, planemo.database.interface.DatabaseSource

Postgres database running inside a Docker container.

sqlalchemy_url(identifier)[source]

Return URL or form postgresql://username:password@localhost/mydatabase.

Module contents

Package is responsible for managing planemo profile databases.

This package makes it very easy to create and destroy databases, therefore it should not be used for production data - and should not even be connnected to a production database server.

planemo.database.create_database_source(**kwds)[source]

Return a planemo.database.DatabaseSource for configuration.