dbos 0.10.0a0__py3-none-any.whl → 0.10.0a1__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-config.schema.json +4 -0
- dbos/dbos_config.py +7 -1
- {dbos-0.10.0a0.dist-info → dbos-0.10.0a1.dist-info}/METADATA +1 -1
- {dbos-0.10.0a0.dist-info → dbos-0.10.0a1.dist-info}/RECORD +7 -7
- {dbos-0.10.0a0.dist-info → dbos-0.10.0a1.dist-info}/WHEEL +0 -0
- {dbos-0.10.0a0.dist-info → dbos-0.10.0a1.dist-info}/entry_points.txt +0 -0
- {dbos-0.10.0a0.dist-info → dbos-0.10.0a1.dist-info}/licenses/LICENSE +0 -0
dbos/dbos-config.schema.json
CHANGED
|
@@ -59,6 +59,10 @@
|
|
|
59
59
|
"type": "string",
|
|
60
60
|
"description": "If using SSL/TLS to securely connect to a database, path to an SSL root certificate file"
|
|
61
61
|
},
|
|
62
|
+
"local_suffix": {
|
|
63
|
+
"type": "boolean",
|
|
64
|
+
"description": "Whether to suffix app_db_name with '_local'. Set to true when doing local development using a DBOS Cloud database."
|
|
65
|
+
},
|
|
62
66
|
"app_db_client": {
|
|
63
67
|
"type": "string",
|
|
64
68
|
"description": "Specify the database client to use to connect to the application database",
|
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 Any, Dict, List, Optional, TypedDict
|
|
5
|
+
from typing import Any, Dict, List, Optional, TypedDict, cast
|
|
6
6
|
|
|
7
7
|
import yaml
|
|
8
8
|
from jsonschema import ValidationError, validate
|
|
@@ -27,6 +27,7 @@ class DatabaseConfig(TypedDict, total=False):
|
|
|
27
27
|
sys_db_name: Optional[str]
|
|
28
28
|
ssl: Optional[bool]
|
|
29
29
|
ssl_ca: Optional[str]
|
|
30
|
+
local_suffix: Optional[bool]
|
|
30
31
|
app_db_client: Optional[str]
|
|
31
32
|
migrate: Optional[List[str]]
|
|
32
33
|
rollback: Optional[List[str]]
|
|
@@ -164,6 +165,11 @@ def load_config(config_file_path: str = "dbos-config.yaml") -> ConfigFile:
|
|
|
164
165
|
if "runtimeConfig" not in data or "start" not in data["runtimeConfig"]:
|
|
165
166
|
raise DBOSInitializationError(f"dbos-config.yaml must specify a start command")
|
|
166
167
|
|
|
168
|
+
data = cast(ConfigFile, data)
|
|
169
|
+
|
|
170
|
+
if "local_suffix" in data["database"] and data["database"]["local_suffix"]:
|
|
171
|
+
data["database"]["app_db_name"] = f"{data['database']['app_db_name']}_local"
|
|
172
|
+
|
|
167
173
|
# Return data as ConfigFile type
|
|
168
174
|
return data # type: ignore
|
|
169
175
|
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
dbos-0.10.
|
|
2
|
-
dbos-0.10.
|
|
3
|
-
dbos-0.10.
|
|
4
|
-
dbos-0.10.
|
|
1
|
+
dbos-0.10.0a1.dist-info/METADATA,sha256=_MWMzMVceoc9-VTIe-gcHtlZJYI2M6Cc-J-n8hWdUpM,5011
|
|
2
|
+
dbos-0.10.0a1.dist-info/WHEEL,sha256=pM0IBB6ZwH3nkEPhtcp50KvKNX-07jYtnb1g1m6Z4Co,90
|
|
3
|
+
dbos-0.10.0a1.dist-info/entry_points.txt,sha256=z6GcVANQV7Uw_82H9Ob2axJX6V3imftyZsljdh-M1HU,54
|
|
4
|
+
dbos-0.10.0a1.dist-info/licenses/LICENSE,sha256=VGZit_a5-kdw9WT6fY5jxAWVwGQzgLFyPWrcVVUhVNU,1067
|
|
5
5
|
dbos/__init__.py,sha256=-h1QgWNL11CiLlHEKa2ycAJVJw5SXYZ4BGNNWBAiE9k,726
|
|
6
6
|
dbos/admin_sever.py,sha256=Qg5T3YRrbPW05PR_99yAaxgo1ugQrAp_uTeTqSfjm_k,3397
|
|
7
7
|
dbos/application_database.py,sha256=knFK8We8y6WrIpnFCKvFq5hvSuFQqUuJqOqDpSVMCPI,5521
|
|
8
8
|
dbos/cli.py,sha256=z5dXbbnGWzSC3E1rfS8Lp1_OIImzcDKM7jP-iu_Q4aI,8602
|
|
9
9
|
dbos/context.py,sha256=4MsxZdoh1WIsgoUsaxo0B6caGN6xq2WC60MzbBppzGk,17738
|
|
10
10
|
dbos/core.py,sha256=ggsRC2XicvNI1qqruEFoqxoTU5oSSnhMZvDih3AG_3A,30879
|
|
11
|
-
dbos/dbos-config.schema.json,sha256=
|
|
11
|
+
dbos/dbos-config.schema.json,sha256=GQAxrtERczP-ANpzJJJbhCp_CUtQ8pUcH87AqlyC02A,5697
|
|
12
12
|
dbos/dbos.py,sha256=Gpfhpy-fFQh0nYbTTOabfOKD42Gpl72zgVuzzaCURtI,30015
|
|
13
|
-
dbos/dbos_config.py,sha256=
|
|
13
|
+
dbos/dbos_config.py,sha256=N48Ll-57lKVuh4SF3sLD4W4VnuELAGYA71j3oZPc6Sw,5622
|
|
14
14
|
dbos/decorators.py,sha256=lbPefsLK6Cya4cb7TrOcLglOpGT3pc6qjZdsQKlfZLg,629
|
|
15
15
|
dbos/error.py,sha256=UETk8CoZL-TO2Utn1-E7OSWelhShWmKM-fOlODMR9PE,3893
|
|
16
16
|
dbos/fastapi.py,sha256=gx9hlpxYOiwbuhSlbY9bn5C-F_FsCbrJvkX9ZAvDG6U,3418
|
|
@@ -51,4 +51,4 @@ dbos/templates/hello/start_postgres_docker.py,sha256=lQVLlYO5YkhGPEgPqwGc7Y8uDKs
|
|
|
51
51
|
dbos/tracer.py,sha256=GaXDhdKKF_IQp5SAMipGXiDVwteRKjNbrXyYCH1mor0,2520
|
|
52
52
|
dbos/utils.py,sha256=lwRymY-y7GprAS8pKmbICQvOJd5eGxKGTxCMFn0OwaQ,1739
|
|
53
53
|
version/__init__.py,sha256=L4sNxecRuqdtSFdpUGX3TtBi9KL3k7YsZVIvv-fv9-A,1678
|
|
54
|
-
dbos-0.10.
|
|
54
|
+
dbos-0.10.0a1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|