Skip to content

Latest commit

 

History

History
58 lines (34 loc) · 926 Bytes

storage.rst

File metadata and controls

58 lines (34 loc) · 926 Bytes

Storage

Backends

PostgreSQL

kinto.core.storage.postgresql.Storage

Redis

See Kinto Redis driver plugin repository for more information.

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(resource_name='__custom', parent_id='', obj=data)

See the resource-model class to manipulate collections of records.