dbos 0.7.0a0__py3-none-any.whl → 0.7.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.

Potentially problematic release.


This version of dbos might be problematic. Click here for more details.

dbos/cli.py CHANGED
@@ -12,7 +12,7 @@ from typing import Any
12
12
  import tomlkit
13
13
  import typer
14
14
  from rich import print
15
- from rich.prompt import Confirm, Prompt
15
+ from rich.prompt import Prompt
16
16
  from typing_extensions import Annotated
17
17
 
18
18
  from dbos import load_config
@@ -30,6 +30,7 @@ def on_windows() -> bool:
30
30
  def start() -> None:
31
31
  config = load_config()
32
32
  start_commands = config["runtimeConfig"]["start"]
33
+ typer.echo("Executing start commands from 'dbos-config.yaml'")
33
34
  for command in start_commands:
34
35
  typer.echo(f"Executing: {command}")
35
36
 
@@ -129,9 +130,12 @@ def copy_template(src_dir: str, project_name: str, config_mode: bool) -> None:
129
130
  "project_name": project_name,
130
131
  "package_name": package_name,
131
132
  "db_name": db_name,
133
+ "migration_command": "alembic upgrade head",
132
134
  }
133
135
 
134
136
  if config_mode:
137
+ ctx["package_name"] = "."
138
+ ctx["migration_command"] = "echo 'No migrations specified'"
135
139
  copy_dbos_template(
136
140
  os.path.join(src_dir, "dbos-config.yaml.dbos"),
137
141
  os.path.join(dst_dir, "dbos-config.yaml"),
@@ -244,6 +248,7 @@ def migrate() -> None:
244
248
  app_db.destroy()
245
249
 
246
250
  # Next, run any custom migration commands specified in the configuration
251
+ typer.echo("Executing migration commands from 'dbos-config.yaml'")
247
252
  try:
248
253
  migrate_commands = (
249
254
  config["database"]["migrate"]
@@ -15,7 +15,7 @@ database:
15
15
  password: ${PGPASSWORD}
16
16
  app_db_name: ${db_name}
17
17
  migrate:
18
- - alembic upgrade head
18
+ - ${migration_command}
19
19
  telemetry:
20
20
  logs:
21
21
  logLevel: INFO
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dbos
3
- Version: 0.7.0a0
3
+ Version: 0.7.0a1
4
4
  Summary: Ultra-lightweight durable execution in Python
5
5
  Author-Email: "DBOS, Inc." <contact@dbos.dev>
6
6
  License: MIT
@@ -91,7 +91,7 @@ def step_two():
91
91
  print("Step two completed!")
92
92
 
93
93
  @DBOS.workflow()
94
- def workflow():
94
+ def dbos_workflow():
95
95
  step_one()
96
96
  for _ in range(5):
97
97
  print("Press Control + \ to stop the app...")
@@ -99,8 +99,8 @@ def workflow():
99
99
  step_two()
100
100
 
101
101
  @app.get("/")
102
- def endpoint():
103
- workflow()
102
+ def fastapi_endpoint():
103
+ dbos_workflow()
104
104
  ```
105
105
 
106
106
  Save the program into `main.py`, edit `dbos-config.yaml` to configure your Postgres connection settings, and start it with `fastapi run`.
@@ -1,11 +1,11 @@
1
- dbos-0.7.0a0.dist-info/METADATA,sha256=x4O-g52DZCDhnpYf5SKAfG872Ee83HodkUzffOAhKhA,5000
2
- dbos-0.7.0a0.dist-info/WHEEL,sha256=rSwsxJWe3vzyR5HCwjWXQruDgschpei4h_giTm0dJVE,90
3
- dbos-0.7.0a0.dist-info/entry_points.txt,sha256=3PmOPbM4FYxEmggRRdJw0oAsiBzKR8U0yx7bmwUmMOM,39
4
- dbos-0.7.0a0.dist-info/licenses/LICENSE,sha256=VGZit_a5-kdw9WT6fY5jxAWVwGQzgLFyPWrcVVUhVNU,1067
1
+ dbos-0.7.0a1.dist-info/METADATA,sha256=4bqSoggIZ0fO2Lujar-irWppd8RZ-gS9NbA7MNfyCkY,5018
2
+ dbos-0.7.0a1.dist-info/WHEEL,sha256=rSwsxJWe3vzyR5HCwjWXQruDgschpei4h_giTm0dJVE,90
3
+ dbos-0.7.0a1.dist-info/entry_points.txt,sha256=3PmOPbM4FYxEmggRRdJw0oAsiBzKR8U0yx7bmwUmMOM,39
4
+ dbos-0.7.0a1.dist-info/licenses/LICENSE,sha256=VGZit_a5-kdw9WT6fY5jxAWVwGQzgLFyPWrcVVUhVNU,1067
5
5
  dbos/__init__.py,sha256=heuB3bqRXlVdfea9sKHBIVKSqFP6UuwhQecQfV4hyas,642
6
6
  dbos/admin_sever.py,sha256=Qg5T3YRrbPW05PR_99yAaxgo1ugQrAp_uTeTqSfjm_k,3397
7
7
  dbos/application_database.py,sha256=1K3kE96BgGi_QWOd2heXluyNTwFAwlUVuAR6JKKUqf0,5659
8
- dbos/cli.py,sha256=YARlQiWHUwFni-fEOr0k5P_-pqPS4xkywj_B0oTMXn0,8318
8
+ dbos/cli.py,sha256=z5dXbbnGWzSC3E1rfS8Lp1_OIImzcDKM7jP-iu_Q4aI,8602
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
@@ -38,7 +38,7 @@ dbos/templates/hello/__package/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5
38
38
  dbos/templates/hello/__package/main.py,sha256=eI0SS9Nwj-fldtiuSzIlIG6dC91GXXwdRsoHxv6S_WI,2719
39
39
  dbos/templates/hello/__package/schema.py,sha256=7Z27JGC8yy7Z44cbVXIREYxtUhU4JVkLCp5Q7UahVQ0,260
40
40
  dbos/templates/hello/alembic.ini,sha256=VKBn4Gy8mMuCdY7Hip1jmo3wEUJ1VG1aW7EqY0_n-as,3695
41
- dbos/templates/hello/dbos-config.yaml.dbos,sha256=8wxCf_MIEFNWqMXj0nAHUwg1U3YaKz4xcUN6g51WkDE,603
41
+ dbos/templates/hello/dbos-config.yaml.dbos,sha256=X-Ocywo8_QUr2-Xj2AiiBYL0tcd0E3Yl7FuP6fy3gRM,603
42
42
  dbos/templates/hello/migrations/env.py.dbos,sha256=CsiFOea3ZIsahqkfYtioha0ewmlGR78Ng0wOB2t5LQg,2208
43
43
  dbos/templates/hello/migrations/script.py.mako,sha256=MEqL-2qATlST9TAOeYgscMn1uy6HUS9NFvDgl93dMj8,635
44
44
  dbos/templates/hello/migrations/versions/2024_07_31_180642_init.py,sha256=U5thFWGqNN4QLrNXT7wUUqftIFDNE5eSdqD8JNW1mec,942
@@ -46,4 +46,4 @@ dbos/templates/hello/start_postgres_docker.py,sha256=lQVLlYO5YkhGPEgPqwGc7Y8uDKs
46
46
  dbos/tracer.py,sha256=GaXDhdKKF_IQp5SAMipGXiDVwteRKjNbrXyYCH1mor0,2520
47
47
  dbos/utils.py,sha256=hWj9iWDrby2cVEhb0pG-IdnrxLqP64NhkaWUXiLc8bA,402
48
48
  version/__init__.py,sha256=L4sNxecRuqdtSFdpUGX3TtBi9KL3k7YsZVIvv-fv9-A,1678
49
- dbos-0.7.0a0.dist-info/RECORD,,
49
+ dbos-0.7.0a1.dist-info/RECORD,,
File without changes