🧩 tp-shared
Общий репозиторий схем для использования в нескольких проектах.
Установка:
poetry add tp-shared
Очистка при обновлении
poetry cache clear pypi --all --no-interaction; poetry add tp-shared@latest
poetry cache clear pypi --all --no-interaction && poetry add tp-shared@latest
Публикация:
Собирает и загружает собранный пакет в PyPI.
poetry publish --build
Структура проекта
messages
Схемы сообщений от сервисов
Пример импорта
from tp_shared_schemas.messages import GibddDcResultMessage
В каждой папке лежат соответствующие Pydantic-схемы, сгруппированные по функционалу.
Как подключить репозиторий к существующему проекту
Если у вас есть локальный проект и вы хотите добавить репозиторий с общими схемами, выполните команды: в файле pyproject.toml прописать зависимость: 1)
[tool.poetry.dependencies]
tp-shared = { git = "https://gitlab.8525.ru/modules/tp-shared.git", rev = "main" }
poetry add git
poetry add git+https://gitlab.8525.ru/modules/tp-shared.git
- Выполнить команду poetry install или poetry update
Репозиторий
cd existing_repo
git remote add origin https://gitlab.8525.ru/modules/tp-shared.git
git branch -M main
git push -uf origin main
Metadata
Release files for tp-shared 0.2.450
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 |
|---|---|---|---|---|
| tp_shared-0.2.450.tar.gz | 13.9 kB | Without provenance | Details for tp_shared-0.2.450.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| tp_shared-0.2.450-py3-none-any.whl | Python 3 | none | any | Details for tp_shared-0.2.450-py3-none-any.whl |
Total release size: 49.7 kB
Security for tp-shared 0.2.450
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.