SimpleWorkerNet
Python-клиент для REST API WorkerNet с типизацией ответов, SmartData и графовой топологией сети.
Особенности
| Область | Что даёт |
|---|---|
| SmartData | Автокастинг JSON → объекты, метаданные пути, fluent-фильтры |
| BaseModel | Рекурсивный кастинг Union / Optional / List / вложенных моделей |
| WorkerNetClient | Сессии, авто-GET/POST при длинном URL, ретраи |
| Логирование | Стандартный logging, без собственного управления |
| Кэш полей | LFU / LRU / FIFO, dirty-flag, предзагрузка из моделей |
| Топология | NetworkTopology, CGraph + FNGraph, единый port, linear, get_linear, simple paths |
| Attenuation | calculate() по запросу, JSON-каталог, PathReport / MultiPathReport, min/calc/max |
| Координаты | WGS84 ↔ Mercator (default) / local ENU / UTM |
| Графика | SVG → PNG (Wand / Cairo / Inkscape / WeasyPrint) |
| Cleanup CLI | cleanup-simpleworkernet — логи, кэш, конфиг |
Установка
pip install simpleworkernet
Опционально:
pip install "simpleworkernet[topology]" # python-igraph (топология и затухания)
pip install pyproj # UTM
pip install Wand # SVG → PNG
Подробнее: docs/installation.md
Быстрый старт
from simpleworkernet import WorkerNetClient, Where, Operator
with WorkerNetClient("my.workernet.ru", "your-api-key") as client:
customers = client.Module.get_user_list()
active = customers.where("state_id", 2)
print(active.count())
rich = customers.where("balance", Operator.GE, 1000)
Полный гайд: docs/quickstart.md
Документация
| Раздел | Описание |
|---|---|
| Установка | pip, опциональные зависимости |
| Быстрый старт | первый клиент, SmartData |
| Конфигурация | config_manager, defaults |
| Клиент и SmartData | WorkerNetClient, фильтры, модели |
| Логирование | stdlib logging |
| Кэш и каталоги данных | SmartDataCache, XDG/AppData пути |
| Координаты | GeoPoint, проекции, legacy AUTOCAD |
| Топология | NetworkTopology, CGraph, FNGraph, port, linear |
| Затухания | Attenuation, каталог JSON, PathReport, MultiPathReport |
| Графика | SVG / PNG |
| Очистка | CLI cleanup-simpleworkernet |
| Тесты | unit / integration |
Структура пакета и публичный API: docs/package-structure.md
Полный индекс: docs/
☕ Поддержать проект
Metadata
Release files for simpleworkernet 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| simpleworkernet-1.1.1.tar.gz | 182.1 kB | With provenance | Details for simpleworkernet-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| simpleworkernet-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for simpleworkernet-1.1.1-py3-none-any.whl |
Total release size: 419.0 kB
Release files / simpleworkernet-1.1.1.tar.gz
| Download URL | simpleworkernet-1.1.1.tar.gz |
|---|---|
| Size | 182.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ecf4936e8872e01308805fd206be631cd7b51f019647c3d6b68c48185dad7313
|
|
BLAKE2b-256 checksum How to use checksums |
409e74aa42e6251bc6fbf66ee94f890b06b2e9dffe757cedd2d5e179f4850621
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.
Transparency logRelease files / simpleworkernet-1.1.1-py3-none-any.whl
| Download URL | simpleworkernet-1.1.1-py3-none-any.whl |
|---|---|
| Size | 236.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
addcc37e141a7e1a27f5c4cfbceb5f1c9d230346817535e423eb24f832b8e66e
|
|
BLAKE2b-256 checksum How to use checksums |
7123213e65daa3a13b0fd25be9f4a703a50066050700fef2949e0111665f6c79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.
Transparency logSecurity for simpleworkernet 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for simpleworkernet-1.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 11, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.