Properties

class mogwai.properties.base.BaseValueManager(graph_property, value, strategy=<class 'mogwai.properties.strategy.SaveAlways'>)

Value managers are used to manage values pulled from the database and track state changes.

These are useful for save strategies.

changed

Indicates whether or not this value has changed.

Return type:bool
deleted

Indicates whether or not this value has been deleted.

Return type:bool
delval()

Delete a given value

get_property()

Returns a value-managed property attributes

Return type:property
getval()

Return the current value.

previous_value
setval(val)

Updates the current value.

param val:The new value
class mogwai.properties.base.GraphProperty(description=None, primary_key=False, index=False, index_ext=None, db_field=None, choices=None, default=None, required=False, save_strategy=<class 'mogwai.properties.strategy.SaveAlways'>, unique=None, db_field_prefix=u'')

Base class for graph property types

can_delete
data_type = u'Object'
db_field_name

Returns the name of the mogwai name of this graph property

Return type:basestring | str
get_default()

Returns the default value for this graph property if one is available.

Return type:Object | None
get_save_strategy()

Returns the save strategy attached to this graph property.

Return type:Callable
classmethod get_value_from_choices(value, choices)

Returns the key for the choices tuple of tuples

Note if you are using classes, they must implement the __in__ and __eq__ for the logical comparison.

Parameters:value (Object) – The raw value to test if it exists in the valid choices. Could be the key or the value in the dict
Return type:Object
has_db_field_prefix

Determines if a field prefix has already been defined.

has_default

Indicates whether or not this graph property has a default value.

Return type:bool
instance_counter = 0
set_db_field_prefix(prefix, override=False)

Sets the graph property name prefix during document class construction.

set_property_name(name)

Sets the graph property name during document class construction.

This value will be ignored if db_field is set in __init__

Parameters:name (str) – The name of this graph property
should_save(first_save=False)

Indicates whether or not the property should be saved based on it’s save strategy.

Return type:bool
to_database(value)

Converts python value into database value

Return type:Object
to_python(value)

Converts data from the database into python values raises a ValidationError if the value can’t be converted

Return type:Object
validate(value)

Returns a cleaned and validated value. Raises a ValidationError if there’s a problem

Return type:Object
validator = <mogwai.properties.validators.BaseValidator object at 0x7f2b03db6ed0>
value_manager

alias of BaseValueManager

class mogwai.properties.properties.Boolean(description=None, primary_key=False, index=False, index_ext=None, db_field=None, choices=None, default=None, required=False, save_strategy=<class 'mogwai.properties.strategy.SaveAlways'>, unique=None, db_field_prefix=u'')

Boolean Data property type

can_delete
data_type = 'Boolean'
db_field_name

Returns the name of the mogwai name of this graph property

Return type:basestring | str
get_default()

Returns the default value for this graph property if one is available.

Return type:Object | None
get_save_strategy()

Returns the save strategy attached to this graph property.

Return type:Callable
classmethod get_value_from_choices(value, choices)

Returns the key for the choices tuple of tuples

Note if you are using classes, they must implement the __in__ and __eq__ for the logical comparison.

Parameters:value (Object) – The raw value to test if it exists in the valid choices. Could be the key or the value in the dict
Return type:Object
has_db_field_prefix

Determines if a field prefix has already been defined.

has_default

Indicates whether or not this graph property has a default value.

Return type:bool
instance_counter = 0
set_db_field_prefix(prefix, override=False)

Sets the graph property name prefix during document class construction.

set_property_name(name)

Sets the graph property name during document class construction.

This value will be ignored if db_field is set in __init__

Parameters:name (str) – The name of this graph property
should_save(first_save=False)

Indicates whether or not the property should be saved based on it’s save strategy.

Return type:bool
to_database(value)
to_python(value)
validate(value)

Returns a cleaned and validated value. Raises a ValidationError if there’s a problem

Return type:Object
validator = <mogwai.properties.validators.BooleanValidator object at 0x7f2b03db6f50>
value_manager

alias of BaseValueManager

class mogwai.properties.properties.DateTime(strict=True, **kwargs)

UTC DateTime Data property type

can_delete
data_type = 'Double'
db_field_name

Returns the name of the mogwai name of this graph property

Return type:basestring | str
get_default()

Returns the default value for this graph property if one is available.

Return type:Object | None
get_save_strategy()

Returns the save strategy attached to this graph property.

Return type:Callable
classmethod get_value_from_choices(value, choices)

Returns the key for the choices tuple of tuples

Note if you are using classes, they must implement the __in__ and __eq__ for the logical comparison.

Parameters:value (Object) – The raw value to test if it exists in the valid choices. Could be the key or the value in the dict
Return type:Object
has_db_field_prefix

Determines if a field prefix has already been defined.

has_default

Indicates whether or not this graph property has a default value.

Return type:bool
instance_counter = 0
set_db_field_prefix(prefix, override=False)

Sets the graph property name prefix during document class construction.

set_property_name(name)

Sets the graph property name during document class construction.

This value will be ignored if db_field is set in __init__

Parameters:name (str) – The name of this graph property
should_save(first_save=False)

Indicates whether or not the property should be saved based on it’s save strategy.

Return type:bool
to_database(value)
to_python(value)
validate(value)

Returns a cleaned and validated value. Raises a ValidationError if there’s a problem

Return type:Object
validator = <mogwai.properties.validators.DateTimeUTCValidator object at 0x7f2b03cc4510>
value_manager

alias of BaseValueManager

class mogwai.properties.properties.DateTimeNaive(strict=True, **kwargs)

DateTime Data property type

can_delete
data_type = 'Double'
db_field_name

Returns the name of the mogwai name of this graph property

Return type:basestring | str
get_default()

Returns the default value for this graph property if one is available.

Return type:Object | None
get_save_strategy()

Returns the save strategy attached to this graph property.

Return type:Callable
classmethod get_value_from_choices(value, choices)

Returns the key for the choices tuple of tuples

Note if you are using classes, they must implement the __in__ and __eq__ for the logical comparison.

Parameters:value (Object) – The raw value to test if it exists in the valid choices. Could be the key or the value in the dict
Return type:Object
has_db_field_prefix

Determines if a field prefix has already been defined.

has_default

Indicates whether or not this graph property has a default value.

Return type:bool
instance_counter = 0
set_db_field_prefix(prefix, override=False)

Sets the graph property name prefix during document class construction.

set_property_name(name)

Sets the graph property name during document class construction.

This value will be ignored if db_field is set in __init__

Parameters:name (str) – The name of this graph property
should_save(first_save=False)

Indicates whether or not the property should be saved based on it’s save strategy.

Return type:bool
to_database(value)
to_python(value)
validate(value)

Returns a cleaned and validated value. Raises a ValidationError if there’s a problem

Return type:Object
validator = <mogwai.properties.validators.DateTimeValidator object at 0x7f2b03cc4490>
value_manager

alias of BaseValueManager

class mogwai.properties.properties.Decimal(description=None, primary_key=False, index=False, index_ext=None, db_field=None, choices=None, default=None, required=False, save_strategy=<class 'mogwai.properties.strategy.SaveAlways'>, unique=None, db_field_prefix=u'')

Decimal Data property type

can_delete
data_type = u'Object'
db_field_name

Returns the name of the mogwai name of this graph property

Return type:basestring | str
get_default()

Returns the default value for this graph property if one is available.

Return type:Object | None
get_save_strategy()

Returns the save strategy attached to this graph property.

Return type:Callable
classmethod get_value_from_choices(value, choices)

Returns the key for the choices tuple of tuples

Note if you are using classes, they must implement the __in__ and __eq__ for the logical comparison.

Parameters:value (Object) – The raw value to test if it exists in the valid choices. Could be the key or the value in the dict
Return type:Object
has_db_field_prefix

Determines if a field prefix has already been defined.

has_default

Indicates whether or not this graph property has a default value.

Return type:bool
instance_counter = 0
set_db_field_prefix(prefix, override=False)

Sets the graph property name prefix during document class construction.

set_property_name(name)

Sets the graph property name during document class construction.

This value will be ignored if db_field is set in __init__

Parameters:name (str) – The name of this graph property
should_save(first_save=False)

Indicates whether or not the property should be saved based on it’s save strategy.

Return type:bool
to_database(value)
to_python(value)
validate(value)

Returns a cleaned and validated value. Raises a ValidationError if there’s a problem

Return type:Object
validator = <mogwai.properties.validators.DecimalValidator object at 0x7f2b03cc4150>
value_manager

alias of BaseValueManager

class mogwai.properties.properties.Dictionary(description=None, primary_key=False, index=False, index_ext=None, db_field=None, choices=None, default=None, required=False, save_strategy=<class 'mogwai.properties.strategy.SaveAlways'>, unique=None, db_field_prefix=u'')

Dictionary Data property type

can_delete
data_type = 'HashMap'
db_field_name

Returns the name of the mogwai name of this graph property

Return type:basestring | str
get_default()

Returns the default value for this graph property if one is available.

Return type:Object | None
get_save_strategy()

Returns the save strategy attached to this graph property.

Return type:Callable
classmethod get_value_from_choices(value, choices)

Returns the key for the choices tuple of tuples

Note if you are using classes, they must implement the __in__ and __eq__ for the logical comparison.

Parameters:value (Object) – The raw value to test if it exists in the valid choices. Could be the key or the value in the dict
Return type:Object
has_db_field_prefix

Determines if a field prefix has already been defined.

has_default

Indicates whether or not this graph property has a default value.

Return type:bool
instance_counter = 0
set_db_field_prefix(prefix, override=False)

Sets the graph property name prefix during document class construction.

set_property_name(name)

Sets the graph property name during document class construction.

This value will be ignored if db_field is set in __init__

Parameters:name (str) – The name of this graph property
should_save(first_save=False)

Indicates whether or not the property should be saved based on it’s save strategy.

Return type:bool
to_database(value)

Converts python value into database value

Return type:Object
to_python(value)

Converts data from the database into python values raises a ValidationError if the value can’t be converted

Return type:Object
validate(value)

Returns a cleaned and validated value. Raises a ValidationError if there’s a problem

Return type:Object
validator = <mogwai.properties.validators.DictValidator object at 0x7f2b03cc4410>
value_manager

alias of BaseValueManager

class mogwai.properties.properties.Double(**kwargs)

Double Data property type

can_delete
data_type = 'Double'
db_field_name

Returns the name of the mogwai name of this graph property

Return type:basestring | str
get_default()

Returns the default value for this graph property if one is available.

Return type:Object | None
get_save_strategy()

Returns the save strategy attached to this graph property.

Return type:Callable
classmethod get_value_from_choices(value, choices)

Returns the key for the choices tuple of tuples

Note if you are using classes, they must implement the __in__ and __eq__ for the logical comparison.

Parameters:value (Object) – The raw value to test if it exists in the valid choices. Could be the key or the value in the dict
Return type:Object
has_db_field_prefix

Determines if a field prefix has already been defined.

has_default

Indicates whether or not this graph property has a default value.

Return type:bool
instance_counter = 0
set_db_field_prefix(prefix, override=False)

Sets the graph property name prefix during document class construction.

set_property_name(name)

Sets the graph property name during document class construction.

This value will be ignored if db_field is set in __init__

Parameters:name (str) – The name of this graph property
should_save(first_save=False)

Indicates whether or not the property should be saved based on it’s save strategy.

Return type:bool
to_database(value)
to_python(value)
validate(value)

Returns a cleaned and validated value. Raises a ValidationError if there’s a problem

Return type:Object
validator = <mogwai.properties.validators.FloatValidator object at 0x7f2b03cc4090>
value_manager

alias of BaseValueManager

class mogwai.properties.properties.Email(*args, **kwargs)

Email Data property type

can_delete
data_type = 'String'
db_field_name

Returns the name of the mogwai name of this graph property

Return type:basestring | str
get_default()

Returns the default value for this graph property if one is available.

Return type:Object | None
get_save_strategy()

Returns the save strategy attached to this graph property.

Return type:Callable
classmethod get_value_from_choices(value, choices)

Returns the key for the choices tuple of tuples

Note if you are using classes, they must implement the __in__ and __eq__ for the logical comparison.

Parameters:value (Object) – The raw value to test if it exists in the valid choices. Could be the key or the value in the dict
Return type:Object
has_db_field_prefix

Determines if a field prefix has already been defined.

has_default

Indicates whether or not this graph property has a default value.

Return type:bool
instance_counter = 0
set_db_field_prefix(prefix, override=False)

Sets the graph property name prefix during document class construction.

set_property_name(name)

Sets the graph property name during document class construction.

This value will be ignored if db_field is set in __init__

Parameters:name (str) – The name of this graph property
should_save(first_save=False)

Indicates whether or not the property should be saved based on it’s save strategy.

Return type:bool
to_database(value)

Converts python value into database value

Return type:Object
to_python(value)

Converts data from the database into python values raises a ValidationError if the value can’t be converted

Return type:Object
validate(value)
validator = <mogwai.properties.validators.EmailValidator object at 0x7f2b03cc4610>
value_manager

alias of BaseValueManager

class mogwai.properties.properties.Float(**kwargs)

Float class for backwards compatability / if you really want to

can_delete
data_type = 'Double'
db_field_name

Returns the name of the mogwai name of this graph property

Return type:basestring | str
get_default()

Returns the default value for this graph property if one is available.

Return type:Object | None
get_save_strategy()

Returns the save strategy attached to this graph property.

Return type:Callable
classmethod get_value_from_choices(value, choices)

Returns the key for the choices tuple of tuples

Note if you are using classes, they must implement the __in__ and __eq__ for the logical comparison.

Parameters:value (Object) – The raw value to test if it exists in the valid choices. Could be the key or the value in the dict
Return type:Object
has_db_field_prefix

Determines if a field prefix has already been defined.

has_default

Indicates whether or not this graph property has a default value.

Return type:bool
instance_counter = 0
set_db_field_prefix(prefix, override=False)

Sets the graph property name prefix during document class construction.

set_property_name(name)

Sets the graph property name during document class construction.

This value will be ignored if db_field is set in __init__

Parameters:name (str) – The name of this graph property
should_save(first_save=False)

Indicates whether or not the property should be saved based on it’s save strategy.

Return type:bool
to_database(value)
to_python(value)
validate(value)

Returns a cleaned and validated value. Raises a ValidationError if there’s a problem

Return type:Object
validator = <mogwai.properties.validators.FloatValidator object at 0x7f2b03cc4090>
value_manager

alias of BaseValueManager

class mogwai.properties.properties.IPV4(*args, **kwargs)

IPv4 Data property type

can_delete
data_type = 'String'
db_field_name

Returns the name of the mogwai name of this graph property

Return type:basestring | str
get_default()

Returns the default value for this graph property if one is available.

Return type:Object | None
get_save_strategy()

Returns the save strategy attached to this graph property.

Return type:Callable
classmethod get_value_from_choices(value, choices)

Returns the key for the choices tuple of tuples

Note if you are using classes, they must implement the __in__ and __eq__ for the logical comparison.

Parameters:value (Object) – The raw value to test if it exists in the valid choices. Could be the key or the value in the dict
Return type:Object
has_db_field_prefix

Determines if a field prefix has already been defined.

has_default

Indicates whether or not this graph property has a default value.

Return type:bool
instance_counter = 0
set_db_field_prefix(prefix, override=False)

Sets the graph property name prefix during document class construction.

set_property_name(name)

Sets the graph property name during document class construction.

This value will be ignored if db_field is set in __init__

Parameters:name (str) – The name of this graph property
should_save(first_save=False)

Indicates whether or not the property should be saved based on it’s save strategy.

Return type:bool
to_database(value)

Converts python value into database value

Return type:Object
to_python(value)

Converts data from the database into python values raises a ValidationError if the value can’t be converted

Return type:Object
validate(value)
validator = <mogwai.properties.validators.RegexValidator object at 0x7f2b03cc46d0>
value_manager

alias of BaseValueManager

class mogwai.properties.properties.IPV6(*args, **kwargs)

IPv6 Data property type

can_delete
data_type = 'String'
db_field_name

Returns the name of the mogwai name of this graph property

Return type:basestring | str
get_default()

Returns the default value for this graph property if one is available.

Return type:Object | None
get_save_strategy()

Returns the save strategy attached to this graph property.

Return type:Callable
classmethod get_value_from_choices(value, choices)

Returns the key for the choices tuple of tuples

Note if you are using classes, they must implement the __in__ and __eq__ for the logical comparison.

Parameters:value (Object) – The raw value to test if it exists in the valid choices. Could be the key or the value in the dict
Return type:Object
has_db_field_prefix

Determines if a field prefix has already been defined.

has_default

Indicates whether or not this graph property has a default value.

Return type:bool
instance_counter = 0
set_db_field_prefix(prefix, override=False)

Sets the graph property name prefix during document class construction.

set_property_name(name)

Sets the graph property name during document class construction.

This value will be ignored if db_field is set in __init__

Parameters:name (str) – The name of this graph property
should_save(first_save=False)

Indicates whether or not the property should be saved based on it’s save strategy.

Return type:bool
to_database(value)

Converts python value into database value

Return type:Object
to_python(value)

Converts data from the database into python values raises a ValidationError if the value can’t be converted

Return type:Object
validate(value)
validator = <mogwai.properties.validators.RegexValidator object at 0x7f2b03cc4710>
value_manager

alias of BaseValueManager

class mogwai.properties.properties.IPV6WithV4(*args, **kwargs)

IPv6 with Mapped/Translated/Embedded IPv4 Data property type

can_delete
data_type = 'String'
db_field_name

Returns the name of the mogwai name of this graph property

Return type:basestring | str
get_default()

Returns the default value for this graph property if one is available.

Return type:Object | None
get_save_strategy()

Returns the save strategy attached to this graph property.

Return type:Callable
classmethod get_value_from_choices(value, choices)

Returns the key for the choices tuple of tuples

Note if you are using classes, they must implement the __in__ and __eq__ for the logical comparison.

Parameters:value (Object) – The raw value to test if it exists in the valid choices. Could be the key or the value in the dict
Return type:Object
has_db_field_prefix

Determines if a field prefix has already been defined.

has_default

Indicates whether or not this graph property has a default value.

Return type:bool
instance_counter = 0
set_db_field_prefix(prefix, override=False)

Sets the graph property name prefix during document class construction.

set_property_name(name)

Sets the graph property name during document class construction.

This value will be ignored if db_field is set in __init__

Parameters:name (str) – The name of this graph property
should_save(first_save=False)

Indicates whether or not the property should be saved based on it’s save strategy.

Return type:bool
to_database(value)

Converts python value into database value

Return type:Object
to_python(value)

Converts data from the database into python values raises a ValidationError if the value can’t be converted

Return type:Object
validate(value)
validator = <mogwai.properties.validators.RegexValidator object at 0x7f2b03cc4750>
value_manager

alias of BaseValueManager

class mogwai.properties.properties.Integer(description=None, primary_key=False, index=False, index_ext=None, db_field=None, choices=None, default=None, required=False, save_strategy=<class 'mogwai.properties.strategy.SaveAlways'>, unique=None, db_field_prefix=u'')

Integer Data property type

can_delete
data_type = 'Integer'
db_field_name

Returns the name of the mogwai name of this graph property

Return type:basestring | str
get_default()

Returns the default value for this graph property if one is available.

Return type:Object | None
get_save_strategy()

Returns the save strategy attached to this graph property.

Return type:Callable
classmethod get_value_from_choices(value, choices)

Returns the key for the choices tuple of tuples

Note if you are using classes, they must implement the __in__ and __eq__ for the logical comparison.

Parameters:value (Object) – The raw value to test if it exists in the valid choices. Could be the key or the value in the dict
Return type:Object
has_db_field_prefix

Determines if a field prefix has already been defined.

has_default

Indicates whether or not this graph property has a default value.

Return type:bool
instance_counter = 0
set_db_field_prefix(prefix, override=False)

Sets the graph property name prefix during document class construction.

set_property_name(name)

Sets the graph property name during document class construction.

This value will be ignored if db_field is set in __init__

Parameters:name (str) – The name of this graph property
should_save(first_save=False)

Indicates whether or not the property should be saved based on it’s save strategy.

Return type:bool
to_database(value)
to_python(value)
validate(value)

Returns a cleaned and validated value. Raises a ValidationError if there’s a problem

Return type:Object
validator = <mogwai.properties.validators.LongValidator object at 0x7f2b03cc4210>
value_manager

alias of BaseValueManager

class mogwai.properties.properties.List(description=None, primary_key=False, index=False, index_ext=None, db_field=None, choices=None, default=None, required=False, save_strategy=<class 'mogwai.properties.strategy.SaveAlways'>, unique=None, db_field_prefix=u'')

List Data property type

can_delete
data_type = 'ArrayList'
db_field_name

Returns the name of the mogwai name of this graph property

Return type:basestring | str
get_default()

Returns the default value for this graph property if one is available.

Return type:Object | None
get_save_strategy()

Returns the save strategy attached to this graph property.

Return type:Callable
classmethod get_value_from_choices(value, choices)

Returns the key for the choices tuple of tuples

Note if you are using classes, they must implement the __in__ and __eq__ for the logical comparison.

Parameters:value (Object) – The raw value to test if it exists in the valid choices. Could be the key or the value in the dict
Return type:Object
has_db_field_prefix

Determines if a field prefix has already been defined.

has_default

Indicates whether or not this graph property has a default value.

Return type:bool
instance_counter = 0
set_db_field_prefix(prefix, override=False)

Sets the graph property name prefix during document class construction.

set_property_name(name)

Sets the graph property name during document class construction.

This value will be ignored if db_field is set in __init__

Parameters:name (str) – The name of this graph property
should_save(first_save=False)

Indicates whether or not the property should be saved based on it’s save strategy.

Return type:bool
to_database(value)

Converts python value into database value

Return type:Object
to_python(value)

Converts data from the database into python values raises a ValidationError if the value can’t be converted

Return type:Object
validate(value)

Returns a cleaned and validated value. Raises a ValidationError if there’s a problem

Return type:Object
validator = <mogwai.properties.validators.ListValidator object at 0x7f2b03cc4390>
value_manager

alias of BaseValueManager

class mogwai.properties.properties.Long(description=None, primary_key=False, index=False, index_ext=None, db_field=None, choices=None, default=None, required=False, save_strategy=<class 'mogwai.properties.strategy.SaveAlways'>, unique=None, db_field_prefix=u'')

Long Data property type

can_delete
data_type = 'Long'
db_field_name

Returns the name of the mogwai name of this graph property

Return type:basestring | str
get_default()

Returns the default value for this graph property if one is available.

Return type:Object | None
get_save_strategy()

Returns the save strategy attached to this graph property.

Return type:Callable
classmethod get_value_from_choices(value, choices)

Returns the key for the choices tuple of tuples

Note if you are using classes, they must implement the __in__ and __eq__ for the logical comparison.

Parameters:value (Object) – The raw value to test if it exists in the valid choices. Could be the key or the value in the dict
Return type:Object
has_db_field_prefix

Determines if a field prefix has already been defined.

has_default

Indicates whether or not this graph property has a default value.

Return type:bool
instance_counter = 0
set_db_field_prefix(prefix, override=False)

Sets the graph property name prefix during document class construction.

set_property_name(name)

Sets the graph property name during document class construction.

This value will be ignored if db_field is set in __init__

Parameters:name (str) – The name of this graph property
should_save(first_save=False)

Indicates whether or not the property should be saved based on it’s save strategy.

Return type:bool
to_database(value)
to_python(value)
validate(value)

Returns a cleaned and validated value. Raises a ValidationError if there’s a problem

Return type:Object
validator = <mogwai.properties.validators.LongValidator object at 0x7f2b03cc4210>
value_manager

alias of BaseValueManager

class mogwai.properties.properties.PositiveInteger(description=None, primary_key=False, index=False, index_ext=None, db_field=None, choices=None, default=None, required=False, save_strategy=<class 'mogwai.properties.strategy.SaveAlways'>, unique=None, db_field_prefix=u'')

Positive Integer Data property type

can_delete
data_type = 'Integer'
db_field_name

Returns the name of the mogwai name of this graph property

Return type:basestring | str
get_default()

Returns the default value for this graph property if one is available.

Return type:Object | None
get_save_strategy()

Returns the save strategy attached to this graph property.

Return type:Callable
classmethod get_value_from_choices(value, choices)

Returns the key for the choices tuple of tuples

Note if you are using classes, they must implement the __in__ and __eq__ for the logical comparison.

Parameters:value (Object) – The raw value to test if it exists in the valid choices. Could be the key or the value in the dict
Return type:Object
has_db_field_prefix

Determines if a field prefix has already been defined.

has_default

Indicates whether or not this graph property has a default value.

Return type:bool
instance_counter = 0
set_db_field_prefix(prefix, override=False)

Sets the graph property name prefix during document class construction.

set_property_name(name)

Sets the graph property name during document class construction.

This value will be ignored if db_field is set in __init__

Parameters:name (str) – The name of this graph property
should_save(first_save=False)

Indicates whether or not the property should be saved based on it’s save strategy.

Return type:bool
to_database(value)
to_python(value)
validate(value)

Returns a cleaned and validated value. Raises a ValidationError if there’s a problem

Return type:Object
validator = <mogwai.properties.validators.PositiveIntegerValidator object at 0x7f2b03cc4290>
value_manager

alias of BaseValueManager

class mogwai.properties.properties.PositiveLong(description=None, primary_key=False, index=False, index_ext=None, db_field=None, choices=None, default=None, required=False, save_strategy=<class 'mogwai.properties.strategy.SaveAlways'>, unique=None, db_field_prefix=u'')

Positive Long Data property type

can_delete
data_type = 'Long'
db_field_name

Returns the name of the mogwai name of this graph property

Return type:basestring | str
get_default()

Returns the default value for this graph property if one is available.

Return type:Object | None
get_save_strategy()

Returns the save strategy attached to this graph property.

Return type:Callable
classmethod get_value_from_choices(value, choices)

Returns the key for the choices tuple of tuples

Note if you are using classes, they must implement the __in__ and __eq__ for the logical comparison.

Parameters:value (Object) – The raw value to test if it exists in the valid choices. Could be the key or the value in the dict
Return type:Object
has_db_field_prefix

Determines if a field prefix has already been defined.

has_default

Indicates whether or not this graph property has a default value.

Return type:bool
instance_counter = 0
set_db_field_prefix(prefix, override=False)

Sets the graph property name prefix during document class construction.

set_property_name(name)

Sets the graph property name during document class construction.

This value will be ignored if db_field is set in __init__

Parameters:name (str) – The name of this graph property
should_save(first_save=False)

Indicates whether or not the property should be saved based on it’s save strategy.

Return type:bool
to_database(value)
to_python(value)
validate(value)

Returns a cleaned and validated value. Raises a ValidationError if there’s a problem

Return type:Object
validator = <mogwai.properties.validators.PositiveIntegerValidator object at 0x7f2b03cc4290>
value_manager

alias of BaseValueManager

class mogwai.properties.properties.Short(description=None, primary_key=False, index=False, index_ext=None, db_field=None, choices=None, default=None, required=False, save_strategy=<class 'mogwai.properties.strategy.SaveAlways'>, unique=None, db_field_prefix=u'')

Short Data property type

can_delete
data_type = 'Short'
db_field_name

Returns the name of the mogwai name of this graph property

Return type:basestring | str
get_default()

Returns the default value for this graph property if one is available.

Return type:Object | None
get_save_strategy()

Returns the save strategy attached to this graph property.

Return type:Callable
classmethod get_value_from_choices(value, choices)

Returns the key for the choices tuple of tuples

Note if you are using classes, they must implement the __in__ and __eq__ for the logical comparison.

Parameters:value (Object) – The raw value to test if it exists in the valid choices. Could be the key or the value in the dict
Return type:Object
has_db_field_prefix

Determines if a field prefix has already been defined.

has_default

Indicates whether or not this graph property has a default value.

Return type:bool
instance_counter = 0
set_db_field_prefix(prefix, override=False)

Sets the graph property name prefix during document class construction.

set_property_name(name)

Sets the graph property name during document class construction.

This value will be ignored if db_field is set in __init__

Parameters:name (str) – The name of this graph property
should_save(first_save=False)

Indicates whether or not the property should be saved based on it’s save strategy.

Return type:bool
to_database(value)
to_python(value)
validate(value)

Returns a cleaned and validated value. Raises a ValidationError if there’s a problem

Return type:Object
validator = <mogwai.properties.validators.IntegerValidator object at 0x7f2b03cc4190>
value_manager

alias of BaseValueManager

class mogwai.properties.properties.Slug(*args, **kwargs)

Slug Data property type

can_delete
data_type = 'String'
db_field_name

Returns the name of the mogwai name of this graph property

Return type:basestring | str
get_default()

Returns the default value for this graph property if one is available.

Return type:Object | None
get_save_strategy()

Returns the save strategy attached to this graph property.

Return type:Callable
classmethod get_value_from_choices(value, choices)

Returns the key for the choices tuple of tuples

Note if you are using classes, they must implement the __in__ and __eq__ for the logical comparison.

Parameters:value (Object) – The raw value to test if it exists in the valid choices. Could be the key or the value in the dict
Return type:Object
has_db_field_prefix

Determines if a field prefix has already been defined.

has_default

Indicates whether or not this graph property has a default value.

Return type:bool
instance_counter = 0
set_db_field_prefix(prefix, override=False)

Sets the graph property name prefix during document class construction.

set_property_name(name)

Sets the graph property name during document class construction.

This value will be ignored if db_field is set in __init__

Parameters:name (str) – The name of this graph property
should_save(first_save=False)

Indicates whether or not the property should be saved based on it’s save strategy.

Return type:bool
to_database(value)

Converts python value into database value

Return type:Object
to_python(value)

Converts data from the database into python values raises a ValidationError if the value can’t be converted

Return type:Object
validate(value)
validator = <mogwai.properties.validators.RegexValidator object at 0x7f2b03cc4690>
value_manager

alias of BaseValueManager

class mogwai.properties.properties.String(*args, **kwargs)

String/CharField property

can_delete
data_type = 'String'
db_field_name

Returns the name of the mogwai name of this graph property

Return type:basestring | str
get_default()

Returns the default value for this graph property if one is available.

Return type:Object | None
get_save_strategy()

Returns the save strategy attached to this graph property.

Return type:Callable
classmethod get_value_from_choices(value, choices)

Returns the key for the choices tuple of tuples

Note if you are using classes, they must implement the __in__ and __eq__ for the logical comparison.

Parameters:value (Object) – The raw value to test if it exists in the valid choices. Could be the key or the value in the dict
Return type:Object
has_db_field_prefix

Determines if a field prefix has already been defined.

has_default

Indicates whether or not this graph property has a default value.

Return type:bool
instance_counter = 0
set_db_field_prefix(prefix, override=False)

Sets the graph property name prefix during document class construction.

set_property_name(name)

Sets the graph property name during document class construction.

This value will be ignored if db_field is set in __init__

Parameters:name (str) – The name of this graph property
should_save(first_save=False)

Indicates whether or not the property should be saved based on it’s save strategy.

Return type:bool
to_database(value)

Converts python value into database value

Return type:Object
to_python(value)
validate(value)
validator = <mogwai.properties.validators.StringValidator object at 0x7f2b03cc4310>
value_manager

alias of BaseValueManager

mogwai.properties.properties.Text

alias of String

class mogwai.properties.properties.URL(*args, **kwargs)

URL Data property type

can_delete
data_type = 'String'
db_field_name

Returns the name of the mogwai name of this graph property

Return type:basestring | str
get_default()

Returns the default value for this graph property if one is available.

Return type:Object | None
get_save_strategy()

Returns the save strategy attached to this graph property.

Return type:Callable
classmethod get_value_from_choices(value, choices)

Returns the key for the choices tuple of tuples

Note if you are using classes, they must implement the __in__ and __eq__ for the logical comparison.

Parameters:value (Object) – The raw value to test if it exists in the valid choices. Could be the key or the value in the dict
Return type:Object
has_db_field_prefix

Determines if a field prefix has already been defined.

has_default

Indicates whether or not this graph property has a default value.

Return type:bool
instance_counter = 0
set_db_field_prefix(prefix, override=False)

Sets the graph property name prefix during document class construction.

set_property_name(name)

Sets the graph property name during document class construction.

This value will be ignored if db_field is set in __init__

Parameters:name (str) – The name of this graph property
should_save(first_save=False)

Indicates whether or not the property should be saved based on it’s save strategy.

Return type:bool
to_database(value)

Converts python value into database value

Return type:Object
to_python(value)

Converts data from the database into python values raises a ValidationError if the value can’t be converted

Return type:Object
validate(value)
validator = <mogwai.properties.validators.URLValidator object at 0x7f2b03cc4790>
value_manager

alias of BaseValueManager

class mogwai.properties.properties.UUID(default=<function <lambda> at 0x7f2b03cd1320>, **kwargs)

Universally Unique Identifier (UUID) type - UUID4 by default

can_delete
data_type = 'String'
db_field_name

Returns the name of the mogwai name of this graph property

Return type:basestring | str
get_default()

Returns the default value for this graph property if one is available.

Return type:Object | None
get_save_strategy()

Returns the save strategy attached to this graph property.

Return type:Callable
classmethod get_value_from_choices(value, choices)

Returns the key for the choices tuple of tuples

Note if you are using classes, they must implement the __in__ and __eq__ for the logical comparison.

Parameters:value (Object) – The raw value to test if it exists in the valid choices. Could be the key or the value in the dict
Return type:Object
has_db_field_prefix

Determines if a field prefix has already been defined.

has_default

Indicates whether or not this graph property has a default value.

Return type:bool
instance_counter = 0
set_db_field_prefix(prefix, override=False)

Sets the graph property name prefix during document class construction.

set_property_name(name)

Sets the graph property name during document class construction.

This value will be ignored if db_field is set in __init__

Parameters:name (str) – The name of this graph property
should_save(first_save=False)

Indicates whether or not the property should be saved based on it’s save strategy.

Return type:bool
to_database(value)
to_python(value)
validate(value)

Returns a cleaned and validated value. Raises a ValidationError if there’s a problem

Return type:Object
validator = <mogwai.properties.validators.RegexValidator object at 0x7f2b03cc4810>
value_manager

alias of BaseValueManager