dbos 0.7.0a0__tar.gz → 0.7.0a1__tar.gz

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.

Files changed (69) hide show
  1. {dbos-0.7.0a0 → dbos-0.7.0a1}/PKG-INFO +4 -4
  2. {dbos-0.7.0a0 → dbos-0.7.0a1}/README.md +3 -3
  3. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/cli.py +6 -1
  4. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/templates/hello/dbos-config.yaml.dbos +1 -1
  5. {dbos-0.7.0a0 → dbos-0.7.0a1}/pyproject.toml +1 -1
  6. {dbos-0.7.0a0 → dbos-0.7.0a1}/LICENSE +0 -0
  7. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/__init__.py +0 -0
  8. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/admin_sever.py +0 -0
  9. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/application_database.py +0 -0
  10. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/context.py +0 -0
  11. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/core.py +0 -0
  12. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/dbos-config.schema.json +0 -0
  13. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/dbos.py +0 -0
  14. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/dbos_config.py +0 -0
  15. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/decorators.py +0 -0
  16. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/error.py +0 -0
  17. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/fastapi.py +0 -0
  18. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/flask.py +0 -0
  19. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/kafka.py +0 -0
  20. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/kafka_message.py +0 -0
  21. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/logger.py +0 -0
  22. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/migrations/env.py +0 -0
  23. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/migrations/script.py.mako +0 -0
  24. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/migrations/versions/5c361fc04708_added_system_tables.py +0 -0
  25. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/migrations/versions/a3b18ad34abe_added_triggers.py +0 -0
  26. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/py.typed +0 -0
  27. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/recovery.py +0 -0
  28. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/registrations.py +0 -0
  29. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/request.py +0 -0
  30. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/roles.py +0 -0
  31. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/scheduler/croniter.py +0 -0
  32. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/scheduler/scheduler.py +0 -0
  33. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/schemas/__init__.py +0 -0
  34. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/schemas/application_database.py +0 -0
  35. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/schemas/system_database.py +0 -0
  36. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/system_database.py +0 -0
  37. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/templates/hello/README.md +0 -0
  38. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/templates/hello/__package/__init__.py +0 -0
  39. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/templates/hello/__package/main.py +0 -0
  40. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/templates/hello/__package/schema.py +0 -0
  41. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/templates/hello/alembic.ini +0 -0
  42. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/templates/hello/migrations/env.py.dbos +0 -0
  43. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/templates/hello/migrations/script.py.mako +0 -0
  44. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/templates/hello/migrations/versions/2024_07_31_180642_init.py +0 -0
  45. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/templates/hello/start_postgres_docker.py +0 -0
  46. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/tracer.py +0 -0
  47. {dbos-0.7.0a0 → dbos-0.7.0a1}/dbos/utils.py +0 -0
  48. {dbos-0.7.0a0 → dbos-0.7.0a1}/tests/__init__.py +0 -0
  49. {dbos-0.7.0a0 → dbos-0.7.0a1}/tests/atexit_no_ctor.py +0 -0
  50. {dbos-0.7.0a0 → dbos-0.7.0a1}/tests/atexit_no_launch.py +0 -0
  51. {dbos-0.7.0a0 → dbos-0.7.0a1}/tests/classdefs.py +0 -0
  52. {dbos-0.7.0a0 → dbos-0.7.0a1}/tests/conftest.py +0 -0
  53. {dbos-0.7.0a0 → dbos-0.7.0a1}/tests/more_classdefs.py +0 -0
  54. {dbos-0.7.0a0 → dbos-0.7.0a1}/tests/scheduler/test_croniter.py +0 -0
  55. {dbos-0.7.0a0 → dbos-0.7.0a1}/tests/scheduler/test_scheduler.py +0 -0
  56. {dbos-0.7.0a0 → dbos-0.7.0a1}/tests/test_admin_server.py +0 -0
  57. {dbos-0.7.0a0 → dbos-0.7.0a1}/tests/test_classdecorators.py +0 -0
  58. {dbos-0.7.0a0 → dbos-0.7.0a1}/tests/test_concurrency.py +0 -0
  59. {dbos-0.7.0a0 → dbos-0.7.0a1}/tests/test_config.py +0 -0
  60. {dbos-0.7.0a0 → dbos-0.7.0a1}/tests/test_dbos.py +0 -0
  61. {dbos-0.7.0a0 → dbos-0.7.0a1}/tests/test_failures.py +0 -0
  62. {dbos-0.7.0a0 → dbos-0.7.0a1}/tests/test_fastapi.py +0 -0
  63. {dbos-0.7.0a0 → dbos-0.7.0a1}/tests/test_fastapi_roles.py +0 -0
  64. {dbos-0.7.0a0 → dbos-0.7.0a1}/tests/test_flask.py +0 -0
  65. {dbos-0.7.0a0 → dbos-0.7.0a1}/tests/test_kafka.py +0 -0
  66. {dbos-0.7.0a0 → dbos-0.7.0a1}/tests/test_package.py +0 -0
  67. {dbos-0.7.0a0 → dbos-0.7.0a1}/tests/test_schema_migration.py +0 -0
  68. {dbos-0.7.0a0 → dbos-0.7.0a1}/tests/test_singleton.py +0 -0
  69. {dbos-0.7.0a0 → dbos-0.7.0a1}/version/__init__.py +0 -0
@@ -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`.
@@ -68,7 +68,7 @@ def step_two():
68
68
  print("Step two completed!")
69
69
 
70
70
  @DBOS.workflow()
71
- def workflow():
71
+ def dbos_workflow():
72
72
  step_one()
73
73
  for _ in range(5):
74
74
  print("Press Control + \ to stop the app...")
@@ -76,8 +76,8 @@ def workflow():
76
76
  step_two()
77
77
 
78
78
  @app.get("/")
79
- def endpoint():
80
- workflow()
79
+ def fastapi_endpoint():
80
+ dbos_workflow()
81
81
  ```
82
82
 
83
83
  Save the program into `main.py`, edit `dbos-config.yaml` to configure your Postgres connection settings, and start it with `fastapi run`.
@@ -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
@@ -23,7 +23,7 @@ dependencies = [
23
23
  ]
24
24
  requires-python = ">=3.9"
25
25
  readme = "README.md"
26
- version = "0.7.0a0"
26
+ version = "0.7.0a1"
27
27
 
28
28
  [project.license]
29
29
  text = "MIT"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes