flowsmith 0.6.0__tar.gz → 0.6.1__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.
Files changed (36) hide show
  1. {flowsmith-0.6.0 → flowsmith-0.6.1}/PKG-INFO +1 -1
  2. flowsmith-0.6.1/flowsmith/migrations/mysql/001_create_flows.sql +38 -0
  3. flowsmith-0.6.1/flowsmith/migrations/mysql/002_create_nodes.sql +46 -0
  4. flowsmith-0.6.1/flowsmith/migrations/postgres/001_create_flows.sql +13 -0
  5. flowsmith-0.6.1/flowsmith/migrations/postgres/002_create_nodes.sql +18 -0
  6. {flowsmith-0.6.0 → flowsmith-0.6.1}/flowsmith.egg-info/PKG-INFO +1 -1
  7. {flowsmith-0.6.0 → flowsmith-0.6.1}/flowsmith.egg-info/SOURCES.txt +4 -0
  8. {flowsmith-0.6.0 → flowsmith-0.6.1}/pyproject.toml +4 -1
  9. {flowsmith-0.6.0 → flowsmith-0.6.1}/LICENSE +0 -0
  10. {flowsmith-0.6.0 → flowsmith-0.6.1}/README.md +0 -0
  11. {flowsmith-0.6.0 → flowsmith-0.6.1}/flowsmith/__init__.py +0 -0
  12. {flowsmith-0.6.0 → flowsmith-0.6.1}/flowsmith/__main__.py +0 -0
  13. {flowsmith-0.6.0 → flowsmith-0.6.1}/flowsmith/config.py +0 -0
  14. {flowsmith-0.6.0 → flowsmith-0.6.1}/flowsmith/context.py +0 -0
  15. {flowsmith-0.6.0 → flowsmith-0.6.1}/flowsmith/contrib/__init__.py +0 -0
  16. {flowsmith-0.6.0 → flowsmith-0.6.1}/flowsmith/decorators.py +0 -0
  17. {flowsmith-0.6.0 → flowsmith-0.6.1}/flowsmith/exceptions.py +0 -0
  18. {flowsmith-0.6.0 → flowsmith-0.6.1}/flowsmith/executor.py +0 -0
  19. {flowsmith-0.6.0 → flowsmith-0.6.1}/flowsmith/flow.py +0 -0
  20. {flowsmith-0.6.0 → flowsmith-0.6.1}/flowsmith/migrations/__init__.py +0 -0
  21. {flowsmith-0.6.0 → flowsmith-0.6.1}/flowsmith/models/__init__.py +0 -0
  22. {flowsmith-0.6.0 → flowsmith-0.6.1}/flowsmith/models/flow_record.py +0 -0
  23. {flowsmith-0.6.0 → flowsmith-0.6.1}/flowsmith/models/node_record.py +0 -0
  24. {flowsmith-0.6.0 → flowsmith-0.6.1}/flowsmith/py.typed +0 -0
  25. {flowsmith-0.6.0 → flowsmith-0.6.1}/flowsmith/step.py +0 -0
  26. {flowsmith-0.6.0 → flowsmith-0.6.1}/flowsmith/storage/__init__.py +0 -0
  27. {flowsmith-0.6.0 → flowsmith-0.6.1}/flowsmith/storage/base.py +0 -0
  28. {flowsmith-0.6.0 → flowsmith-0.6.1}/flowsmith/storage/memory.py +0 -0
  29. {flowsmith-0.6.0 → flowsmith-0.6.1}/flowsmith/storage/mysql.py +0 -0
  30. {flowsmith-0.6.0 → flowsmith-0.6.1}/flowsmith/storage/postgres.py +0 -0
  31. {flowsmith-0.6.0 → flowsmith-0.6.1}/flowsmith/watchdog.py +0 -0
  32. {flowsmith-0.6.0 → flowsmith-0.6.1}/flowsmith.egg-info/dependency_links.txt +0 -0
  33. {flowsmith-0.6.0 → flowsmith-0.6.1}/flowsmith.egg-info/entry_points.txt +0 -0
  34. {flowsmith-0.6.0 → flowsmith-0.6.1}/flowsmith.egg-info/requires.txt +0 -0
  35. {flowsmith-0.6.0 → flowsmith-0.6.1}/flowsmith.egg-info/top_level.txt +0 -0
  36. {flowsmith-0.6.0 → flowsmith-0.6.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flowsmith
3
- Version: 0.6.0
3
+ Version: 0.6.1
4
4
  Summary: Lightweight durable workflow execution for Python backends
5
5
  License: MIT
6
6
  Keywords: workflow,orchestration,durable,execution,backend
@@ -0,0 +1,38 @@
1
+ CREATE TABLE IF NOT EXISTS fs_flows (
2
+ id VARCHAR(255) NOT NULL PRIMARY KEY,
3
+ name VARCHAR(255) NOT NULL,
4
+ status VARCHAR(50) NOT NULL DEFAULT 'RUNNING',
5
+ input_data JSON NOT NULL,
6
+ output_data JSON,
7
+ error TEXT,
8
+ created_at DATETIME(6) NOT NULL DEFAULT NOW(6),
9
+ updated_at DATETIME(6) NOT NULL DEFAULT NOW(6) ON UPDATE NOW(6)
10
+ );
11
+
12
+ -- Create indexes only if they don't already exist
13
+ -- (MySQL does not support CREATE INDEX IF NOT EXISTS)
14
+ DROP PROCEDURE IF EXISTS fs_create_indexes_flows;
15
+
16
+ CREATE PROCEDURE fs_create_indexes_flows()
17
+ BEGIN
18
+ IF NOT EXISTS (
19
+ SELECT 1 FROM information_schema.statistics
20
+ WHERE table_schema = DATABASE()
21
+ AND table_name = 'fs_flows'
22
+ AND index_name = 'idx_fs_flows_status'
23
+ ) THEN
24
+ CREATE INDEX idx_fs_flows_status ON fs_flows (status);
25
+ END IF;
26
+
27
+ IF NOT EXISTS (
28
+ SELECT 1 FROM information_schema.statistics
29
+ WHERE table_schema = DATABASE()
30
+ AND table_name = 'fs_flows'
31
+ AND index_name = 'idx_fs_flows_name'
32
+ ) THEN
33
+ CREATE INDEX idx_fs_flows_name ON fs_flows (name);
34
+ END IF;
35
+ END;
36
+
37
+ CALL fs_create_indexes_flows();
38
+ DROP PROCEDURE IF EXISTS fs_create_indexes_flows;
@@ -0,0 +1,46 @@
1
+ CREATE TABLE IF NOT EXISTS fs_nodes (
2
+ id VARCHAR(36) NOT NULL PRIMARY KEY DEFAULT (UUID()),
3
+ flow_id VARCHAR(255) NOT NULL,
4
+ step_name VARCHAR(255) NOT NULL,
5
+ status VARCHAR(50) NOT NULL DEFAULT 'RUNNING',
6
+ input_data JSON,
7
+ output_data JSON,
8
+ error TEXT,
9
+ attempt_count INT NOT NULL DEFAULT 1,
10
+ started_at DATETIME(6),
11
+ ended_at DATETIME(6),
12
+
13
+ CONSTRAINT fk_fs_nodes_flow
14
+ FOREIGN KEY (flow_id) REFERENCES fs_flows(id)
15
+ ON DELETE CASCADE,
16
+
17
+ CONSTRAINT uq_fs_nodes_flow_step
18
+ UNIQUE (flow_id, step_name)
19
+ );
20
+
21
+ -- Create indexes only if they don't already exist
22
+ DROP PROCEDURE IF EXISTS fs_create_indexes_nodes;
23
+
24
+ CREATE PROCEDURE fs_create_indexes_nodes()
25
+ BEGIN
26
+ IF NOT EXISTS (
27
+ SELECT 1 FROM information_schema.statistics
28
+ WHERE table_schema = DATABASE()
29
+ AND table_name = 'fs_nodes'
30
+ AND index_name = 'idx_fs_nodes_flow_id'
31
+ ) THEN
32
+ CREATE INDEX idx_fs_nodes_flow_id ON fs_nodes (flow_id);
33
+ END IF;
34
+
35
+ IF NOT EXISTS (
36
+ SELECT 1 FROM information_schema.statistics
37
+ WHERE table_schema = DATABASE()
38
+ AND table_name = 'fs_nodes'
39
+ AND index_name = 'idx_fs_nodes_status'
40
+ ) THEN
41
+ CREATE INDEX idx_fs_nodes_status ON fs_nodes (status);
42
+ END IF;
43
+ END;
44
+
45
+ CALL fs_create_indexes_nodes();
46
+ DROP PROCEDURE IF EXISTS fs_create_indexes_nodes;
@@ -0,0 +1,13 @@
1
+ CREATE TABLE IF NOT EXISTS fs_flows (
2
+ id TEXT PRIMARY KEY, -- caller-supplied tracking_id
3
+ name TEXT NOT NULL, -- workflow name
4
+ status TEXT NOT NULL DEFAULT 'RUNNING', -- RUNNING | FAILED | COMPLETED
5
+ input_data JSONB NOT NULL DEFAULT '{}',
6
+ output_data JSONB,
7
+ error TEXT,
8
+ created_at TIMESTAMPTZ NOT NULL DEFAULT now(),
9
+ updated_at TIMESTAMPTZ NOT NULL DEFAULT now()
10
+ );
11
+
12
+ CREATE INDEX IF NOT EXISTS idx_fs_flows_status ON fs_flows (status);
13
+ CREATE INDEX IF NOT EXISTS idx_fs_flows_name ON fs_flows (name);
@@ -0,0 +1,18 @@
1
+ CREATE TABLE IF NOT EXISTS fs_nodes (
2
+ id TEXT PRIMARY KEY DEFAULT gen_random_uuid()::text,
3
+ flow_id TEXT NOT NULL REFERENCES fs_flows(id) ON DELETE CASCADE,
4
+ step_name TEXT NOT NULL,
5
+ status TEXT NOT NULL DEFAULT 'RUNNING', -- RUNNING | FAILED | COMPLETED
6
+ input_data JSONB,
7
+ output_data JSONB,
8
+ error TEXT,
9
+ attempt_count INT NOT NULL DEFAULT 1,
10
+ started_at TIMESTAMPTZ,
11
+ ended_at TIMESTAMPTZ,
12
+
13
+ -- Ensures only one node record per (flow, step) pair
14
+ CONSTRAINT uq_fs_nodes_flow_step UNIQUE (flow_id, step_name)
15
+ );
16
+
17
+ CREATE INDEX IF NOT EXISTS idx_fs_nodes_flow_id ON fs_nodes (flow_id);
18
+ CREATE INDEX IF NOT EXISTS idx_fs_nodes_status ON fs_nodes (status);
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: flowsmith
3
- Version: 0.6.0
3
+ Version: 0.6.1
4
4
  Summary: Lightweight durable workflow execution for Python backends
5
5
  License: MIT
6
6
  Keywords: workflow,orchestration,durable,execution,backend
@@ -20,6 +20,10 @@ flowsmith.egg-info/requires.txt
20
20
  flowsmith.egg-info/top_level.txt
21
21
  flowsmith/contrib/__init__.py
22
22
  flowsmith/migrations/__init__.py
23
+ flowsmith/migrations/mysql/001_create_flows.sql
24
+ flowsmith/migrations/mysql/002_create_nodes.sql
25
+ flowsmith/migrations/postgres/001_create_flows.sql
26
+ flowsmith/migrations/postgres/002_create_nodes.sql
23
27
  flowsmith/models/__init__.py
24
28
  flowsmith/models/flow_record.py
25
29
  flowsmith/models/node_record.py
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "flowsmith"
7
- version = "0.6.0"
7
+ version = "0.6.1"
8
8
  description = "Lightweight durable workflow execution for Python backends"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"
@@ -48,6 +48,9 @@ flowsmith = "flowsmith.__main__:main"
48
48
  where = ["."]
49
49
  include = ["flowsmith*"]
50
50
 
51
+ [tool.setuptools.package-data]
52
+ flowsmith = ["migrations/**/*.sql"]
53
+
51
54
  # ---------------------------------------------------------------------------
52
55
  # pytest
53
56
  # ---------------------------------------------------------------------------
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes