Skip to main content

Integration library for Django and Albertson.

Project description

Homepage: https://github.com/FocusLab/django-albertson

Integration library for Django and Albertson.

Use

DjangoSettingsMixin

dj_albertson.mixins.DjangoSettingsMixin

This mixin provides automatic loading of default settings for a CounterPool from the django settings module.

Below is an example use:

from albertson import CounterPool
from dj_albertson.mixins import DjangoSettingsMixin

class MyCounter(DjangoSettingsMixin, CounterPool):
    '''
    That's it, your done!
    '''

Once you’ve added this mixin to your counter pool classes, the following settings will be used:

ALBERTSON_AWS_ACCESS_KEY

The AWS access key id that will be used to access DynamoDB. This is the setting that will be used if both AWS_ACCESS_KEY_ID and ALBERTSON_AWS_ACCESS_KEY are provided.

ALBERTSON_AWS_SECRET_KEY

The AWS secet key that will be used to access DynamoDB. This is the setting that will be used if both AWS_SECRET_ACCESS_KEY and ALBERTSON_AWS_SECRET_KEY are provided.

AWS_ACCESS_KEY_ID

A more generic form of ALBERTSON_AWS_ACCESS_KEY

AWS_SECRET_ACCESS_KEY

A more generic form of ALBERTSON_AWS_SECRET_KEY

ALBERTSON_DEFAULT_READ_UNITS

The default read throughput that will be set on newly created tables.

default: 3

ALBERTSON_DEFAULT_WRITE_UNITS

The default write throughput that will be set on newly created tables.

default: 5

ALBERTSON_AUTO_CREATE_TABLE

A flag to control how Albertson should behave when it tries to use a table that doesn’t exist. If set to True, Albertson will create a new table. If set to False, Albertson will allow the underlying boto exception to bubble up through the stack.

default: True

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-albertson-0.1.0.tar.gz (2.5 kB view details)

Uploaded Source

File details

Details for the file django-albertson-0.1.0.tar.gz.

File metadata

File hashes

Hashes for django-albertson-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1eeb088b67a7d6a4476fcebf58ccc67e316fb8fc90d828ac42f1338174c2f278
MD5 c23a0b6ead278fb4f7245a5080c01053
BLAKE2b-256 c5f8839be0f3dc8069220c5310cf8920e7787c3fb90d07a86d2b21dc7758a415

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page