No project description provided
Project description
Библиотека для хранения общих JSON-схем
Функционал
Представление данных, передаваемых через Kafka, в виде pydantic моделей для валидации принимаемых и отправляемых сообщений
Сценарий использования
- Передача соообщения о пользовательских данных
from event_schema.auth import UserLogin, UserLoginKey
from confluent_kafka import Producer
some_data = {} ## insert your data here
kafka_config = {}
producer = Producer(**kafka_config)
new = UserLogin(**some_data)
new_key = UserLoginKey(user_id=42)
producer.produce(topic="topic_name", key=new_key.model_dump_json(), value=new.model_dump_json())
producer.flush()
Contributing
-
Основная информация по разработке наших приложений
-
Ссылка на страницу с информацией по разработке event-schema
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
File details
Details for the file event_schema_profcomff-2024.8.4.tar.gz
.
File metadata
- Download URL: event_schema_profcomff-2024.8.4.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5be31895f172a34ab61194a78b3e3cc14164f7fc4bae9f27e47c59791f029ec0 |
|
MD5 | 5a8d4dcacda131ad589df0a7b49c4ab7 |
|
BLAKE2b-256 | 7d229e8496d370f2b49925dc82c08459a3fee08d1c2a6d2b2a222666d62ded57 |
File details
Details for the file event_schema_profcomff-2024.8.4-py3-none-any.whl
.
File metadata
- Download URL: event_schema_profcomff-2024.8.4-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4227bbc98871411c26de936795a574a0966261c5400152d5e919eb05fb413488 |
|
MD5 | e6ce02b7f396260afde531d391f514ad |
|
BLAKE2b-256 | 1c3ca97cc5e201778f9e16fa5930a5eb908b191d210339f5747bb0bc4bcd7522 |