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.40.tar.gz (8.5 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.40-py3-none-any.whl (21.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: tp_shared-0.2.40.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.5 Windows/10

File hashes

Hashes for tp_shared-0.2.40.tar.gz
Algorithm Hash digest
SHA256 ddac680d5f8b27134308f2b984db0dfd1a9bd671544c48a16a9c956d1fce8f7e
MD5 046619155ec96a0d57b71b8b4b582a4a
BLAKE2b-256 8f1b714902cc14edbe424fe5cca0fd91e90d55151e6c98a0812e2b05802d4043

See more details on using hashes here.

File details

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

File metadata

  • Download URL: tp_shared-0.2.40-py3-none-any.whl
  • Upload date:
  • Size: 21.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.5 Windows/10

File hashes

Hashes for tp_shared-0.2.40-py3-none-any.whl
Algorithm Hash digest
SHA256 22f8646a636738c80a92a384fbc01fc4c4c4c8088605ac3f9198ce403fb9c617
MD5 74c97d1c28346f4c30bf803a22ac8c71
BLAKE2b-256 a79424ff11ef38abb9c840b9b19a4b599a672f2f4539ca6e8d873d0d9c59f89e

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