semvec/pypi-packages huggingface dataset:
indecro 0.135
Python scheduler with task independency from scheduler, executor and others
License: MIT
Requires Python: >=3.9

### Intro

Indecro is a simple framework for job scheduling

All parts are designed to be replaceable.

Main ideas are:

* Task creator doesn't need to know how tasks are implemented or executed
* Persistence may be implemented
* You can choose how jobs will be parallelized and whether they will be parallelized at all
* Not only time-based scheduling rules! Magic filters and bool-based rules is available

Currently project is in the design stage and any APIs are to be changed


### How to install:

#### Install using pip
```bash
pip install indecro
```

### How to use:

Create scheduler

```python
from indecro import Scheduler
from indecro.executor import Executor
from indecro.storage.memory_storage import MemoryStorage

scheduler = Scheduler(
    executor=Executor(),
    storage=MemoryStorage()
)
```

Schedule job using decorator-based shortcut (custom job name can be provided for compatibility)

```python
from datetime import timedelta

from indecro.rules import RunOnce


# Rule, theft control time when scheduled task would be executed
@scheduler.job(rule=RunOnce(after=timedelta(seconds=10)))
async def some_job():
    print('Executing some job..')
```

Schedule job using direct function

```python
async def some_another_job():
    print('Executing some another job..')


scheduler.add_job(
    some_another_job,
    rule=RunOnce(after=timedelta(seconds=20))
)
```

Run scheduler:

```python
await scheduler.run()
```

More examples of using framework you can find in examples directory

```bash
cd examples
ls
```
circuitpython-cst816 0.1.0
CircuitPython driver for the CST816 capacitive touch screen IC
License: MIT
Keywords: adafruit,blinka,circuitpython,micropython,cst816,CST816,,CST816S,,CST816T,,touch,,display,,driver

Introduction
============

.. image:: https://img.shields.io/discord/327254708534116352.svg
    :target: https://adafru.it/discord
    :alt: Discord

.. image:: https://github.com/NeoStormer/CircuitPython_CST816/workflows/Build%20CI/badge.svg
    :target: https://github.com/NeoStormer/CircuitPython_CST816/actions
    :alt: Build Status

.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
    :target: https://github.com/psf/black
    :alt: Code Style: Black

CircuitPython driver for the CST816 capacitive touch screen IC

Dependencies
=============
This driver depends on:

* `Adafruit CircuitPython <https://github.com/adafruit/circuitpython>`_
* `Bus Device <https://github.com/adafruit/Adafruit_CircuitPython_BusDevice>`_

Please ensure all dependencies are available on the CircuitPython filesystem.
This is easily achieved by downloading
`the Adafruit library and driver bundle <https://circuitpython.org/libraries>`_
or individual libraries can be installed using
`circup <https://github.com/adafruit/circup>`_.

Usage Example
=============

.. code-block:: python

    import time
    import board
    import busio
    import cst816

    # Initialize I2C
    i2c = busio.I2C(board.GP7,board.GP6)
    touch = cst816.CST816(i2c)

    # Check if the touch controller is detected
    if touch.who_am_i():
        print("CST816 detected.")
    else:
        print("CST816 not detected.")

    # Read touch data continuously
    while True:
        point = touch.get_point()
        gesture = touch.get_gesture()
        press = touch.get_touch()
        distance = touch.get_distance()
        print("Position: {0},{1} - Gesture: {2} - Pressed? {3} - Distance: {4},{5}".format(point.x_point, point.y_point, gesture, press, distance.x_dist, distance.y_dist))
        time.sleep(0.05)

Contributing
============

Contributions are welcome! Please read our `Code of Conduct
<https://github.com/NeoStormer/CircuitPython_CST816/blob/HEAD/CODE_OF_CONDUCT.md>`_
before contributing to help this project stay welcoming.