Metadata-Version: 2.1
Name: ergate
Version: 0.0.dev0
Summary: Workflows made easy, the agnostic way
Author: prryplatypus
License: MIT License
        
        Copyright (c) 2024 Néstor Pérez
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: homepage, https://github.com/prryplatypus/ergate
Keywords: workflow,worker
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: pydantic >=2.0.0
Provides-Extra: test
Requires-Dist: mypy ; extra == 'test'
Requires-Dist: ruff ; extra == 'test'
Requires-Dist: flake8 ; extra == 'test'
Requires-Dist: flake8-pyproject ; extra == 'test'

# Ergate
Workflows made easy, the agnostic way.

> [!NOTE]
> There's plenty of more features that aren't yet documented. For example, Ergate supports dependency injection via `Depends(...)` in a similar way to FastAPI. Feel free to open a GitHub issue if you have any questions while we work on adding documentation to the project.

## Simple example usage

```py
from ergate import Ergate, Job, Workflow

class WorkerQueue:
    def get_one(self) -> Job:
        ...  # You implement this

    def put(self, job: Job) -> None:
        ...  # You implement this

class JobStateStore:
    def update(self, job: Job) -> None:
        ...  # You implement this


workflow = Workflow(unique_name="my_first_workflow")

@workflow.step
def say_hi() -> None:
    print("Hello world")

@workflow.step
def say_bye() -> None:
    print("Goodbye world")

app = Ergate(queue=WorkerQueue(), job_state_store=JobStateStore())
app.register_workflow(workflow)

if __name__ == "__main__":
    app.run()
```


## Acknowledgements
- [Ziply Fiber](https://ziplyfiber.com): For giving me the initial idea to create this project and allowing me to turn it into a personal, open-source project.
- [FastAPI](https://github.com/tiangolo/fastapi): For inspiring me on the implementation of a bunch of the features supported by Ergate (such as the use of `Depends` for argument injection).
- [Sanic](https://github.com/sanic-org/sanic): For getting me originally into the open-source world and for their use of unique names in blueprints (similar to workflows in Ergate).
