dbos 0.6.0a3__py3-none-any.whl → 0.6.0a4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- dbos/dbos.py +8 -6
- dbos/dbos_config.py +2 -1
- {dbos-0.6.0a3.dist-info → dbos-0.6.0a4.dist-info}/METADATA +1 -1
- {dbos-0.6.0a3.dist-info → dbos-0.6.0a4.dist-info}/RECORD +7 -7
- {dbos-0.6.0a3.dist-info → dbos-0.6.0a4.dist-info}/WHEEL +0 -0
- {dbos-0.6.0a3.dist-info → dbos-0.6.0a4.dist-info}/entry_points.txt +0 -0
- {dbos-0.6.0a3.dist-info → dbos-0.6.0a4.dist-info}/licenses/LICENSE +0 -0
dbos/dbos.py
CHANGED
|
@@ -714,6 +714,12 @@ class DBOS:
|
|
|
714
714
|
ctx = assert_current_dbos_context()
|
|
715
715
|
return ctx.authenticated_roles
|
|
716
716
|
|
|
717
|
+
@classproperty
|
|
718
|
+
def assumed_role(cls) -> Optional[str]:
|
|
719
|
+
"""Return the role currently assumed by the authenticated user, if any, associated with the current context."""
|
|
720
|
+
ctx = assert_current_dbos_context()
|
|
721
|
+
return ctx.assumed_role
|
|
722
|
+
|
|
717
723
|
@classmethod
|
|
718
724
|
def set_authentication(
|
|
719
725
|
cls, authenticated_user: Optional[str], authenticated_roles: Optional[List[str]]
|
|
@@ -800,13 +806,9 @@ class DBOSConfiguredInstance:
|
|
|
800
806
|
|
|
801
807
|
"""
|
|
802
808
|
|
|
803
|
-
def __init__(self, config_name: str
|
|
809
|
+
def __init__(self, config_name: str) -> None:
|
|
804
810
|
self.config_name = config_name
|
|
805
|
-
|
|
806
|
-
assert isinstance(dbos, DBOS)
|
|
807
|
-
dbos._registry.register_instance(self)
|
|
808
|
-
else:
|
|
809
|
-
DBOS.register_instance(self)
|
|
811
|
+
DBOS.register_instance(self)
|
|
810
812
|
|
|
811
813
|
|
|
812
814
|
# Apps that import DBOS probably don't exit. If they do, let's see if
|
dbos/dbos_config.py
CHANGED
|
@@ -2,7 +2,7 @@ import json
|
|
|
2
2
|
import os
|
|
3
3
|
import re
|
|
4
4
|
from importlib import resources
|
|
5
|
-
from typing import Dict, List, Optional, TypedDict
|
|
5
|
+
from typing import Any, Dict, List, Optional, TypedDict
|
|
6
6
|
|
|
7
7
|
import yaml
|
|
8
8
|
from jsonschema import ValidationError, validate
|
|
@@ -69,6 +69,7 @@ class ConfigFile(TypedDict, total=False):
|
|
|
69
69
|
database: DatabaseConfig
|
|
70
70
|
telemetry: Optional[TelemetryConfig]
|
|
71
71
|
env: Dict[str, str]
|
|
72
|
+
application: Dict[str, Any]
|
|
72
73
|
|
|
73
74
|
|
|
74
75
|
def substitute_env_vars(content: str) -> str:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
dbos-0.6.
|
|
2
|
-
dbos-0.6.
|
|
3
|
-
dbos-0.6.
|
|
4
|
-
dbos-0.6.
|
|
1
|
+
dbos-0.6.0a4.dist-info/METADATA,sha256=UT1U_MYOXQ6YWzSgkSQHNYZGq8pRqMM2ago9AkTarhA,5000
|
|
2
|
+
dbos-0.6.0a4.dist-info/WHEEL,sha256=rSwsxJWe3vzyR5HCwjWXQruDgschpei4h_giTm0dJVE,90
|
|
3
|
+
dbos-0.6.0a4.dist-info/entry_points.txt,sha256=3PmOPbM4FYxEmggRRdJw0oAsiBzKR8U0yx7bmwUmMOM,39
|
|
4
|
+
dbos-0.6.0a4.dist-info/licenses/LICENSE,sha256=VGZit_a5-kdw9WT6fY5jxAWVwGQzgLFyPWrcVVUhVNU,1067
|
|
5
5
|
dbos/__init__.py,sha256=s3nYPf5yGR4XxiXS_JQbL8WVTjnnwr5EpFoCaCMrFxg,582
|
|
6
6
|
dbos/admin_sever.py,sha256=Qg5T3YRrbPW05PR_99yAaxgo1ugQrAp_uTeTqSfjm_k,3397
|
|
7
7
|
dbos/application_database.py,sha256=1K3kE96BgGi_QWOd2heXluyNTwFAwlUVuAR6JKKUqf0,5659
|
|
@@ -9,8 +9,8 @@ dbos/cli.py,sha256=YARlQiWHUwFni-fEOr0k5P_-pqPS4xkywj_B0oTMXn0,8318
|
|
|
9
9
|
dbos/context.py,sha256=NVMGyvAa2RIiBVspvDz-8MBk_BQyGyYdPdorgO-GSng,16407
|
|
10
10
|
dbos/core.py,sha256=jeqO8DABPAUrFlJXOfRfFDSnA8BGwiPnMa1JNbGuYLs,28584
|
|
11
11
|
dbos/dbos-config.schema.json,sha256=azpfmoDZg7WfSy3kvIsk9iEiKB_-VZt03VEOoXJAkqE,5331
|
|
12
|
-
dbos/dbos.py,sha256=
|
|
13
|
-
dbos/dbos_config.py,sha256=
|
|
12
|
+
dbos/dbos.py,sha256=Tf18wfvTrVx3Xo3ur05kLcNXaF75coJNiubwcCWAFgY,29076
|
|
13
|
+
dbos/dbos_config.py,sha256=ih_TD_1zTKhPKxk8TPdEIp3ihu82R06SGKg-s4rHxws,5344
|
|
14
14
|
dbos/decorators.py,sha256=lbPefsLK6Cya4cb7TrOcLglOpGT3pc6qjZdsQKlfZLg,629
|
|
15
15
|
dbos/error.py,sha256=DDhB0VHmoZE_CP51ICdFMZSL2gmVS3Dm0aPNWncci94,3876
|
|
16
16
|
dbos/fastapi.py,sha256=s7LnwwYVpJm_QZZwBW5um8NV2Q2Qx85uVZqGcKlSZAo,1881
|
|
@@ -44,4 +44,4 @@ dbos/templates/hello/start_postgres_docker.py,sha256=lQVLlYO5YkhGPEgPqwGc7Y8uDKs
|
|
|
44
44
|
dbos/tracer.py,sha256=GaXDhdKKF_IQp5SAMipGXiDVwteRKjNbrXyYCH1mor0,2520
|
|
45
45
|
dbos/utils.py,sha256=hWj9iWDrby2cVEhb0pG-IdnrxLqP64NhkaWUXiLc8bA,402
|
|
46
46
|
version/__init__.py,sha256=L4sNxecRuqdtSFdpUGX3TtBi9KL3k7YsZVIvv-fv9-A,1678
|
|
47
|
-
dbos-0.6.
|
|
47
|
+
dbos-0.6.0a4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|