Skip to content
Boto 3 Extension
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
pyapp_ext/boto3
sample
.gitignore
.pre-commit-config.yaml
LICENSE
README.rst
setup.cfg
setup.py

README.rst

pyApp - Boto3

Let us handle the boring stuff!

This extension provides a factory method for using Boto 3 to allow configuration to be configured via pyApp settings.

The extension also provides checks to confirm the settings are correct and that the application is able to connect to the redis instance.

Installation

Install using pip:

pip install pyapp-boto3

Install using pipenv:

pipenv install pyapp-boto3

Add pae.boto3 into the EXT list in your applications default_settings.py.

The default settings will obtain configuration from your environment.

Or they can be customised via the AWS_CREDENTIALS block in your runtime settings file:

AWS_CREDENTIALS = {
    "default": {
        "default_region": "ap-southeast2"
    }
}

Note

The URL is a defined by Redis client see the documentation. In addition to the url any argument that can be provided to Redis.from_url can be provided.

Usage

The following example creates both Connection and Session instances:

from pae.redis import get_client

# Get connection
redis = get_client()

redis.set("foo")

API

pae.redis.get_client(default: str = None) -> Redis

Get named Redis client instance
You can’t perform that action at this time.