horsies 0.1.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.
Files changed (48) hide show
  1. horsies-0.1.0a1/PKG-INFO +31 -0
  2. horsies-0.1.0a1/README.md +5 -0
  3. horsies-0.1.0a1/horsies/__init__.py +115 -0
  4. horsies-0.1.0a1/horsies/core/__init__.py +0 -0
  5. horsies-0.1.0a1/horsies/core/app.py +552 -0
  6. horsies-0.1.0a1/horsies/core/banner.py +144 -0
  7. horsies-0.1.0a1/horsies/core/brokers/__init__.py +5 -0
  8. horsies-0.1.0a1/horsies/core/brokers/listener.py +444 -0
  9. horsies-0.1.0a1/horsies/core/brokers/postgres.py +864 -0
  10. horsies-0.1.0a1/horsies/core/cli.py +624 -0
  11. horsies-0.1.0a1/horsies/core/codec/serde.py +575 -0
  12. horsies-0.1.0a1/horsies/core/errors.py +535 -0
  13. horsies-0.1.0a1/horsies/core/logging.py +90 -0
  14. horsies-0.1.0a1/horsies/core/models/__init__.py +0 -0
  15. horsies-0.1.0a1/horsies/core/models/app.py +268 -0
  16. horsies-0.1.0a1/horsies/core/models/broker.py +79 -0
  17. horsies-0.1.0a1/horsies/core/models/queues.py +23 -0
  18. horsies-0.1.0a1/horsies/core/models/recovery.py +101 -0
  19. horsies-0.1.0a1/horsies/core/models/schedule.py +229 -0
  20. horsies-0.1.0a1/horsies/core/models/task_pg.py +307 -0
  21. horsies-0.1.0a1/horsies/core/models/tasks.py +332 -0
  22. horsies-0.1.0a1/horsies/core/models/workflow.py +1988 -0
  23. horsies-0.1.0a1/horsies/core/models/workflow_pg.py +245 -0
  24. horsies-0.1.0a1/horsies/core/registry/tasks.py +101 -0
  25. horsies-0.1.0a1/horsies/core/scheduler/__init__.py +26 -0
  26. horsies-0.1.0a1/horsies/core/scheduler/calculator.py +267 -0
  27. horsies-0.1.0a1/horsies/core/scheduler/service.py +569 -0
  28. horsies-0.1.0a1/horsies/core/scheduler/state.py +260 -0
  29. horsies-0.1.0a1/horsies/core/task_decorator.py +615 -0
  30. horsies-0.1.0a1/horsies/core/types/status.py +38 -0
  31. horsies-0.1.0a1/horsies/core/utils/imports.py +203 -0
  32. horsies-0.1.0a1/horsies/core/utils/loop_runner.py +44 -0
  33. horsies-0.1.0a1/horsies/core/worker/current.py +17 -0
  34. horsies-0.1.0a1/horsies/core/worker/worker.py +1967 -0
  35. horsies-0.1.0a1/horsies/core/workflows/__init__.py +23 -0
  36. horsies-0.1.0a1/horsies/core/workflows/engine.py +2344 -0
  37. horsies-0.1.0a1/horsies/core/workflows/recovery.py +501 -0
  38. horsies-0.1.0a1/horsies/core/workflows/registry.py +97 -0
  39. horsies-0.1.0a1/horsies/py.typed +0 -0
  40. horsies-0.1.0a1/horsies.egg-info/PKG-INFO +31 -0
  41. horsies-0.1.0a1/horsies.egg-info/SOURCES.txt +46 -0
  42. horsies-0.1.0a1/horsies.egg-info/dependency_links.txt +1 -0
  43. horsies-0.1.0a1/horsies.egg-info/entry_points.txt +2 -0
  44. horsies-0.1.0a1/horsies.egg-info/requires.txt +6 -0
  45. horsies-0.1.0a1/horsies.egg-info/top_level.txt +1 -0
  46. horsies-0.1.0a1/pyproject.toml +86 -0
  47. horsies-0.1.0a1/setup.cfg +4 -0
  48. horsies-0.1.0a1/tests/test_issue_fixes.py +239 -0
@@ -0,0 +1,31 @@
1
+ Metadata-Version: 2.4
2
+ Name: horsies
3
+ Version: 0.1.0a1
4
+ Summary: A Python library for distributed task execution
5
+ Author: Suleyman Ozkeskin
6
+ License-Expression: MIT
7
+ Project-URL: Homepage, https://github.com/suleymanozkeskin/horsies
8
+ Project-URL: Repository, https://github.com/suleymanozkeskin/horsies
9
+ Project-URL: Issues, https://github.com/suleymanozkeskin/horsies/issues
10
+ Keywords: task-queue,workflow-engine,dag,scheduling,distributed,postgres,async
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Classifier: Topic :: Software Development :: Libraries
15
+ Classifier: Topic :: System :: Distributed Computing
16
+ Classifier: Topic :: System :: Networking
17
+ Classifier: Typing :: Typed
18
+ Requires-Python: >=3.13
19
+ Description-Content-Type: text/markdown
20
+ Requires-Dist: greenlet>=3.3.0
21
+ Requires-Dist: psutil>=7.2.1
22
+ Requires-Dist: psycopg>=3.3.2
23
+ Requires-Dist: psycopg-pool>=3.2.0
24
+ Requires-Dist: pydantic>=2.12.5
25
+ Requires-Dist: sqlalchemy>=2.0.46
26
+
27
+ # Horsies
28
+
29
+ A PostgreSQL-backed distributed task queue and workflow engine for Python.
30
+
31
+ Documentation: [horsies docs](https://github.com/suleymanozkeskin/horsies/tree/main/website)
@@ -0,0 +1,5 @@
1
+ # Horsies
2
+
3
+ A PostgreSQL-backed distributed task queue and workflow engine for Python.
4
+
5
+ Documentation: [horsies docs](https://github.com/suleymanozkeskin/horsies/tree/main/website)
@@ -0,0 +1,115 @@
1
+ """Task Library - A Python library for distributed task execution"""
2
+
3
+ # Install Rust-style error handler on import
4
+ from .core.errors import install_error_handler as _install_error_handler
5
+
6
+ _install_error_handler()
7
+
8
+ from .core.app import Horsies
9
+ from .core.models.app import AppConfig
10
+ from .core.models.broker import PostgresConfig
11
+ from .core.models.tasks import (
12
+ TaskResult,
13
+ TaskError,
14
+ LibraryErrorCode,
15
+ SubWorkflowError,
16
+ RetryPolicy,
17
+ )
18
+ from .core.models.queues import QueueMode, CustomQueueConfig
19
+ from .core.models.workflow import (
20
+ WorkflowSpec,
21
+ TaskNode,
22
+ SubWorkflowNode,
23
+ AnyNode,
24
+ WorkflowHandle,
25
+ WorkflowStatus,
26
+ WorkflowTaskStatus,
27
+ WorkflowContext,
28
+ WorkflowMeta,
29
+ OnError,
30
+ WorkflowValidationError,
31
+ WorkflowDefinition,
32
+ slugify,
33
+ SubWorkflowRetryMode,
34
+ SubWorkflowSummary,
35
+ SuccessCase,
36
+ SuccessPolicy,
37
+ NodeKey,
38
+ WorkflowTaskInfo,
39
+ WorkflowContextMissingIdError,
40
+ WorkflowHandleMissingIdError,
41
+ WORKFLOW_TERMINAL_STATES,
42
+ WORKFLOW_TASK_TERMINAL_STATES,
43
+ )
44
+ from .core.workflows.engine import start_workflow, start_workflow_async
45
+ from .core.models.schedule import (
46
+ Weekday,
47
+ IntervalSchedule,
48
+ HourlySchedule,
49
+ DailySchedule,
50
+ WeeklySchedule,
51
+ MonthlySchedule,
52
+ SchedulePattern,
53
+ TaskSchedule,
54
+ ScheduleConfig,
55
+ )
56
+ from .core.models.recovery import RecoveryConfig
57
+ from .core.types.status import TaskStatus, TASK_TERMINAL_STATES
58
+ from .core.errors import ErrorCode, ValidationReport, MultipleValidationErrors
59
+
60
+ __all__ = [
61
+ # Core
62
+ 'Horsies',
63
+ 'AppConfig',
64
+ 'PostgresConfig',
65
+ 'TaskResult',
66
+ 'TaskError',
67
+ 'LibraryErrorCode',
68
+ 'SubWorkflowError',
69
+ 'RetryPolicy',
70
+ 'QueueMode',
71
+ 'CustomQueueConfig',
72
+ 'TaskStatus',
73
+ 'TASK_TERMINAL_STATES',
74
+ 'ErrorCode',
75
+ 'ValidationReport',
76
+ 'MultipleValidationErrors',
77
+ # Workflow
78
+ 'WorkflowSpec',
79
+ 'TaskNode',
80
+ 'SubWorkflowNode',
81
+ 'AnyNode',
82
+ 'WorkflowHandle',
83
+ 'WorkflowStatus',
84
+ 'WorkflowTaskStatus',
85
+ 'WorkflowContext',
86
+ 'WorkflowMeta',
87
+ 'OnError',
88
+ 'WorkflowValidationError',
89
+ 'WorkflowDefinition',
90
+ 'slugify',
91
+ 'SubWorkflowRetryMode',
92
+ 'SubWorkflowSummary',
93
+ 'SuccessCase',
94
+ 'SuccessPolicy',
95
+ 'NodeKey',
96
+ 'WorkflowTaskInfo',
97
+ 'WorkflowContextMissingIdError',
98
+ 'WorkflowHandleMissingIdError',
99
+ 'WORKFLOW_TERMINAL_STATES',
100
+ 'WORKFLOW_TASK_TERMINAL_STATES',
101
+ 'start_workflow',
102
+ 'start_workflow_async',
103
+ # Scheduling
104
+ 'Weekday',
105
+ 'IntervalSchedule',
106
+ 'HourlySchedule',
107
+ 'DailySchedule',
108
+ 'WeeklySchedule',
109
+ 'MonthlySchedule',
110
+ 'SchedulePattern',
111
+ 'TaskSchedule',
112
+ 'ScheduleConfig',
113
+ # Recovery
114
+ 'RecoveryConfig',
115
+ ]
File without changes