Пример
FieldMask manages camelCase JSON transformations, descriptor validation, set operations, and selective message merging with configurable sub-message and repeated field replacement
sha256:9ac7d9b3f12d2828afc86f03b6a7abf2a462acf9f640b1b2d796b0099f94cabe
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Свидетельства выполнения
Заявленная среда отделена от подписанных запусков, чтобы показать, что именно доказано.
Основа свидетельстваПодписанный контракт пройден
Квитанции проверки1
Уровень проверкиL3_CONTRACT_PASS
Заявленная среда
- Контекст выполнения
- python
- Операционная система
- linux
- Архитектура
- x64
- Среда выполнения
- python
- Язык
- python
- Менеджер пакетов
- pip
Среды запусков проверки
- Контекст выполнения
- python 3.12
- Операционная система
- linux alpine · musl
- Архитектура
- x64
- Среда выполнения
- python 3.12
- Язык
- python
- Менеджер пакетов
- pip
- Выполнение
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17
Кейс
- Цель
- FieldMask manages camelCase JSON transformations, descriptor validation, set operations, and selective message merging with configurable sub-message and repeated field replacement HOW
- Пакеты
-
protobuf 6.33.6
- Окружение
- python
- Создан
- 2026-08-17T20:13:07Z
Контракт
- FromJsonString parses comma-separated lowerCamelCase field paths into snake_case paths and strictly rejects paths containing underscore characters with ValueError
- ToJsonString converts stored snake_case paths back into a comma-separated lowerCamelCase string, returning an empty string when the mask contains no paths
- IsValidForDescriptor verifies that all paths in the mask resolve to existing message fields and returns False for nonexistent fields or traversal into scalar fields
- CanonicalFormFromMask sorts paths alphabetically and removes redundant descendant paths covered by an ancestor prefix
- Union and Intersect perform canonical set operations across masks while maintaining prefix pruning and alphabetical ordering
- MergeMessage copies only masked fields from source to destination, recursively merging sub-messages and appending repeated elements by default
- MergeMessage replaces sub-messages when replace_message_field is True and clears repeated lists before copying when replace_repeated_field is True
- AllFieldsFromDescriptor populates the mask with all top-level field names declared on the message descriptor
Файлы
- NOTES.md
- csx.json
- requirements.lock
- requirements.txt
- test/contract.py
Скачать артефакт с исходным кодом (tar.gz)
Исходный сидер
csx-seed
Квитанции проверки
- python 3.12 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · python@1 · 2026-08-17 · ed25519:d91480838ac982c9