hyperstream.models package

Submodules

hyperstream.models.factor module

class hyperstream.models.factor.FactorDefinitionModel(*args, **kwargs)[source]

Bases: mongoengine.document.EmbeddedDocument

sink

A unicode string field.

sources

A list field that wraps a standard field, allowing multiple instances of the field to be used as a list in the database.

If using with ReferenceFields see: one-to-many-with-listfields

Note

Required means it cannot be empty - as the default for ListFields is []

tool

An embedded document field - with a declared document_type. Only valid values are subclasses of EmbeddedDocument.

hyperstream.models.node module

class hyperstream.models.node.NodeDefinitionModel(*args, **kwargs)[source]

Bases: mongoengine.document.EmbeddedDocument

channel_id

A unicode string field.

plate_ids

A list field that wraps a standard field, allowing multiple instances of the field to be used as a list in the database.

If using with ReferenceFields see: one-to-many-with-listfields

Note

Required means it cannot be empty - as the default for ListFields is []

stream_name

A unicode string field.

hyperstream.models.plate module

class hyperstream.models.plate.PlateDefinitionModel(*args, **values)[source]

Bases: mongoengine.document.Document

exception DoesNotExist

Bases: mongoengine.errors.DoesNotExist

exception PlateDefinitionModel.MultipleObjectsReturned

Bases: mongoengine.errors.MultipleObjectsReturned

PlateDefinitionModel.complement

A boolean field type.

New in version 0.1.2.

PlateDefinitionModel.description

A unicode string field.

PlateDefinitionModel.id

A field wrapper around MongoDB’s ObjectIds.

PlateDefinitionModel.meta_data_id

A unicode string field.

PlateDefinitionModel.objects

The default QuerySet Manager.

Custom QuerySet Manager functions can extend this class and users can add extra queryset functionality. Any custom manager methods must accept a Document class as its first argument, and a QuerySet as its second argument.

The method function should return a QuerySet , probably the same one that was passed in, but modified in some way.

PlateDefinitionModel.parent_plate

A unicode string field.

PlateDefinitionModel.plate_id

A unicode string field.

PlateDefinitionModel.values

A list field that wraps a standard field, allowing multiple instances of the field to be used as a list in the database.

If using with ReferenceFields see: one-to-many-with-listfields

Note

Required means it cannot be empty - as the default for ListFields is []

class hyperstream.models.plate.PlateModel(*args, **kwargs)[source]

Bases: mongoengine.document.EmbeddedDocument

complement

A boolean field type.

New in version 0.1.2.

meta_data_id

A unicode string field.

values

A list field that wraps a standard field, allowing multiple instances of the field to be used as a list in the database.

If using with ReferenceFields see: one-to-many-with-listfields

Note

Required means it cannot be empty - as the default for ListFields is []

hyperstream.models.stream module

class hyperstream.models.stream.StreamDefinitionModel(*args, **values)[source]

Bases: mongoengine.document.Document

exception DoesNotExist

Bases: mongoengine.errors.DoesNotExist

exception StreamDefinitionModel.MultipleObjectsReturned

Bases: mongoengine.errors.MultipleObjectsReturned

StreamDefinitionModel.channel_id

A unicode string field.

StreamDefinitionModel.id

A field wrapper around MongoDB’s ObjectIds.

StreamDefinitionModel.objects

The default QuerySet Manager.

Custom QuerySet Manager functions can extend this class and users can add extra queryset functionality. Any custom manager methods must accept a Document class as its first argument, and a QuerySet as its second argument.

The method function should return a QuerySet , probably the same one that was passed in, but modified in some way.

StreamDefinitionModel.sandbox

A unicode string field.

StreamDefinitionModel.stream_id

An embedded document field - with a declared document_type. Only valid values are subclasses of EmbeddedDocument.

StreamDefinitionModel.stream_type

A unicode string field.

class hyperstream.models.stream.StreamIdField(*args, **kwargs)[source]

Bases: mongoengine.document.EmbeddedDocument

meta_data

A dictionary field that wraps a standard Python dictionary. This is similar to an embedded document, but the structure is not defined.

Note

Required means it cannot be empty - as the default for DictFields is {}

New in version 0.3.

Changed in version 0.5: - Can now handle complex / varying types of data

name

A unicode string field.

class hyperstream.models.stream.StreamInstanceModel(*args, **values)[source]

Bases: mongoengine.document.Document

exception DoesNotExist

Bases: mongoengine.errors.DoesNotExist

exception StreamInstanceModel.MultipleObjectsReturned

Bases: mongoengine.errors.MultipleObjectsReturned

StreamInstanceModel.datetime

A datetime field.

Uses the python-dateutil library if available alternatively use time.strptime to parse the dates. Note: python-dateutil’s parser is fully featured and when installed you can utilise it to convert varying types of date formats into valid python datetime objects.

Note: Microseconds are rounded to the nearest millisecond.
Pre UTC microsecond support is effectively broken. Use ComplexDateTimeField if you need accurate microsecond support.
StreamInstanceModel.id

A field wrapper around MongoDB’s ObjectIds.

StreamInstanceModel.objects

The default QuerySet Manager.

Custom QuerySet Manager functions can extend this class and users can add extra queryset functionality. Any custom manager methods must accept a Document class as its first argument, and a QuerySet as its second argument.

The method function should return a QuerySet , probably the same one that was passed in, but modified in some way.

StreamInstanceModel.stream_id

An embedded document field - with a declared document_type. Only valid values are subclasses of EmbeddedDocument.

StreamInstanceModel.stream_type

A unicode string field.

StreamInstanceModel.value

A truly dynamic field type capable of handling different and varying types of data.

Used by DynamicDocument to handle dynamic data

class hyperstream.models.stream.StreamStatusModel(*args, **values)[source]

Bases: mongoengine.document.Document

Stream status model Note that the calculated intervals is not required, since at first instantiation it is empty, so is equally represented by None or an empty list

exception DoesNotExist

Bases: mongoengine.errors.DoesNotExist

exception StreamStatusModel.MultipleObjectsReturned

Bases: mongoengine.errors.MultipleObjectsReturned

StreamStatusModel.calculated_intervals

A ListField designed specially to hold a list of embedded documents to provide additional query helpers.

Note

The only valid list values are subclasses of EmbeddedDocument.

New in version 0.9.

StreamStatusModel.id

A field wrapper around MongoDB’s ObjectIds.

StreamStatusModel.last_accessed

A datetime field.

Uses the python-dateutil library if available alternatively use time.strptime to parse the dates. Note: python-dateutil’s parser is fully featured and when installed you can utilise it to convert varying types of date formats into valid python datetime objects.

Note: Microseconds are rounded to the nearest millisecond.
Pre UTC microsecond support is effectively broken. Use ComplexDateTimeField if you need accurate microsecond support.
StreamStatusModel.last_updated

A datetime field.

Uses the python-dateutil library if available alternatively use time.strptime to parse the dates. Note: python-dateutil’s parser is fully featured and when installed you can utilise it to convert varying types of date formats into valid python datetime objects.

Note: Microseconds are rounded to the nearest millisecond.
Pre UTC microsecond support is effectively broken. Use ComplexDateTimeField if you need accurate microsecond support.
StreamStatusModel.objects

The default QuerySet Manager.

Custom QuerySet Manager functions can extend this class and users can add extra queryset functionality. Any custom manager methods must accept a Document class as its first argument, and a QuerySet as its second argument.

The method function should return a QuerySet , probably the same one that was passed in, but modified in some way.

StreamStatusModel.stream_id

An embedded document field - with a declared document_type. Only valid values are subclasses of EmbeddedDocument.

hyperstream.models.time_interval module

class hyperstream.models.time_interval.TimeIntervalModel(*args, **kwargs)[source]

Bases: mongoengine.document.EmbeddedDocument

end

A datetime field.

Uses the python-dateutil library if available alternatively use time.strptime to parse the dates. Note: python-dateutil’s parser is fully featured and when installed you can utilise it to convert varying types of date formats into valid python datetime objects.

Note: Microseconds are rounded to the nearest millisecond.
Pre UTC microsecond support is effectively broken. Use ComplexDateTimeField if you need accurate microsecond support.
start

A datetime field.

Uses the python-dateutil library if available alternatively use time.strptime to parse the dates. Note: python-dateutil’s parser is fully featured and when installed you can utilise it to convert varying types of date formats into valid python datetime objects.

Note: Microseconds are rounded to the nearest millisecond.
Pre UTC microsecond support is effectively broken. Use ComplexDateTimeField if you need accurate microsecond support.
class hyperstream.models.time_interval.TimeRangeListModel(document_type, **kwargs)[source]

Bases: mongoengine.fields.EmbeddedDocumentListField

add_time_interval(time_interval)[source]
update_time_intervals()[source]

hyperstream.models.tool module

class hyperstream.models.tool.ToolModel(*args, **kwargs)[source]

Bases: mongoengine.document.EmbeddedDocument

name

A unicode string field.

parameters

A dictionary field that wraps a standard Python dictionary. This is similar to an embedded document, but the structure is not defined.

Note

Required means it cannot be empty - as the default for DictFields is {}

New in version 0.3.

Changed in version 0.5: - Can now handle complex / varying types of data

version

A unicode string field.

hyperstream.models.workflow module

class hyperstream.models.workflow.WorkflowDefinitionModel(*args, **values)[source]

Bases: mongoengine.document.Document

exception DoesNotExist

Bases: mongoengine.errors.DoesNotExist

exception WorkflowDefinitionModel.MultipleObjectsReturned

Bases: mongoengine.errors.MultipleObjectsReturned

WorkflowDefinitionModel.description

A unicode string field.

WorkflowDefinitionModel.factors

A ListField designed specially to hold a list of embedded documents to provide additional query helpers.

Note

The only valid list values are subclasses of EmbeddedDocument.

New in version 0.9.

WorkflowDefinitionModel.id

A field wrapper around MongoDB’s ObjectIds.

WorkflowDefinitionModel.name

A unicode string field.

WorkflowDefinitionModel.nodes

A ListField designed specially to hold a list of embedded documents to provide additional query helpers.

Note

The only valid list values are subclasses of EmbeddedDocument.

New in version 0.9.

WorkflowDefinitionModel.objects

The default QuerySet Manager.

Custom QuerySet Manager functions can extend this class and users can add extra queryset functionality. Any custom manager methods must accept a Document class as its first argument, and a QuerySet as its second argument.

The method function should return a QuerySet , probably the same one that was passed in, but modified in some way.

WorkflowDefinitionModel.owner

A unicode string field.

WorkflowDefinitionModel.workflow_id

A unicode string field.

class hyperstream.models.workflow.WorkflowStatusModel(*args, **values)[source]

Bases: mongoengine.document.Document

exception DoesNotExist

Bases: mongoengine.errors.DoesNotExist

exception WorkflowStatusModel.MultipleObjectsReturned

Bases: mongoengine.errors.MultipleObjectsReturned

WorkflowStatusModel.add_time_interval(time_interval)[source]
WorkflowStatusModel.calculated_intervals

A ListField designed specially to hold a list of embedded documents to provide additional query helpers.

Note

The only valid list values are subclasses of EmbeddedDocument.

New in version 0.9.

WorkflowStatusModel.id

A field wrapper around MongoDB’s ObjectIds.

WorkflowStatusModel.last_accessed

A datetime field.

Uses the python-dateutil library if available alternatively use time.strptime to parse the dates. Note: python-dateutil’s parser is fully featured and when installed you can utilise it to convert varying types of date formats into valid python datetime objects.

Note: Microseconds are rounded to the nearest millisecond.
Pre UTC microsecond support is effectively broken. Use ComplexDateTimeField if you need accurate microsecond support.
WorkflowStatusModel.last_updated

A datetime field.

Uses the python-dateutil library if available alternatively use time.strptime to parse the dates. Note: python-dateutil’s parser is fully featured and when installed you can utilise it to convert varying types of date formats into valid python datetime objects.

Note: Microseconds are rounded to the nearest millisecond.
Pre UTC microsecond support is effectively broken. Use ComplexDateTimeField if you need accurate microsecond support.
WorkflowStatusModel.objects

The default QuerySet Manager.

Custom QuerySet Manager functions can extend this class and users can add extra queryset functionality. Any custom manager methods must accept a Document class as its first argument, and a QuerySet as its second argument.

The method function should return a QuerySet , probably the same one that was passed in, but modified in some way.

WorkflowStatusModel.requested_intervals

A ListField designed specially to hold a list of embedded documents to provide additional query helpers.

Note

The only valid list values are subclasses of EmbeddedDocument.

New in version 0.9.

WorkflowStatusModel.stream_id

A unicode string field.

WorkflowStatusModel.update_time_intervals()[source]

Module contents