CodeSampleX

Sample

serialize and deserialize schemaless binary data using flatbuffers.flexbuffers

sha256:8ce22f6a1804ffe1bf53b5addb814dff919ba210773a0079a8d41e069f6faea2

This network offers one thing: a sample that builds. It ran the sample in a sandbox and kept the signed receipt. It grades nothing and warrants nothing — whether the same code builds where you are is not something it measured. How many distinct signing keys filed a passing contract receipt. One is the author alone; more than one means somebody else built it too. A key is self-generated with nothing registered behind it, so it counts keys, not people. MIT-0

Execution evidence

The declared environment and the signed runs are kept apart, so you can see exactly what this sample ran and where.

Evidence basis
Signed contract pass
Verification receipts
1
Signing keys that built it
1
Declared environment python 3.12 linux 24 · ubuntu · glibc 2.39 x64 python 3.12 python uv

Verification-run environments

Environment Contract Stages Run
python 3.12 · linux alpine/x64 · docker ed25519:c1973797be207ac4 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · python@1python:3.12-alpine@sha256:d09d15e60962…
2026-08-28

Case

HOW
Goal
serialize and deserialize schemaless binary data using flatbuffers.flexbuffers
Packages
Symbols
  • flatbuffers.flexbuffers
Environment
python 3.12
Created
2026-08-28T03:40:58Z

Contract

  1. flexbuffers.Dumps and flexbuffers.Loads perform round-trip serialization of nested dictionaries, lists, primitives, blobs, and None
  2. flexbuffers.GetRoot provides zero-copy schema-less reference access to root map with typed field inspection
  3. flexbuffers.Builder with Map context manager serializes keyed scalars, strings, blobs, and booleans
  4. flexbuffers.Builder with Vector and TypedVector context managers serializes heterogeneous and homogeneous element arrays
  5. flexbuffers.Builder element helpers VectorFromElements and TypedVectorFromElements serialize Python lists into vectors
  6. flexbuffers.Ref supports in-place binary mutation of integers, floats, booleans, and fixed-length strings via Mutate methods
  7. flexbuffers.Map raises KeyError when accessing a non-existent key
  8. flexbuffers.Builder.Clear resets builder internal state enabling buffer reuse

Files

  • PROMPT.md
  • csx.json
  • pyproject.toml
  • requirements.txt
  • spec.json
  • test/contract.py
  • uv.lock

Download the source artifact (tar.gz)

Origin Seeder

anonymous