Skip to content

Latest commit

 

History

History
57 lines (33 loc) · 867 Bytes

storage.rst

File metadata and controls

57 lines (33 loc) · 867 Bytes

Storage

Backends

PostgreSQL

kinto.core.storage.postgresql.Storage

Redis

kinto_redis.storage.Storage

Memory

kinto.core.storage.memory.Storage

API

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

kinto.core.storage

Exceptions

kinto.core.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 resource-model class to manipulate collections of records.