API documentation¶
This is the API documentation for DynamoDB Config Store.
DynamoDBConfigStore¶
-
class
dynamodb_config_store.
DynamoDBConfigStore
(connection, table_name, store_name, store_key='_store', option_key='_option', read_units=1, write_units=1, config_store='SimpleConfigStore', config_store_args=[], config_store_kwargs={})[source]¶ DynamoDB Config Store instance
-
_create_table
(read_units=1, write_units=1)[source]¶ Create a new table
Parameters: - read_units (int) – Number of read capacity units to provision
- write_units (int) – Number of write capacity units to provision
Returns: bool – Returns True if the table was created
-
_wait_for_table
(target_state, sleep_time=5, retries=30)[source]¶ Wait for the table to get to a certain state
Parameters: - target_state (str) – The target state to wait for
- sleep_time (int) – Number of seconds to wait between the checks
- retries (int) – Number of retries before giving up
Returns: bool – True if the target state was reached, else False
-
ConfigStores¶
ConfigStore¶
This is the ConfigStore
base class that all other config stores inherit from.
DirectConfigStore¶
The DirectConfigStore
is the default Config Store. All requests made will be send directly to DynamoDB so that the latest configuration is fetched at all times.
TimeBasedConfigStore¶
The TimeBasedConfigStore
is a Config Store used for fetching configuration from DynamoDB on a preset interval. All configuration options will be exposed using instance attributes such as store.config.option
, where option
is the store option.
This class shall not be instanciated directly, it’s called by DynamoDBConfigStore
.
-
class
dynamodb_config_store.config_stores.time_based.
TimeBasedConfigStore
(table, store_name, store_key, option_key, update_interval=300)[source]¶ Fetches Stores on a periodic interval from DynamoDB
All internal variables and methods are private (with an leading _), as the configuration options from DynamoDB will be set as instance attributes.
Exceptions¶
Exception definitions
-
exception
dynamodb_config_store.exceptions.
MisconfiguredSchemaException
[source]¶ Exception thrown if the table does not match the configuration