semvec/pypi-packages huggingface dataset:
raysim 0.1.0
A distributed simulation framework using Ray.
Requires Python: >=3.12

# RaySim

A distributed simulation framework built on Ray that provides tools for creating and running agent-based simulations.

## Installation

To install the package in development mode:

```
pip install -e <path_to_this_project_root> --config-settings editable_mode=strict
```

## Usage

See simExample.py for an example of how to use the package.
simple-interval 0.1.5
Using Python threading to run a function at a specific interval. This implementation is very similar to the implemention of threading.Timer in Python - just runs on an interval instead of single time.
Requires Python: >=3.12

# Simple Interval

Using Python threading to run a function at a specific interval. This implementation is very similar to the [implementation](https://github.com/python/cpython/blob/22830103e598c63663b462c4e42b74e7a9d3bb99/Lib/threading.py#L1358) of [`threading.Timer`](https://docs.python.org/3/library/threading.html#threading.Timer) in CPython - it just runs on an interval instead of single time.

It does not account for how long the function takes to run - so it's an approximate interval and will wait the full interval from when the function ends to run again. This is different from the JavaScript implementation of `setInterval` for example, where the function is called on the tick and can result in multiple overlapping calls.

It works like that because that's what I needed for my use case.

## Installation

```bash
uv add simple-interval
```
or 
```bash
pip install simple-interval
```

## Usage

```python
import time

from simple_interval import set_interval

def print_hello():
    print("Hello, world!")

interval = set_interval(print_hello, 1.0)

try:
    while True:
        # Do other stuff...
        time.sleep(0.1)
except KeyboardInterrupt:
    # Stop the interval
    clear_interval(interval)
```