planemo.database package

Submodules

planemo.database.factory module

Create a DatabaseSource from supplied planemo configuration.

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

Return a planemo.database.interface.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.

abstract create_database(identifier)[source]

Create a database with specified short identifier.

Throw an exception if it already exists.

abstract delete_database(identifier)[source]

Delete a database with specified short identifier.

Throw an exception if it already exists.

abstract list_databases()[source]

Return identifiers associated with database source.

abstract 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: ExecutesPostgresSqlMixin, 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: ExecutesPostgresSqlMixin, 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) DatabaseSource[source]

Return a planemo.database.interface.DatabaseSource for configuration.