mirror of
https://github.com/jazzband/django-constance.git
synced 2026-03-16 22:40:24 +00:00
39 lines
1.1 KiB
Python
39 lines
1.1 KiB
Python
"""Defines the base constance backend."""
|
|
|
|
|
|
class Backend:
|
|
def get(self, key):
|
|
"""
|
|
Get the key from the backend store and return the value.
|
|
Return None if not found.
|
|
"""
|
|
raise NotImplementedError
|
|
|
|
async def aget(self, key):
|
|
"""
|
|
Get the key from the backend store and return the value.
|
|
Return None if not found.
|
|
"""
|
|
raise NotImplementedError
|
|
|
|
def mget(self, keys):
|
|
"""
|
|
Get the keys from the backend store and return a list of the values.
|
|
Return an empty list if not found.
|
|
"""
|
|
raise NotImplementedError
|
|
|
|
async def amget(self, keys):
|
|
"""
|
|
Get the keys from the backend store and return a list of the values.
|
|
Return an empty list if not found.
|
|
"""
|
|
raise NotImplementedError
|
|
|
|
def set(self, key, value):
|
|
"""Add the value to the backend store given the key."""
|
|
raise NotImplementedError
|
|
|
|
async def aset(self, key, value):
|
|
"""Add the value to the backend store given the key."""
|
|
raise NotImplementedError
|