nautilus.conventions package

Submodules

nautilus.conventions.actions module

This file is responsible for centralizing the action conventions used in nautilus.

nautilus.conventions.actions.change_action_status(action_type, new_status)[source]

This function changes the status of an action type.

nautilus.conventions.actions.error_status()[source]
nautilus.conventions.actions.get_crud_action(method, model, status='pending', **kwds)[source]
nautilus.conventions.actions.hydrate_action(serialized)[source]

This function takes a serialized action and provides the primitive data structure.

nautilus.conventions.actions.intialize_service_action(all_services=False, **kwds)[source]
nautilus.conventions.actions.pending_status()[source]
nautilus.conventions.actions.query_action_type()[source]

This action type corresponds to an api query performed over the event system

nautilus.conventions.actions.roll_call_type()[source]
nautilus.conventions.actions.serialize_action(action_type, payload, **extra_fields)[source]

This function returns the conventional form of the actions.

nautilus.conventions.actions.success_status()[source]

nautilus.conventions.api module

This file is responsible for centralizing the schema conventions used in nautilus.

nautilus.conventions.api.create_mutation_inputs(service)[source]
Parameters:service – The service being created by the mutation
Returns:a list of all of the fields availible for the service, with the required ones respected.
Return type:(list)
nautilus.conventions.api.create_mutation_outputs(service)[source]
Parameters:service – The service being created by the mutation
Returns:A single output representing the object type for the service record that was created.
Return type:(list of single dict)
nautilus.conventions.api.crud_mutation_name(action, model)[source]

This function returns the name of a mutation that performs the specified crud action on the given model service

nautilus.conventions.api.delete_mutation_inputs(service)[source]
Parameters:service – The service being deleted by the mutation
Returns:the only input for delete is the pk of the service.
Return type:([str])
nautilus.conventions.api.delete_mutation_outputs(service)[source]
Parameters:service – The service being deleted by the mutation
Returns:A string providing a status message
Return type:(str)
nautilus.conventions.api.root_query(*service)[source]

This function returns the name of the root query for a model service.

nautilus.conventions.api.update_mutation_inputs(service)[source]
Parameters:service – The service being updated by the mutation
Returns:a list of all of the fields availible for the service. Pk is a required field in order to filter the results
Return type:(list)
nautilus.conventions.api.update_mutation_outputs(service)[source]
Parameters:service – The service being updated by the mutation
Returns:A single output representing the object type for the service record that was updated.
Return type:(list of single dict)

nautilus.conventions.auth module

nautilus.conventions.auth.cookie_name()[source]

nautilus.conventions.models module

This file is responsible for centralizing the model conventions used in nautilus.

nautilus.conventions.models.get_model_string(model)[source]

This function returns the conventional action designator for a given model.

nautilus.conventions.models.normalize_string(string)[source]

nautilus.conventions.services module

This file is responsible for centralizing the service conventions used in nautilus.

nautilus.conventions.services.api_gateway_name()[source]

the name of the default api gateway

nautilus.conventions.services.auth_service_name()[source]
nautilus.conventions.services.connection_service_name(service, *args)[source]

the name of a service that manages the connection between services

nautilus.conventions.services.model_service_name(model)[source]

the name of a service that manages a model

Module contents