Metadata-Version: 2.4
Name: rocketry-fix
Version: 2.5.1.2.dev0
Summary: Advanced scheduling framework
Author-email: Mikael Koli <koli.mikael@gmail.com>, Brian <brianngia@gmail.com>
License: MIT License
        
        Copyright (c) 2021 Mikael Koli
        
        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: OriginHomepage, https://github.com/Miksus/rocketry
Project-URL: Documentation, https://rocketry.readthedocs.io
Project-URL: OriginFunding, https://github.com/sponsors/Miksus
Project-URL: OriginSource, https://github.com/Miksus/rocketry
Project-URL: OriginChangelog, https://rocketry.readthedocs.io/en/stable/versions.html
Project-URL: NewHomepage, https://github.com/brianMacao/rocketry-fix
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: System
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Office/Business :: Scheduling
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Intended Audience :: Information Technology
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: python-dateutil
Requires-Dist: redbird>=0.5.0
Requires-Dist: pydantic
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Requires-Dist: pytest-asyncio; extra == "test"
Provides-Extra: docs
Requires-Dist: sphinx>=1.7.5; extra == "docs"
Requires-Dist: pydata-sphinx-theme; extra == "docs"
Requires-Dist: sphinx_book_theme; extra == "docs"
Requires-Dist: sphinx-copybutton; extra == "docs"
Requires-Dist: sphinx-material; extra == "docs"
Dynamic: license-file



<h1 align="center"><a href="https://rocketry.readthedocs.io">Rocketry</a></h1>
<p align="center">
    <em>The engine to power your Python apps</em>
</p>
<p align="center">
    <a href="https://github.com/Miksus/rocketry/actions/workflows/main.yml/badge.svg?branch=master" target="_blank">
        <img src="https://github.com/Miksus/rocketry/actions/workflows/main.yml/badge.svg?branch=master" alt="Test">
    </a>
    <a href="https://codecov.io/gh/Miksus/rocketry" target="_blank">
        <img src="https://codecov.io/gh/Miksus/rocketry/branch/master/graph/badge.svg?token=U2KF1QA5HT" alt="Test coverage">
    </a>
    <a href="https://pypi.org/project/rocketry" target="_blank">
        <img src="https://badgen.net/pypi/v/rocketry?color=969696" alt="Package version">
    </a>
    <a href="https://pypi.org/project/rocketry" target="_blank">
        <img src="https://badgen.net/pypi/python/rocketry?color=969696&labelColor=black" alt="Supported Python versions">
    </a>
</p>

-----------------

## What is it?

Rocketry is a modern statement-based scheduling framework 
for Python. It is simple, clean and extensive.
It is suitable for small and big projects.

This is how it looks like:

```python
from rocketry import Rocketry
from rocketry.conds import daily

app = Rocketry()

@app.task(daily)
def do_daily():
    ...

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

Core functionalities:

- Powerful scheduling
- Concurrency (async, threading, multiprocess)
- Parametrization
- Task pipelining
- Modifiable session also in runtime
- Async support

Links:

- Documentation: https://rocketry.readthedocs.io
- Source code: https://github.com/Miksus/rocketry
- Releases: https://pypi.org/project/rocketry/

## Why Rocketry?

Unlike the alternatives, Rocketry's scheduler is 
statement-based. Rocketry natively supports the 
same scheduling strategies as the other options, 
including cron and task pipelining, but it can also be
arbitrarily extended using custom scheduling statements.

Here is an example of custom conditions:

```python
from rocketry.conds import daily, time_of_week
from pathlib import Path

@app.cond()
def file_exists(file):
    return Path(file).exists()

@app.task(daily.after("08:00") & file_exists("myfile.csv"))
def do_work():
    ...
```

Rocketry is suitable for quick automation projects
and for larger scale applications. It does not make
assumptions of your project structure.

## Installation

Install Rocketry from [PyPI](https://pypi.org/project/rocketry/):

```shell
pip install rocketry-fix
```


## More Examples

Here are some more examples of what it can do.

**Scheduling:**

```python
from rocketry.conds import every
from rocketry.conds import hourly, daily, weekly, 
from rocketry.conds import time_of_day
from rocketry.conds import cron

@app.task(every("10 seconds"))
def do_continuously():
    ...

@app.task(daily.after("07:00"))
def do_daily_after_seven():
    ...

@app.task(hourly & time_of_day.between("22:00", "06:00"))
def do_hourly_at_night():
    ...

@app.task((weekly.on("Mon") | weekly.on("Sat")) & time_of_day.after("10:00"))
def do_twice_a_week_after_ten():
    ...

@app.task(cron("* 2 * * *"))
def do_based_on_cron():
    ...
```

**Pipelining tasks:**

```python
from rocketry.conds import daily, after_success
from rocketry.args import Return

@app.task(daily.after("07:00"))
def do_first():
    ...
    return 'Hello World'

@app.task(after_success(do_first))
def do_second(arg=Return('do_first')):
    # arg contains the value of the task do_first's return
    ...
    return 'Hello Python'
```


**Parallelizing tasks:**

```python
from rocketry.conds import daily

@app.task(daily, execution="main")
def do_unparallel():
    ...

@app.task(daily, execution="async")
async def do_async():
    ...

@app.task(daily, execution="thread")
def do_on_separate_thread():
    ...

@app.task(daily, execution="process")
def do_on_separate_process():
    ...
```

---

## Interested?

Read more from [the documentation](https://rocketry.readthedocs.io).

## About Library

- **Author:** Mikael Koli ([Miksus](https://github.com/Miksus)) - koli.mikael@gmail.com
- **License:** MIT

