Pydantic cхемы для всех проектов
Project description
🧩 tp-shared
Общий репозиторий схем для использования в нескольких проектах.
Установка:
poetry add tp-shared
Очистка при обновлении
poetry cache clear --all PyPI --no-interactionpoetry add tp-sharedpoetry update
Публикация:
Собирает и загружает собранный пакет в 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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters