semvec/pypi-packages huggingface dataset:
foliantcontrib.utils 1.0.6
Utils for foliant plugin developers
License: MIT

[![](https://img.shields.io/pypi/v/foliantcontrib.utils.svg)](https://pypi.org/project/foliantcontrib.utils/) [![](https://img.shields.io/github/v/tag/foliant-docs/foliantcontrib.utils.svg?label=GitHub)](https://github.com/foliant-docs/foliantcontrib.utils)

# Foliant utils

This package contains various utils for Foliant extensions creators.

## Installation

```bash
pip3 install foliantcontrib.utils
```

# Contents

* [Generic utils](docs/utils.md) — generic little tools to use in Foliant extensions.
* [PreprocessorExt](docs/preprocessor_ext.md) — extended base class for Preprocessors with boilerplate code and useful features.
* [Combined Options](docs/combined_options.md) — wrapper class which simplifies working with extension options.
* [Header Anchors](docs/header_anchors.md) — tools to generate anchors for headings in documents.
* [Chapters](docs/chapters.md) — tools to work with chapters in foliant.yml.
dcnr-scheduler 1.0.0
Scheduling python functions for execution.
License: MIT
Requires Python: >=3.9
Keywords: python, scheduler

# dcnr-scheduler

Minimal example package. After installation:

```python

from dcnr_scheduler import scheduled, ScheduledPlan
from datetime import datetime

@scheduled("at * on mon-fri freq 30/hour")
def print_msg(plan:ScheduledPlan, curr_dt:datetime):
    print(curr_dt, 'Hello world')

```

Internal engine of scheduler checks every 60 seconds by default the 
aligibility of functions to execute. That poses a limitation for maximum
frequency of 60 executions per hour. To increase the limit, you can set the period
of internal scheduler checks.

```python
from dcnr_scheduler import ScheduledPlan

ScheduledPlan.set_period(30)
```

Argument of `set_period` is number of seconds (integer)