-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdal.py
More file actions
37 lines (27 loc) · 877 Bytes
/
dal.py
File metadata and controls
37 lines (27 loc) · 877 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
__all__ = ["SupabaseAnonPostgrest", "SupabaseServPostgrest", "DefaultRedis"]
from blue_firmament.dal.postgrest import PostgrestDAL
from settings.dal import get_setting as get_dal_setting
class SupabaseAnonPostgrest(
PostgrestDAL,
url=get_dal_setting().postgrest_url,
apikey=get_dal_setting().anon_key,
default_schema="public",
default_table="profile",
): ...
class SupabaseServPostgrest(
PostgrestDAL,
url=get_dal_setting().postgrest_url,
apikey=get_dal_setting().serv_key,
default_schema="public",
default_table="profile",
): ...
from blue_firmament.dal.redis import RedisDAL
from settings.redis import get_setting as get_redis_setting
class DefaultRedis(
RedisDAL,
host=get_redis_setting().host,
port=get_redis_setting().port,
password=get_redis_setting().password,
db=get_redis_setting().db,
):
pass