beat.web.databases.models module

beat.web.databases.models.validate_database(declaration)[source]

Validates the declaration of a database JSON string

class beat.web.databases.models.DatabaseStorage(*args, **kwargs)[source]

Bases: beat.web.common.storage.OverwriteStorage

class beat.web.databases.models.DatabaseManager[source]

Bases: beat.web.common.models.VersionableManager

get_by_natural_key(name, version)[source]
create_database(name, short_description='', description='', declaration=None, code=None, version=1, previous_version=None)[source]

Convenience function to create a new database from its parts

class beat.web.databases.models.Database(id, sharing, name, version, short_description, creation_date, hash, previous_version, fork_of, declaration_file, description_file, source_code_file)[source]

Bases: beat.web.common.models.Versionable

declaration_file

The descriptor for the file attribute on the model instance. Returns a FieldFile when accessed so you can do stuff like:

>>> from myapp.models import MyModel
>>> instance = MyModel.objects.get(pk=1)
>>> instance.file.size

Assigns a file object on assignment so you can do:

>>> with open('/path/to/hello.world', 'r') as f:
...     instance.file = File(f)
description_file

The descriptor for the file attribute on the model instance. Returns a FieldFile when accessed so you can do stuff like:

>>> from myapp.models import MyModel
>>> instance = MyModel.objects.get(pk=1)
>>> instance.file.size

Assigns a file object on assignment so you can do:

>>> with open('/path/to/hello.world', 'r') as f:
...     instance.file = File(f)
source_code_file

The descriptor for the file attribute on the model instance. Returns a FieldFile when accessed so you can do stuff like:

>>> from myapp.models import MyModel
>>> instance = MyModel.objects.get(pk=1)
>>> instance.file.size

Assigns a file object on assignment so you can do:

>>> with open('/path/to/hello.world', 'r') as f:
...     instance.file = File(f)
objects = <beat.web.databases.models.DatabaseManager object>
get_absolute_url()[source]
natural_key()[source]
save(*args, **kwargs)[source]

Saves the current instance. Override this in a subclass if you want to control the saving process.

The ‘force_insert’ and ‘force_update’ parameters can be used to insist that the “save” must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set.

fullname()[source]
fullpath(extension)[source]
declaration_filename()[source]
description_filename()[source]
source_code_filename()[source]
all_referenced_dataformats()[source]
all_needed_dataformats()[source]
description
declaration
declaration_string
source_code
exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

fork_of

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

child.parent is a ForwardManyToOneDescriptor instance.

forks

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

get_next_by_creation_date(**morekwargs)
get_previous_by_creation_date(**morekwargs)
get_sharing_display(**morekwargs)
id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

next_versions

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

previous_version

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

child.parent is a ForwardManyToOneDescriptor instance.

protocols

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

shared_with

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

pizza.toppings and topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

shared_with_team

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

pizza.toppings and topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

class beat.web.databases.models.DatabaseProtocolManager[source]

Bases: django.db.models.manager.Manager

get_by_natural_key(database_name, database_version, name)[source]
class beat.web.databases.models.DatabaseProtocol(id, database, name)[source]

Bases: django.db.models.base.Model

objects = <beat.web.databases.models.DatabaseProtocolManager object>
database

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

child.parent is a ForwardManyToOneDescriptor instance.

name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

natural_key()[source]
fullname()[source]
all_referenced_dataformats()[source]
all_needed_dataformats()[source]
set_template_basename()[source]
exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

database_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

sets

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

class beat.web.databases.models.DatabaseSetTemplateManager[source]

Bases: django.db.models.manager.Manager

get_by_natural_key(name)[source]
class beat.web.databases.models.DatabaseSetTemplate(id, name)[source]

Bases: django.db.models.base.Model

objects = <beat.web.databases.models.DatabaseSetTemplateManager object>
name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

natural_key()[source]
exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

outputs

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

sets

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

class beat.web.databases.models.DatabaseSetManager[source]

Bases: django.db.models.manager.Manager

create(protocol, template, name)[source]

Creates a new object with the given kwargs, saving it to the database and returning the created object.

get_by_natural_key(database_name, database_version, protocol_name, name, template_name)[source]
class beat.web.databases.models.DatabaseSet(id, protocol, name, template, hash)[source]

Bases: django.db.models.base.Model

objects = <beat.web.databases.models.DatabaseSetManager object>
protocol

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

child.parent is a ForwardManyToOneDescriptor instance.

name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

template

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

child.parent is a ForwardManyToOneDescriptor instance.

hash

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

natural_key()[source]
fullname()[source]
all_referenced_dataformats()[source]
all_needed_dataformats()[source]
exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

experiments

Accessor to the related objects manager on the forward and reverse sides of a many-to-many relation.

In the example:

class Pizza(Model):
    toppings = ManyToManyField(Topping, related_name='pizzas')

pizza.toppings and topping.pizzas are ManyToManyDescriptor instances.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

outputs

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

protocol_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

template_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class beat.web.databases.models.DatabaseSetTemplateOutput(id, template, name, dataformat)[source]

Bases: django.db.models.base.Model

template

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

child.parent is a ForwardManyToOneDescriptor instance.

name

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

dataformat

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

child.parent is a ForwardManyToOneDescriptor instance.

fullname()[source]
exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

dataformat_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

instances

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

objects = <django.db.models.manager.Manager object>
template_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class beat.web.databases.models.DatabaseSetOutputManager[source]

Bases: django.db.models.manager.Manager

get_by_natural_key(set_natural_key, output_name)[source]
class beat.web.databases.models.DatabaseSetOutput(id, template, set)[source]

Bases: django.db.models.base.Model

template

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

child.parent is a ForwardManyToOneDescriptor instance.

set

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

child.parent is a ForwardManyToOneDescriptor instance.

objects = <beat.web.databases.models.DatabaseSetOutputManager object>
fullname()[source]
all_referenced_dataformats()[source]
all_needed_dataformats()[source]
natural_key()[source]
exception DoesNotExist

Bases: django.core.exceptions.ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: django.core.exceptions.MultipleObjectsReturned

blocks

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

set_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

template_id

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.