The Main Client for generating Aesel Events
aesel.AeselEventClient.
AeselEventClient
(host, port, encryption_key=None, encryption_iv=None)¶Bases: object
Initializing the event client requires a UDP address to send events to, and may also take encryption information. This information is typically retrieved dynamically from Aesel Servers during Registration to a Scene.
Parameters: |
|
---|
send_object_action_update
(obj)¶Send an outgoing Object Action Update message over UDP.
Parameters: | obj – AeselObject to convert into an event. |
---|---|
Returns: | None. |
send_object_frame_update
(obj)¶Send an outgoing Object Frame Update message over UDP.
Parameters: | obj – AeselObject to convert into an event. |
---|---|
Returns: | None. |
send_object_update
(obj)¶Send an outgoing Object Update message over UDP.
Parameters: | obj – AeselObject to convert into an event. |
---|---|
Returns: | None. |
send_property_action_update
(prop)¶Send an outgoing Property Action Update message over UDP.
Parameters: | prop – AeselProperty to convert into an event. |
---|---|
Returns: | None. |
send_property_frame_update
(prop)¶Send an outgoing Property Frame Update message over UDP.
Parameters: | prop – AeselProperty to convert into an event. |
---|---|
Returns: | None. |
send_property_update
(prop)¶Send an outgoing Property Update message over UDP.
Parameters: | prop – AeselProperty to convert into an event. |
---|---|
Returns: | None. |
update_endpoint
(host, port, encryption_key=None, encryption_iv=None)¶Update Client address & encryption credentials (key & salt).
Parameters: |
|
---|---|
Returns: | None. |
The Main Client for accessing all HTTP Operations in the Aesel API.
aesel.AeselTransactionClient.
AeselTransactionClient
(aesel_url)¶Bases: object
Initializing the Transaction Client just requires the HTTP(s) address which it can use to communicate with the Aesel server.
Parameters: | aesel_url (str) – The address of the Aesel servers. |
---|
activate_user
(key)¶Activate an existing User.
Parameters: | key – The key of the user to update |
---|
add_favorite_project
(key, project_key)¶Add a Favorite Project to an existing user in the Aesel server.
Parameters: |
|
---|
add_favorite_scene
(key, scene_key)¶Add a Favorite Scene to an existing user in the Aesel server.
Parameters: |
|
---|
add_scene_group
(key, scene_group)¶Add a scene group to an existing project in the Aesel server.
Parameters: |
|
---|
add_scene_to_scene_group
(key, group_name, scene_key)¶Add a scene to a scene group in the Aesel server.
Parameters: |
|
---|
asset_collection_query
(collection, num_records=10, page=0)¶Query Asset Collections from the Aesel server.
Parameters: |
|
---|
bulk_query_asset_metadata
(keys)¶Query Asset Metadata by ID in bulk, and return the json content of the response.
Parameters: | keys – A list of Asset Keys to retrieve the metadata of. |
---|---|
Returns: | JSON containing a list of Asset Metadata entries. |
bulk_scene_query
(scenes, num_records=10, start_record=0)¶Query for scenes by attribute. Passing in multiple scenes will return the sum of the results of using each scene as a query.
Parameters: |
|
---|---|
Returns: | JSON with a list of found scenes. |
create_asset
(file, asset=None, relationship=None)¶Create a New Asset in the Aesel Server.
Parameters: |
|
---|---|
Returns: | The key of the newly created object. |
create_asset_collection
(collection)¶Create a new Asset Collection in the Aesel server.
Parameters: | collection – AeselAssetCollection to be created. |
---|
create_object
(scene_key, obj)¶Create a new Object.
Parameters: |
|
---|---|
Returns: | JSON with a list of created objects, including the newly generated key. |
create_object_action
(scene_key, obj_key, action)¶Create an Action against an existing Object.
Parameters: |
|
---|
create_object_frame
(scene_key, obj_key, action_name, frame)¶Create an ObjectFrame against an existing Action.
Parameters: |
|
---|
create_project
(project)¶Create a new project in the Aesel server.
Parameters: | project – AeselProject to be created. |
---|
create_property
(scene_key, property)¶Create a new Property.
Parameters: |
|
---|---|
Returns: | JSON with a list of created properties, including the newly generated key. |
create_property_action
(scene_key, prop_key, action)¶Create an Action against an existing property.
Parameters: |
|
---|
create_property_frame
(scene_key, prop_key, action_name, frame)¶Create a PropertyFrame against an existing Action.
Parameters: |
|
---|
create_scene
(key, scene)¶Create a new Scene with the given key
Parameters: |
|
---|---|
Returns: | JSON with a list of created scenes. |
create_user
(user)¶Create a new user in the Aesel server. Note that this will only be processed successfully if the logged-in user calling it is an administrator.
Parameters: | user – The user to create |
---|
deactivate_user
(key)¶Deactivate a User.
Parameters: | key – The key of the user to update |
---|
delete_asset
(key)¶Delete an Asset by Key.
Parameters: | key (str) – The key of the Asset to delete |
---|
delete_asset_collection
(key)¶Delete an Asset Collection from the Aesel server by key.
Parameters: | key (str) – The key of the AeselAssetCollection to be deleted. |
---|
delete_asset_relationship
(asset, type, related)¶Delete an Asset Relationship
Parameters: |
|
---|---|
Returns: | JSON with deleted asset relationships. |
delete_object
(scene_key, obj_key)¶Delete an Object by key.
Parameters: |
|
---|
delete_object_action
(scene_key, obj_key, action_name)¶Delete an Action from an existing Object.
Parameters: |
|
---|
delete_object_frame
(scene_key, obj_key, action_name, frame_index)¶Delete an ObjectFrame from an existing Action.
Parameters: |
|
---|
delete_project
(key)¶Delete a project from the Aesel server by key.
Parameters: | key (str) – The key of the AeselProject to be deleted. |
---|
delete_property
(scene_key, property_key)¶Delete an Property by key.
Parameters: |
|
---|
delete_property_action
(scene_key, prop_key, action_name)¶Delete an Action from an existing property.
Parameters: |
|
---|
delete_property_frame
(scene_key, prop_key, action_name, frame_index)¶Delete a PropertyFrame from an existing Action.
Parameters: |
|
---|
delete_scene
(key)¶Delete a Scene with the given key
Parameters: | key (str) – The key of the Scene to delete |
---|
delete_scene_group
(key, group_name)¶Delete a Scene Group from a Project in the Aesel server.
Parameters: |
|
---|
delete_user
(key)¶Delete an existing User from Aesel by Key.
Parameters: | key (str) – The username for the user |
---|
deregister
(scene_key, device_key)¶Deregister a device from a scene.
Parameters: |
|
---|---|
Returns: | JSON with a list of updated scenes. |
gen_asset_params
(asset, relationship)¶gen_base_url
()¶get_asset
(key)¶Get an Asset by Key, and return the content of the response.
Parameters: | key (str) – The key of the Asset to retrieve |
---|---|
Returns: | The content of the response, usually to be saved to a file. |
get_asset_collection
(key)¶Get an Asset Collection from the Aesel server by key.
Parameters: | key (str) – The key of the AeselAssetCollection to be retrieved. |
---|
get_asset_collections
(keys)¶Get an Asset Collection from the Aesel server by key.
Parameters: | keys – A list of keys for the AeselAssetCollections to be retrieved. |
---|
get_asset_history
(key)¶Get an Asset History by Key, and return the json content of the response.
Parameters: | key (str) – The key of the Asset to retrieve the history for |
---|---|
Returns: | JSON containing an Asset History corresponding to the requested Asset. |
get_object
(scene_key, obj_key)¶Get an Object by key.
Parameters: |
|
---|---|
Returns: | JSON with a list of created objects, including the newly generated key. |
get_project
(key)¶Get a project from the Aesel server by key.
Parameters: | key (str) – The key of the AeselProject to be retrieved. |
---|
get_property
(scene_key, property_key)¶Get a Property by key.
Parameters: |
|
---|---|
Returns: | JSON with a list of created properties, including the newly generated key. |
get_scene
(key)¶Get a Scene with the given key
Parameters: | key (str) – The key of the Scene to update |
---|---|
Returns: | JSON with a list of retrieved scenes. |
get_user
(key)¶Get an existing User from Aesel by Key
Parameters: | key (str) – The username for the user |
---|
lock_object
(scene_key, obj_key, device_key)¶Lock an Object by key.
Parameters: |
|
---|
login
(username, password)¶Login to the Aesel server, storing the Authentication header from the response as a bearer token for future requests.
Parameters: |
|
---|
make_user_admin
(key)¶Make a user an administrator.
Parameters: | key – The key of the user to update |
---|
object_query
(scene_key, object, num_records=999)¶Query for objects by scene and attribute.
Parameters: |
|
---|---|
Returns: | JSON with a list of found scenes. |
project_query
(project, num_records=10, page=0)¶Query projects from the Aesel server.
Parameters: |
|
---|
property_query
(scene_key, property, num_records=999)¶Query for properties by scene and attribute.
Parameters: |
|
---|---|
Returns: | JSON with a list of found scenes. |
query_asset_metadata
(asset)¶Query Assets by Metadata, and return the json content of the response.
Parameters: | asset – The AeselAssetMetadata which will be used as a match query. |
---|---|
Returns: | JSON containing a list of Asset Metadata entries, including keys. |
query_asset_relationships
(query)¶Query for asset relationships.
Parameters: | query – The AeselAssetRelationship to use as a query. |
---|---|
Returns: | JSON with a list of found asset relationships, including keys. |
register
(scene_key, device, transform=None)¶Register a device to a scene. Potentially with a transformation.
Parameters: |
|
---|---|
Returns: | JSON with a list of updated scenes. |
remove_admin_rights
(key)¶Remove admin priveleges from a User.
Parameters: | key – The key of the user to update |
---|
remove_favorite_project
(key, project_key)¶Remove a Favorite Project from an existing user in the Aesel server.
Parameters: |
|
---|
remove_favorite_scene
(key, scene_key)¶Remove a Favorite Scene from an existing user in the Aesel server.
Parameters: |
|
---|
remove_scene_from_scene_group
(key, group_name, scene_key)¶Remove a scene from a scene group in the Aesel server.
Parameters: |
|
---|
save_asset_relationship
(new_relationship, existing_relationship=None)¶Add an Asset Relationship between the specified asset and related element
Parameters: |
|
---|---|
Returns: | JSON containing the Relationship and ID. |
scene_query
(scene, num_records=10, start_record=0)¶Query for scenes by attribute.
Parameters: |
|
---|---|
Returns: | JSON with a list of found scenes. |
set_auth_info
(auth_token)¶Set the authentication token to be used on Requests
Parameters: | auth_token (str) – The value of the auth token to use on requests |
---|
Set the cookies contained in the Transaction sessions.
Parameters: | cookie – The text value of the desired Cookie header. |
---|
synchronize
(scene_key, device_key, transform)¶Correct the device transformation relative to the scene.
Parameters: |
|
---|---|
Returns: | JSON with a list of updated scenes. |
unlock_object
(scene_key, obj_key, device_key)¶Unlock an Object by key.
Parameters: |
|
---|
update_asset
(key, file, asset=None, relationship=None)¶Update an existing Asset in the Aesel Server.
Parameters: |
|
---|---|
Returns: | The key of the newly created object. |
update_asset_collection
(key, collection)¶Update an existing Asset Collection in the Aesel server.
Parameters: |
|
---|
update_object
(scene_key, obj_key, obj)¶Create a new Object.
Parameters: |
|
---|---|
Returns: | JSON with a list of created objects, including the newly generated key. |
update_object_action
(scene_key, obj_key, action)¶Update an Action against an existing Object.
Parameters: |
|
---|
update_object_frame
(scene_key, obj_key, action_name, frame)¶Update a Frame in an existing Action from an Object.
Parameters: |
|
---|
update_project
(key, project)¶Update an existing project in the Aesel server.
Parameters: |
|
---|
update_property
(scene_key, property_key, property)¶Create a new Property.
Parameters: |
|
---|---|
Returns: | JSON with a list of created properties, including the newly generated key. |
update_property_action
(scene_key, prop_key, action)¶Create an Action against an existing Property.
Parameters: |
|
---|
update_property_frame
(scene_key, prop_key, action_name, frame)¶Update a Frame in an existing Action from a property.
Parameters: |
|
---|
update_scene
(key, scene)¶Update an existing Scene with the given key
Parameters: |
|
---|---|
Returns: | JSON with a list of updated scenes. |
update_scene_group
(key, group_name, scene_group)¶Update a scene group of an existing project in the Aesel server.
Parameters: |
|
---|
update_user
(key, user)¶Update an existing user in the Aesel server.
Parameters: |
|
---|
user_query
(username='', email='')¶Get an existing User from Aesel by Username or Email
Parameters: |
|
---|