dbos 0.9.0a2__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.
@@ -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,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dbos
3
- Version: 0.9.0a2
3
+ Version: 0.10.0a1
4
4
  Summary: Ultra-lightweight durable execution in Python
5
5
  Author-Email: "DBOS, Inc." <contact@dbos.dev>
6
6
  License: MIT
@@ -1,16 +1,16 @@
1
- dbos-0.9.0a2.dist-info/METADATA,sha256=3zdljA8m1Nx3WWoi6RM44BQL8-vRvR3heaHs49opvLY,5010
2
- dbos-0.9.0a2.dist-info/WHEEL,sha256=Vza3XR51HW1KmFP0iIMUVYIvz0uQuKJpIXKYOBGQyFQ,90
3
- dbos-0.9.0a2.dist-info/entry_points.txt,sha256=z6GcVANQV7Uw_82H9Ob2axJX6V3imftyZsljdh-M1HU,54
4
- dbos-0.9.0a2.dist-info/licenses/LICENSE,sha256=VGZit_a5-kdw9WT6fY5jxAWVwGQzgLFyPWrcVVUhVNU,1067
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=kshzCdX6fXW7yqRiMz9a324HLe76IrPeRDgzcAbgck0,5481
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=r-epY2JSSyqsZVEYKf-lPs6aQUsZaSDC-Js1HHR84kY,5382
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.9.0a2.dist-info/RECORD,,
54
+ dbos-0.10.0a1.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: pdm-backend (2.4.1)
2
+ Generator: pdm-backend (2.4.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any