pypicloud.cache.dynamo module

Store package data in DynamoDB

class pypicloud.cache.dynamo.DynamoCache(request=None, engine=None, graceful_reload=False, **kwargs)[source]

Bases: ICache

Caching database that uses DynamoDB

all(name)[source]

Search for all versions of a package

Parameters
namestr

The name of the package

Returns
packageslist

List of all Package s with the given name

check_health()[source]

Check the health of the cache backend

Returns
(healthy, status)(bool, str)

Tuple that describes the health status and provides an optional status message

clear(package)[source]

Remove this package from the caching database

Parameters
packagePackage
clear_all()[source]

Clear all cached packages from the database

classmethod configure(settings)[source]

Configure the cache method with app settings

distinct()[source]

Get all distinct package names

Returns
nameslist

List of package names

fetch(filename)[source]

Get matching package if it exists

Parameters
filenamestr

Name of the package file

Returns
packagePackage
new_package(*args, **kwargs)[source]
reload_from_storage(clear=True)[source]

Make sure local database is populated with packages

save(package)[source]

Save this package to the database

Parameters
packagePackage
summary()[source]

Summarize package metadata

Returns
packageslist

List of package dicts, each of which contains ‘name’, ‘summary’, and ‘last_modified’.

class pypicloud.cache.dynamo.DynamoPackage(*_, **__)[source]

Bases: Package, Model

Python package stored in DynamoDB

data = <flywheel.fields.Field object>[source]
filename = <flywheel.fields.Field object>[source]
last_modified = <flywheel.fields.Field object>[source]
meta_ = <flywheel.model_meta.ModelMetadata object>[source]
name = <flywheel.fields.Field object>[source]
summary = <flywheel.fields.Field object>[source]
version = <flywheel.fields.Field object>[source]
class pypicloud.cache.dynamo.PackageSummary(*_, **__)[source]

Bases: Model

Aggregate data about packages

last_modified = <flywheel.fields.Field object>[source]
meta_ = <flywheel.model_meta.ModelMetadata object>[source]
name = <flywheel.fields.Field object>[source]
summary = <flywheel.fields.Field object>[source]