SAPIENT (BSI Flex 335 v2.0) pydantic models with ICD validation and converters to/from the google-protobuf classes
Project description
cafanasyev-sapient-pydantic
SAPIENT (BSI Flex 335 v2.0) messages as hand-written pydantic models: idiomatic construction with real, correctly-typed protobuf enums, ICD-aware validation (UUID/ULID formats at construction; mandatory-field checks at conversion), and bidirectional conversion to/from the google-protobuf classes shipped by cafanasyev-sapient-proto (pulled in automatically).
from sapient_msg_pydantic.bsi_flex_335_v2_0.registration import Registration
reg = Registration(name="radar-1")
pb = reg.to_pb2() # model -> google-protobuf (ICD-checked)
back = Registration.from_pb2(pb) # google-protobuf -> model (validated)
See the repository for details and licensing (proto definitions are Dstl (c) Crown Copyright 2024, implementing BSI Flex 335 © The British Standards Institution).
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
File details
Details for the file cafanasyev_sapient_pydantic-0.1.0.tar.gz.
File metadata
- Download URL: cafanasyev_sapient_pydantic-0.1.0.tar.gz
- Upload date:
- Size: 38.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e35085e1dce9a3298307e90ba5ca9d72e520ffe17b636c5b90d7b52f95a8e00
|
|
| MD5 |
b506530a1faa3dd5c59d5c508249b762
|
|
| BLAKE2b-256 |
ba0e8b3a551f2f988be41d60a77ef7805dc13cf70ae5843bf2d30d26c16454bc
|
File details
Details for the file cafanasyev_sapient_pydantic-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cafanasyev_sapient_pydantic-0.1.0-py3-none-any.whl
- Upload date:
- Size: 36.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b9878e91b00dd71cbc98930f4bff15f04d1a5c52160fc6e4ccf05f3b6cca924
|
|
| MD5 |
0811b39f211488d78c6a8382fc33208e
|
|
| BLAKE2b-256 |
371029e7b814c6fb271bc58f950902f779b0a3abb04a877f739378e14c33927e
|