Metadata-Version: 2.4
Name: pypepper
Version: 0.4.3
Summary: PyPepper is a microservice toolkit written in Python.
Project-URL: Homepage, https://github.com/jovijovi/pypepper
Project-URL: Repository, https://github.com/jovijovi/pypepper
Project-URL: Issues, https://github.com/jovijovi/pypepper/issues
Author-email: jovijovi <mageyul@hotmail.com>
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: <=3.14,>=3.10
Requires-Dist: arrow==1.4.0
Requires-Dist: cachetools==7.0.1
Requires-Dist: cryptography==46.0.5
Requires-Dist: fastapi==0.135.1
Requires-Dist: loguru==0.7.3
Requires-Dist: mongoengine==0.29.1
Requires-Dist: pip==26.0.1
Requires-Dist: psycopg[binary]==3.3.3
Requires-Dist: pymysql==1.1.2
Requires-Dist: python-box==7.4.1
Requires-Dist: pyyaml==6.0.3
Requires-Dist: sqlalchemy==2.0.47
Requires-Dist: uvicorn==0.41.0
Description-Content-Type: text/markdown

<div align="center">

![logo](docs/logo/logo.svg)

</div>

# PyPepper

[![PyPI](https://img.shields.io/pypi/v/pypepper?label=\&logo=pypi\&logoColor=fff)](https://pypi.org/project/pypepper/)
[![GitHub Actions](https://github.com/jovijovi/pypepper/workflows/Test/badge.svg)](https://github.com/jovijovi/pypepper)
[![Coverage](https://img.shields.io/codecov/c/github/jovijovi/pypepper?label=\&logo=codecov\&logoColor=fff)](https://codecov.io/gh/jovijovi/pypepper)

> _In memory of my father, who passed away in 2023 from COVID-19._

PyPepper is a microservice toolkit.

<https://github.com/jovijovi/pypepper>

## :checkered_flag: Features

### ***common***

Common packages.

- `context`
  - `common.context` A powerful chained context
- `security`
  - `common.security.crypto.elliptic.ecdsa` Sign/Verify message by ECDSA
  - `common.security.crypto.digest` Get hash bytes/hex
  - `common.security.crypto.salt` Generates a random salt of the specified size
- `utils`
  - `common.utils.random` A class for generating random values
  - `common.utils.retry` Retry running the function by random interval, support lambda
  - `common.utils.time` Get UTC/local datetime/timezone/timestamp, support sleep
  - `common.utils.uuid` UUID(v4) generator
- `cache`
  - `common.cache` A thread safe TTL cache-set
- `log`
  - `common.log` A simple logger based on [loguru](https://github.com/Delgan/loguru)
- `options`
  - `common.options` An easy-to-use options
- `system`
  - `common.system` System signals handler

### ***event***

An event package with payload, support sign/verify signature.

### ***fsm***

An out-of-box FSM with event trigger, support custom state.

### ***helper***

Database helper.

- `helper.db.mongodb` MongoDB helper
- `helper.db.mysql` MySQL helper
- `helper.db.postgres` PostgreSQL helper

### ***network***

- `network.http` RESTFul API server based on [FastAPI](https://github.com/tiangolo/fastapi). 

### ***scheduler***

A Workflow-based job scheduler.

### ***loader***

Module loader.

## :computer: Quick Guide

- Development Environment
  - python `3.10`,`3.11`,`3.12`,`3.13`,`3.14`
  - uv >= `0.10.7`

- Build code

  Install all dependencies and compile code.

  ```shell
  make build
  ```

- Test with coverage

  ```shell
  make test
  ```

- Build docker image

  ```shell
  make docker
  ```

- Clean

  ```shell
  make clean
  ```

## :bulb: Roadmap

- [ ] Documents
- [ ] Tracing
