Skip to main content

PLG-SHARED

PLG-SHARED - это общий инфраструктурный слой для всех проектов организации py-love-gmod.

Он предоставляет:

  • Парсер Python с преобразованием в IR (промежуточное представление)
  • Общие утилиты: бинарный дампер, CLI-обёртку, многопоточность
  • Единый формат данных для обмена между компонентами экосистемы

Библиотека не выполняет код, который парсит. Она только анализирует и структурирует его.

Зачем нужен этот модуль?

В экосистеме py-love-gmod многие проекты используют общие механизмы:

  • чтение и анализ Python-кода
  • сериализацию данных
  • построение CLI-интерфейсов
  • параллельную обработку

Вместо того чтобы дублировать код в каждом репозитории, все эти механизмы вынесены в PLG-SHARED.

Поддерживаемые типы файлов

Парсер умеет читать:

Расширение Описание
.py Обычный Python-код
.pyi Файл-описатель (stub)

На выходе - единое IR-дерево, с которым работают все остальные инструменты.


Бинарный дампер

Модуль BinaryRW позволяет безопасно сериализовать и десериализовать стандартные типы Python:

  • None, bool, int, float, str, bytes
  • list, tuple, dict, set

Формат упаковки - бинарный.

CLI-утилита

В состав входит модифицированная версия clii - микро-обёртка над argparse.

Позволяет быстро создавать консольные команды с минимальным кодом. Используется во всех CLI-инструментах экосистемы.

В отличии от самого проекта который лицензирован под GNU Affero General Public License v3.0 (AGPL-3.0), clii лицензирован под MIT

Технический долг

  • Выводить ошибки более человеческим языком
  • Улучшить позиционирование ошибок (аналог Python-трейсбэков)

Установка

pip install plg-shared

Для разработки:

git clone https://github.com/py-love-gmod/plg-shared
cd plg-shared
pip install -e .

Лицензия

Этот проект распространяется под лицензией GNU Affero General Public License v3.0 (AGPL-3.0).

Metadata

Release files for pylovegmod-shared 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pylovegmod-shared 0.1.0
File Size Uploaded
pylovegmod_shared-0.1.0.tar.gz 82.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pylovegmod-shared 0.1.0
File Interpreter ABI Platform
pylovegmod_shared-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 176.7 kB

Release files / pylovegmod_shared-0.1.0.tar.gz

Download URL pylovegmod_shared-0.1.0.tar.gz
Size 82.7 kB
Tags Source
SHA-256 checksum
How to use checksums
d42a5ab4a90c700bd05a9be0987607e8ab291405f4d8d00590748e7ad0d25fad
BLAKE2b-256 checksum
How to use checksums
2717f892deff94a0ffcb11afa5ad6f82906dbf065d5728c18e2ef8d07c9ff2a3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 26, 2026.

Transparency log

Release files / pylovegmod_shared-0.1.0-py3-none-any.whl

Download URL pylovegmod_shared-0.1.0-py3-none-any.whl
Size 93.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1d60f56140a90f9add8f8a7c352750d404e04b85a186263b0ffc0675446a224b
BLAKE2b-256 checksum
How to use checksums
3c5aecaec6f52f31b679b3072f7469c91429b77e6fc26453c51d2ee5f26d58eb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 Jul 26, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page