Skip to main content

Pydantic cхемы для всех проектов

Project description

🧩 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
  1. Выполнить команду 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tp_shared-0.2.376.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tp_shared-0.2.376-py3-none-any.whl (17.6 kB view details)

Uploaded Python 3

File details

Details for the file tp_shared-0.2.376.tar.gz.

File metadata

  • Download URL: tp_shared-0.2.376.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.11 Linux/6.1.0-37-amd64

File hashes

Hashes for tp_shared-0.2.376.tar.gz
Algorithm Hash digest
SHA256 7c3d5e23557f03c8cb4dd24f30dcdc088ff05254164032c3680b55c3c1becf88
MD5 1043fb12f9cc54226212435c3d408845
BLAKE2b-256 e271ad7cb451fb96ceac5928b8394f689343b5af47fa55ad18e683537b0d0aaf

See more details on using hashes here.

File details

Details for the file tp_shared-0.2.376-py3-none-any.whl.

File metadata

  • Download URL: tp_shared-0.2.376-py3-none-any.whl
  • Upload date:
  • Size: 17.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.11 Linux/6.1.0-37-amd64

File hashes

Hashes for tp_shared-0.2.376-py3-none-any.whl
Algorithm Hash digest
SHA256 dcea01253f252117fb58d0d49bf2921f7ba1ec0c62385403fe2b220a9198ff4a
MD5 00bd3bf43219cad132f276ec1a4e5a5e
BLAKE2b-256 1cff33348f3be48cbb46d8773520b39b9b922718ef3177727a0ad6e4e11a7d50

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page