Skip to content
This repository has been archived by the owner on Mar 28, 2019. It is now read-only.

Latest commit

 

History

History
57 lines (33 loc) · 853 Bytes

storage.rst

File metadata and controls

57 lines (33 loc) · 853 Bytes

Storage

Backends

PostgreSQL

cliquet.storage.postgresql.PostgreSQL

Redis

cliquet.storage.redis.Redis

Memory

cliquet.storage.memory.Memory

API

Implementing a custom storage backend consists in implementating the following interface:

cliquet.storage

Exceptions

cliquet.storage.exceptions

Store custom data

Storage can be used to store arbitrary data.

data = {'subscribed': datetime.now()}
user_id = request.authenticated_userid

storage = request.registry.storage
storage.create(collection_id='__custom', parent_id='', record=data)

See the collection class to manipulate collections of records.