diff --git a/pyproject.toml b/pyproject.toml index 30c84d8..2d8affa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,6 +9,7 @@ classifiers = [ "Programming Language :: Python :: 3.9", "Topic :: Software Development :: Libraries :: Application Frameworks", ] +dependencies = ["graphlib_backport >= 1.0.0; python_version < '3.9'"] description = "Lightweight, type-safe DAG task scheduler with multi-strategy execution." keywords = ["async", "dag", "scheduler", "task", "workflow"] license = { text = "MIT" } @@ -16,8 +17,9 @@ name = "pyflowx" readme = "README.md" requires-python = ">=3.8" version = "0.1.1" -# graphlib_backport only needed on Python 3.8 (stdlib graphlib exists in 3.9+) -dependencies = ["graphlib_backport >= 1.0.0; python_version < '3.9'"] + +[project.scripts] +pyflowx-demo = "pyflowx.__main__:main" [project.optional-dependencies] dev = [ diff --git a/src/pyflowx/__main__.py b/src/pyflowx/__main__.py new file mode 100644 index 0000000..622e6f1 --- /dev/null +++ b/src/pyflowx/__main__.py @@ -0,0 +1,9 @@ +from pyflowx.examples.async_aggregation import main as async_aggregation_main +from pyflowx.examples.etl_pipeline import main as etl_pipeline_main +from pyflowx.examples.parallel_run import main as parallel_run_main + + +def main(): + async_aggregation_main() + etl_pipeline_main() + parallel_run_main() diff --git a/src/pyflowx/examples/__init__.py b/src/pyflowx/examples/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/examples/async_aggregation.py b/src/pyflowx/examples/async_aggregation.py similarity index 100% rename from examples/async_aggregation.py rename to src/pyflowx/examples/async_aggregation.py diff --git a/examples/etl_pipeline.py b/src/pyflowx/examples/etl_pipeline.py similarity index 100% rename from examples/etl_pipeline.py rename to src/pyflowx/examples/etl_pipeline.py diff --git a/examples/parallel_run.py b/src/pyflowx/examples/parallel_run.py similarity index 100% rename from examples/parallel_run.py rename to src/pyflowx/examples/parallel_run.py diff --git a/uv.lock b/uv.lock index aaa8c98..8d28ef9 100644 --- a/uv.lock +++ b/uv.lock @@ -1,5 +1,5 @@ version = 1 -revision = 1 +revision = 3 requires-python = ">=3.8" resolution-markers = [ "python_full_version >= '3.15'", @@ -2193,7 +2193,7 @@ wheels = [ [[package]] name = "pyflowx" -version = "0.1.0" +version = "0.1.1" source = { editable = "." } dependencies = [ { name = "graphlib-backport", marker = "python_full_version < '3.9'" },