Caching Backends

PyPICloud stores the packages in a storage backend (typically S3), but that backend is not necessarily efficient for frequently reading metadata. So instead of hitting S3 every time we need to find a list of package versions, we store all that metadata in a cache. The cache does not have to be backed up because it is only a local cache of data that is permanently stored in the storage backend.


Set pypi.db = sql OR pypi.db = pypicloud.cache.SQLCache OR leave it out completely since this is the default.


Argument: string

The database url to use for the caching database. Should be a SQLAlchemy url

  • sqlite: sqlite:///%(here)s/db.sqlite
  • sqlite (in-memory): sqlite://
  • mysql: mysql://root@
  • postgres: postgresql://postgres@


You must specify the charset= parameter if you’re using MySQL, otherwise it will choke on unicode package names. If you’re using 5.5.3 or greater you can specify the utf8mb4 charset, otherwise use utf8.


Set pypi.db = redis OR pypi.db = pypicloud.cache.RedisCache

You will need to pip install redis before running the server.


Argument: string

The database url to use for the caching database. The format looks like this: redis://username:password@localhost:6379/0


Set pypi.db = dynamo OR pypi.db = pypicloud.cache.dynamo.DynamoCache

You will need to pip install pypicloud[dynamo] before running the server.


Argument: string

The AWS region to use for the cache tables. You must specify either this or

db.access_key, db.secret_key

Argument: string, optional

Your AWS access key id and secret access key. If they are not specified then pypicloud will attempt to get the values from the environment variables AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY.


Argument: string, optional

If specified, all of the created Dynamo tables will have this as a prefix in their name. Useful to avoid name collisions.

Argument: string

The hostname to connect to. This is normally used to connect to a DynamoDB Local instance. You must specify either this or db.region.


Argument: int, optional

The port to connect to when using (default 8000)

Argument: bool, optional

Force https connection when using (default False)