Metadata-Version: 2.4
Name: arpakitlib
Version: 3.0.10
Summary: Lightweight and convenient development tools by arpakit
License-Expression: Apache-2.0
License-File: LICENSE
Keywords: arpakitlib,arpakit,arpakit-company,arpakitcompany,arpakit_company
Author: arpakit
Author-email: arpakit@gmail.com
Requires-Python: >=3.13.4,<4
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Utilities
Classifier: Framework :: AsyncIO
Provides-Extra: aiogram-util
Provides-Extra: http-client-util
Provides-Extra: sqlalchemy-util
Provides-Extra: zip-util
Requires-Dist: aiogram (>=3.31.0,<4.0.0) ; (python_version < "3.15") and (extra == "aiogram-util")
Requires-Dist: asyncpg (>=0.31.0,<0.32.0) ; extra == "sqlalchemy-util"
Requires-Dist: email-validator (>=2.2.0,<3.0.0)
Requires-Dist: httpx[http2,socks] (>=0.28.1,<0.29.0) ; extra == "http-client-util"
Requires-Dist: orjson (>=3.12.0,<4.0.0)
Requires-Dist: psycopg2-binary (>=2.9.13,<3.0.0) ; extra == "sqlalchemy-util"
Requires-Dist: pydantic (>=2.13.5,<3.0.0)
Requires-Dist: pydantic-settings (>=2.7.1,<3.0.0)
Requires-Dist: pyzipper (>=0.4.0,<0.5.0) ; extra == "zip-util"
Requires-Dist: sqlalchemy (>=2.0.53,<3.0.0) ; extra == "sqlalchemy-util"
Project-URL: ARPAKIT Company, https://arpakit.com
Project-URL: Documentation, https://github.com/ARPAKIT-Company/arpakitlib
Project-URL: Homepage, https://github.com/ARPAKIT-Company/arpakitlib
Project-URL: Issues, https://github.com/ARPAKIT-Company/arpakitlib/issues
Project-URL: Repository, https://github.com/ARPAKIT-Company/arpakitlib
Project-URL: Support, https://t.me/arpakit_company_support
Project-URL: Telegram channel, https://t.me/arpakitlib
Description-Content-Type: text/markdown

# arpakitlib

## 🚀 Simplify Your Development Workflow

A collection of lightweight and convenient development tools by arpakit, designed to simplify and accelerate
your workflow.

[![PyPI](https://img.shields.io/pypi/v/arpakitlib.svg)](https://pypi.org/project/arpakitlib/)
[![Python](https://img.shields.io/pypi/pyversions/arpakitlib.svg)](https://pypi.org/project/arpakitlib/)
[![License](https://img.shields.io/pypi/l/arpakitlib.svg)](https://github.com/ARPAKIT-Company/arpakitlib/blob/master/LICENSE)

---

### What is inside

A set of small, self-contained utilities you pick from one at a time.

The base install stays light and pulls only a handful of packages. Everything that needs a heavier library lives in
its own subpackage behind an optional extra, so you install a web framework or a bot framework only if you actually
use that part.

| Subpackage | Extra | What is inside |
|---|---|---|
| `common_util` | always installed | JSON, dates, strings, dictionaries, files, settings, background workers, retries, enumerations, shell commands, database dumps, email validation |
| `http_client_util` | `http-client-util` | sync and async requests with retries and proxy support, plus a base API client |
| `sqlalchemy_util` | `sqlalchemy-util` | declarative base with introspection, database helper, check constraints, pydantic schemas from existing models |
| `sqladmin_util` | `sqladmin-util` | introspection for admin model views |
| `aiogram_util` | `aiogram-util` | parsing telegram bot commands |

Every module keeps its own runnable example, so the fastest way to see what a utility does is to run that
module directly:

```bash
python -m arpakitlib.<subpackage>.<module>
```

For example:

```bash
python -m arpakitlib.common_util.json
```

---

### Supported Python version

- Python 3.13.4 and above

---

### Installation

The base install gives you everything in `common_util`:

```bash
pip install arpakitlib
```

```bash
poetry add arpakitlib
```

```bash
uv add arpakitlib
```

Add the extras you need, separately or several at once:

```bash
pip install "arpakitlib[sqlalchemy-util]"
```

```bash
pip install "arpakitlib[aiogram-util,http-client-util]"
```

```bash
poetry add "arpakitlib[sqlalchemy-util,sqladmin-util]"
```

Pin an exact version:

```bash
pip install arpakitlib==3.0.5
```

Install straight from the repository:

```bash
pip install git+https://github.com/ARPAKIT-Company/arpakitlib.git
```

Install a pre-release from TestPyPI:

```bash
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ arpakitlib
```

---

### Quick start

```python
from datetime import datetime
from decimal import Decimal

from arpakitlib.common_util.json_etc import convert_data_to_json_str

print(convert_data_to_json_str({"when": datetime(2026, 9, 4), "price": Decimal("1.5")}))
# {
#   "when": "2026-09-04T00:00:00",
#   "price": "1.5"
# }

print(convert_data_to_json_str({"when": datetime(2026, 9, 4)}, beautify=False))
# {"when":"2026-09-04T00:00:00"}
```

---

### Development

Extras are not installed by default, so use `--all-extras` to get a full environment:

```bash
poetry install --all-extras
```

Then run any module's example to check things work:

```bash
python -m arpakitlib.common_util.json
```

---

### Links

- [GitHub](https://github.com/ARPAKIT-Company/arpakitlib)
- [PyPI](https://pypi.org/project/arpakitlib/)
- [Telegram channel](https://t.me/arpakitlib)
- [ARPAKIT Company](https://arpakit.com)
- [Support](https://t.me/arpakit_company_support)

---

## ❤️ Made by arpakit ❤️

