dropbox.file_properties – File Properties

This namespace contains helpers for property and template metadata endpoints.

These endpoints enable you to tag arbitrary key/value data to Dropbox files.

The most basic unit in this namespace is the PropertyField. These fields encapsulate the actual key/value data.

Fields are added to a Dropbox file using a PropertyGroup. Property groups contain a reference to a Dropbox file and a PropertyGroupTemplate. Property groups are uniquely identified by the combination of their associated Dropbox file and template.

The PropertyGroupTemplate is a way of restricting the possible key names and value types of the data within a property group. The possible key names and value types are explicitly enumerated using PropertyFieldTemplate objects.

You can think of a property group template as a class definition for a particular key/value metadata object, and the property groups themselves as the instantiations of these objects.

Templates are owned either by a user/app pair or team/app pair. Templates and their associated properties can’t be accessed by any app other than the app that created them, and even then, only when the app is linked with the owner of the template (either a user or team).

User-owned templates are accessed via the user-auth file_properties/templates/_for_user endpoints, while team-owned templates are accessed via the team-auth file_properties/templates/*_for_team endpoints. Properties associated with either type of template can be accessed via the user-auth properties/ endpoints.

Finally, properties can be accessed from a number of endpoints that return metadata, including files/get_metadata, and files/list_folder. Properties can also be added during upload, using files/upload.

class dropbox.file_properties.AddPropertiesArg(path=None, property_groups=None)

Bases: stone.backends.python_rsrc.stone_base.Struct

Variables:
__init__(path=None, property_groups=None)

x.__init__(…) initializes x; see help(type(x)) for signature

path
property_groups
class dropbox.file_properties.AddPropertiesError(tag, value=None)

Bases: dropbox.file_properties.InvalidPropertyGroupError

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:file_properties.AddPropertiesError.property_group_already_exists – A property group associated with this template and file already exists.
is_property_group_already_exists()

Check if the union tag is property_group_already_exists.

Return type:bool
property_group_already_exists = AddPropertiesError(u'property_group_already_exists', None)
class dropbox.file_properties.AddTemplateArg(name=None, description=None, fields=None)

Bases: dropbox.file_properties.PropertyGroupTemplate

__init__(name=None, description=None, fields=None)

x.__init__(…) initializes x; see help(type(x)) for signature

class dropbox.file_properties.AddTemplateResult(template_id=None)

Bases: stone.backends.python_rsrc.stone_base.Struct

Variables:file_properties.AddTemplateResult.template_id – An identifier for template added by See dropbox.dropbox_client.Dropbox.file_properties_templates_add_for_user() or dropbox.dropbox_client.Dropbox.file_properties_templates_add_for_team().
__init__(template_id=None)

x.__init__(…) initializes x; see help(type(x)) for signature

template_id
class dropbox.file_properties.GetTemplateArg(template_id=None)

Bases: stone.backends.python_rsrc.stone_base.Struct

Variables:file_properties.GetTemplateArg.template_id – An identifier for template added by route See dropbox.dropbox_client.Dropbox.file_properties_templates_add_for_user() or dropbox.dropbox_client.Dropbox.file_properties_templates_add_for_team().
__init__(template_id=None)

x.__init__(…) initializes x; see help(type(x)) for signature

template_id
class dropbox.file_properties.GetTemplateResult(name=None, description=None, fields=None)

Bases: dropbox.file_properties.PropertyGroupTemplate

__init__(name=None, description=None, fields=None)

x.__init__(…) initializes x; see help(type(x)) for signature

class dropbox.file_properties.InvalidPropertyGroupError(tag, value=None)

Bases: dropbox.file_properties.PropertiesError

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
does_not_fit_template = InvalidPropertyGroupError(u'does_not_fit_template', None)
duplicate_property_groups = InvalidPropertyGroupError(u'duplicate_property_groups', None)
is_does_not_fit_template()

Check if the union tag is does_not_fit_template.

Return type:bool
is_duplicate_property_groups()

Check if the union tag is duplicate_property_groups.

Return type:bool
is_property_field_too_large()

Check if the union tag is property_field_too_large.

Return type:bool
property_field_too_large = InvalidPropertyGroupError(u'property_field_too_large', None)
class dropbox.file_properties.ListTemplateResult(template_ids=None)

Bases: stone.backends.python_rsrc.stone_base.Struct

Variables:file_properties.ListTemplateResult.template_ids – List of identifiers for templates added by See dropbox.dropbox_client.Dropbox.file_properties_templates_add_for_user() or dropbox.dropbox_client.Dropbox.file_properties_templates_add_for_team().
__init__(template_ids=None)

x.__init__(…) initializes x; see help(type(x)) for signature

template_ids
class dropbox.file_properties.LogicalOperator(tag, value=None)

Bases: stone.backends.python_rsrc.stone_base.Union

Logical operator to join search queries together.

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:file_properties.LogicalOperator.or_operator – Append a query with an “or” operator.
is_or_operator()

Check if the union tag is or_operator.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
or_operator = LogicalOperator(u'or_operator', None)
other = LogicalOperator(u'other', None)
class dropbox.file_properties.LookUpPropertiesError(tag, value=None)

Bases: stone.backends.python_rsrc.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:file_properties.LookUpPropertiesError.property_group_not_found – No property group was found.
is_other()

Check if the union tag is other.

Return type:bool
is_property_group_not_found()

Check if the union tag is property_group_not_found.

Return type:bool
other = LookUpPropertiesError(u'other', None)
property_group_not_found = LookUpPropertiesError(u'property_group_not_found', None)
class dropbox.file_properties.LookupError(tag, value=None)

Bases: stone.backends.python_rsrc.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
get_malformed_path()

Only call this if is_malformed_path() is true.

Return type:str
is_malformed_path()

Check if the union tag is malformed_path.

Return type:bool
is_not_file()

Check if the union tag is not_file.

Return type:bool
is_not_folder()

Check if the union tag is not_folder.

Return type:bool
is_not_found()

Check if the union tag is not_found.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
is_restricted_content()

Check if the union tag is restricted_content.

Return type:bool
classmethod malformed_path(val)

Create an instance of this class set to the malformed_path tag with value val.

Parameters:val (str) –
Return type:LookupError
not_file = LookupError(u'not_file', None)
not_folder = LookupError(u'not_folder', None)
not_found = LookupError(u'not_found', None)
other = LookupError(u'other', None)
restricted_content = LookupError(u'restricted_content', None)
class dropbox.file_properties.ModifyTemplateError(tag, value=None)

Bases: dropbox.file_properties.TemplateError

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
conflicting_property_names = ModifyTemplateError(u'conflicting_property_names', None)
is_conflicting_property_names()

Check if the union tag is conflicting_property_names.

Return type:bool
is_template_attribute_too_large()

Check if the union tag is template_attribute_too_large.

Return type:bool
is_too_many_properties()

Check if the union tag is too_many_properties.

Return type:bool
is_too_many_templates()

Check if the union tag is too_many_templates.

Return type:bool
template_attribute_too_large = ModifyTemplateError(u'template_attribute_too_large', None)
too_many_properties = ModifyTemplateError(u'too_many_properties', None)
too_many_templates = ModifyTemplateError(u'too_many_templates', None)
class dropbox.file_properties.OverwritePropertyGroupArg(path=None, property_groups=None)

Bases: stone.backends.python_rsrc.stone_base.Struct

Variables:
__init__(path=None, property_groups=None)

x.__init__(…) initializes x; see help(type(x)) for signature

path
property_groups
class dropbox.file_properties.PropertiesError(tag, value=None)

Bases: dropbox.file_properties.TemplateError

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:file_properties.PropertiesError.unsupported_folder – This folder cannot be tagged. Tagging folders is not supported for team-owned templates.
get_path()

Only call this if is_path() is true.

Return type:LookupError
is_path()

Check if the union tag is path.

Return type:bool
is_unsupported_folder()

Check if the union tag is unsupported_folder.

Return type:bool
classmethod path(val)

Create an instance of this class set to the path tag with value val.

Parameters:val (LookupError) –
Return type:PropertiesError
unsupported_folder = PropertiesError(u'unsupported_folder', None)
class dropbox.file_properties.PropertiesSearchArg(queries=None, template_filter=None)

Bases: stone.backends.python_rsrc.stone_base.Struct

Variables:
__init__(queries=None, template_filter=None)

x.__init__(…) initializes x; see help(type(x)) for signature

queries
template_filter
class dropbox.file_properties.PropertiesSearchContinueArg(cursor=None)

Bases: stone.backends.python_rsrc.stone_base.Struct

Variables:file_properties.PropertiesSearchContinueArg.cursor – The cursor returned by your last call to dropbox.dropbox_client.Dropbox.file_properties_properties_search() or dropbox.dropbox_client.Dropbox.file_properties_properties_search_continue().
__init__(cursor=None)

x.__init__(…) initializes x; see help(type(x)) for signature

cursor
class dropbox.file_properties.PropertiesSearchContinueError(tag, value=None)

Bases: stone.backends.python_rsrc.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:file_properties.PropertiesSearchContinueError.reset – Indicates that the cursor has been invalidated. Call dropbox.dropbox_client.Dropbox.file_properties_properties_search() to obtain a new cursor.
is_other()

Check if the union tag is other.

Return type:bool
is_reset()

Check if the union tag is reset.

Return type:bool
other = PropertiesSearchContinueError(u'other', None)
reset = PropertiesSearchContinueError(u'reset', None)
class dropbox.file_properties.PropertiesSearchError(tag, value=None)

Bases: stone.backends.python_rsrc.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

get_property_group_lookup()

Only call this if is_property_group_lookup() is true.

Return type:LookUpPropertiesError
is_other()

Check if the union tag is other.

Return type:bool
is_property_group_lookup()

Check if the union tag is property_group_lookup.

Return type:bool
other = PropertiesSearchError(u'other', None)
classmethod property_group_lookup(val)

Create an instance of this class set to the property_group_lookup tag with value val.

Parameters:val (LookUpPropertiesError) –
Return type:PropertiesSearchError
class dropbox.file_properties.PropertiesSearchMatch(id=None, path=None, is_deleted=None, property_groups=None)

Bases: stone.backends.python_rsrc.stone_base.Struct

Variables:
__init__(id=None, path=None, is_deleted=None, property_groups=None)

x.__init__(…) initializes x; see help(type(x)) for signature

id
is_deleted
path
property_groups
class dropbox.file_properties.PropertiesSearchMode(tag, value=None)

Bases: stone.backends.python_rsrc.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:file_properties.PropertiesSearchMode.field_name (str) – Search for a value associated with this field name.
classmethod field_name(val)

Create an instance of this class set to the field_name tag with value val.

Parameters:val (str) –
Return type:PropertiesSearchMode
get_field_name()

Search for a value associated with this field name.

Only call this if is_field_name() is true.

Return type:str
is_field_name()

Check if the union tag is field_name.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
other = PropertiesSearchMode(u'other', None)
class dropbox.file_properties.PropertiesSearchQuery(query=None, mode=None, logical_operator=None)

Bases: stone.backends.python_rsrc.stone_base.Struct

Variables:
__init__(query=None, mode=None, logical_operator=None)

x.__init__(…) initializes x; see help(type(x)) for signature

logical_operator
mode
query
class dropbox.file_properties.PropertiesSearchResult(matches=None, cursor=None)

Bases: stone.backends.python_rsrc.stone_base.Struct

Variables:
__init__(matches=None, cursor=None)

x.__init__(…) initializes x; see help(type(x)) for signature

cursor
matches
class dropbox.file_properties.PropertyField(name=None, value=None)

Bases: stone.backends.python_rsrc.stone_base.Struct

Raw key/value data to be associated with a Dropbox file. Property fields are added to Dropbox files as a PropertyGroup.

Variables:
__init__(name=None, value=None)

x.__init__(…) initializes x; see help(type(x)) for signature

name
value
class dropbox.file_properties.PropertyFieldTemplate(name=None, description=None, type=None)

Bases: stone.backends.python_rsrc.stone_base.Struct

Defines how a single property field may be structured. Used exclusively by PropertyGroupTemplate.

Variables:
__init__(name=None, description=None, type=None)

x.__init__(…) initializes x; see help(type(x)) for signature

description
name
type
class dropbox.file_properties.PropertyGroup(template_id=None, fields=None)

Bases: stone.backends.python_rsrc.stone_base.Struct

A subset of the property fields described by the corresponding PropertyGroupTemplate. Properties are always added to a Dropbox file as a PropertyGroup. The possible key names and value types in this group are defined by the corresponding PropertyGroupTemplate.

Variables:
__init__(template_id=None, fields=None)

x.__init__(…) initializes x; see help(type(x)) for signature

fields
template_id
class dropbox.file_properties.PropertyGroupTemplate(name=None, description=None, fields=None)

Bases: stone.backends.python_rsrc.stone_base.Struct

Defines how a property group may be structured.

Variables:
__init__(name=None, description=None, fields=None)

x.__init__(…) initializes x; see help(type(x)) for signature

description
fields
name
class dropbox.file_properties.PropertyGroupUpdate(template_id=None, add_or_update_fields=None, remove_fields=None)

Bases: stone.backends.python_rsrc.stone_base.Struct

Variables:
__init__(template_id=None, add_or_update_fields=None, remove_fields=None)

x.__init__(…) initializes x; see help(type(x)) for signature

add_or_update_fields
remove_fields
template_id
class dropbox.file_properties.PropertyType(tag, value=None)

Bases: stone.backends.python_rsrc.stone_base.Union

Data type of the given property field added.

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:file_properties.PropertyType.string – The associated property field will be of type string. Unicode is supported.
is_other()

Check if the union tag is other.

Return type:bool
is_string()

Check if the union tag is string.

Return type:bool
other = PropertyType(u'other', None)
string = PropertyType(u'string', None)
class dropbox.file_properties.RemovePropertiesArg(path=None, property_template_ids=None)

Bases: stone.backends.python_rsrc.stone_base.Struct

Variables:
__init__(path=None, property_template_ids=None)

x.__init__(…) initializes x; see help(type(x)) for signature

path
property_template_ids
class dropbox.file_properties.RemovePropertiesError(tag, value=None)

Bases: dropbox.file_properties.PropertiesError

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

get_property_group_lookup()

Only call this if is_property_group_lookup() is true.

Return type:LookUpPropertiesError
is_property_group_lookup()

Check if the union tag is property_group_lookup.

Return type:bool
classmethod property_group_lookup(val)

Create an instance of this class set to the property_group_lookup tag with value val.

Parameters:val (LookUpPropertiesError) –
Return type:RemovePropertiesError
class dropbox.file_properties.RemoveTemplateArg(template_id=None)

Bases: stone.backends.python_rsrc.stone_base.Struct

Variables:file_properties.RemoveTemplateArg.template_id – An identifier for a template created by dropbox.dropbox_client.Dropbox.file_properties_templates_add_for_user() or dropbox.dropbox_client.Dropbox.file_properties_templates_add_for_team().
__init__(template_id=None)

x.__init__(…) initializes x; see help(type(x)) for signature

template_id
class dropbox.file_properties.TemplateError(tag, value=None)

Bases: stone.backends.python_rsrc.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
get_template_not_found()

Template does not exist for the given identifier.

Only call this if is_template_not_found() is true.

Return type:str
is_other()

Check if the union tag is other.

Return type:bool
is_restricted_content()

Check if the union tag is restricted_content.

Return type:bool
is_template_not_found()

Check if the union tag is template_not_found.

Return type:bool
other = TemplateError(u'other', None)
restricted_content = TemplateError(u'restricted_content', None)
classmethod template_not_found(val)

Create an instance of this class set to the template_not_found tag with value val.

Parameters:val (str) –
Return type:TemplateError
class dropbox.file_properties.TemplateFilter(tag, value=None)

Bases: dropbox.file_properties.TemplateFilterBase

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:file_properties.TemplateFilter.filter_none – No templates will be filtered from the result (all templates will be returned).
filter_none = TemplateFilter(u'filter_none', None)
is_filter_none()

Check if the union tag is filter_none.

Return type:bool
class dropbox.file_properties.TemplateFilterBase(tag, value=None)

Bases: stone.backends.python_rsrc.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:of [str] file_properties.TemplateFilterBase.filter_some (list) – Only templates with an ID in the supplied list will be returned (a subset of templates will be returned).
classmethod filter_some(val)

Create an instance of this class set to the filter_some tag with value val.

Parameters:of [str] val (list) –
Return type:TemplateFilterBase
get_filter_some()

Only templates with an ID in the supplied list will be returned (a subset of templates will be returned).

Only call this if is_filter_some() is true.

Return type:list of [str]
is_filter_some()

Check if the union tag is filter_some.

Return type:bool
is_other()

Check if the union tag is other.

Return type:bool
other = TemplateFilterBase(u'other', None)
class dropbox.file_properties.TemplateOwnerType(tag, value=None)

Bases: stone.backends.python_rsrc.stone_base.Union

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

Variables:
is_other()

Check if the union tag is other.

Return type:bool
is_team()

Check if the union tag is team.

Return type:bool
is_user()

Check if the union tag is user.

Return type:bool
other = TemplateOwnerType(u'other', None)
team = TemplateOwnerType(u'team', None)
user = TemplateOwnerType(u'user', None)
class dropbox.file_properties.UpdatePropertiesArg(path=None, update_property_groups=None)

Bases: stone.backends.python_rsrc.stone_base.Struct

Variables:
__init__(path=None, update_property_groups=None)

x.__init__(…) initializes x; see help(type(x)) for signature

path
update_property_groups
class dropbox.file_properties.UpdatePropertiesError(tag, value=None)

Bases: dropbox.file_properties.InvalidPropertyGroupError

This class acts as a tagged union. Only one of the is_* methods will return true. To get the associated value of a tag (if one exists), use the corresponding get_* method.

get_property_group_lookup()

Only call this if is_property_group_lookup() is true.

Return type:LookUpPropertiesError
is_property_group_lookup()

Check if the union tag is property_group_lookup.

Return type:bool
classmethod property_group_lookup(val)

Create an instance of this class set to the property_group_lookup tag with value val.

Parameters:val (LookUpPropertiesError) –
Return type:UpdatePropertiesError
class dropbox.file_properties.UpdateTemplateArg(template_id=None, name=None, description=None, add_fields=None)

Bases: stone.backends.python_rsrc.stone_base.Struct

Variables:
__init__(template_id=None, name=None, description=None, add_fields=None)

x.__init__(…) initializes x; see help(type(x)) for signature

add_fields
description
name
template_id
class dropbox.file_properties.UpdateTemplateResult(template_id=None)

Bases: stone.backends.python_rsrc.stone_base.Struct

Variables:file_properties.UpdateTemplateResult.template_id – An identifier for template added by route See dropbox.dropbox_client.Dropbox.file_properties_templates_add_for_user() or dropbox.dropbox_client.Dropbox.file_properties_templates_add_for_team().
__init__(template_id=None)

x.__init__(…) initializes x; see help(type(x)) for signature

template_id