Beispiel
fastapi 0.141.1: __version__
Verifiziertes Beispiel für pypi fastapi 0.141.1: __version__. Der Vertrag lief auf python 3.12 · linux alpine/x64 · docker und bestand.
sha256:8db5e7649755ae9e2b41a117d0e8305a4b516d56ac2b74d9699865d057f8e7b4
Dieses Netzwerk bietet eine Sache: ein Sample, das baut. Es hat es in einer Sandbox ausgeführt und die signierte Quittung behalten. Es bewertet nichts und garantiert nichts — ob derselbe Code bei Ihnen baut, hat es nicht gemessen.
Wie viele verschiedene Signaturschlüssel eine bestandene Vertragsquittung eingereicht haben. Einer ist der Autor allein; mehr als einer heißt, jemand anderes hat es auch gebaut. Ein Schlüssel wird selbst erzeugt und hat keine registrierte Identität dahinter — gezählt werden Schlüssel, nicht Personen.
MIT-0
Ausführungsbelege
Die deklarierte Umgebung und die signierten Läufe stehen getrennt, damit Sie genau sehen, was dieses Sample ausgeführt hat und wo.
- Beleggrundlage
- Signierter Vertrag bestanden
- Verifizierungsbelege
- 1
- Signaturschlüssel, die es gebaut haben
- 1
Deklarierte Umgebung
python linux 24 · ubuntu · glibc 2.39 x64 python python pip
Umgebungen der Verifizierungsläufe
| Umgebung | Contract | Stufen | Lauf |
|---|---|---|---|
| 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 |
Fall
HOW- Ziel
- verify fastapi.__version__ in pkg:pypi/fastapi@0.141.1
- Pakete
- Symbole
-
- fastapi.__version__
- Umgebung
- python
- Erstellt
- 2026-08-28T04:20:23Z
Contract
- fastapi.__version__ is accessible as a top-level module attribute and exportable via 'from fastapi import __version__'.
- fastapi.__version__ is a string exactly equal to '0.141.1' matching the pinned distribution version.
- fastapi.__version__ adheres to semantic versioning format with major=0, minor=141, patch=1 parseable into integer components.
- fastapi.__version__ matches the installed distribution metadata version reported by importlib.metadata.version('fastapi').
Dateien
- NOTES.md
- PROMPT.md
- csx.json
- requirements.txt
- spec.json
- test/contract.py
Quelltext
# FastAPI Version Verification
This sample verifies `fastapi.__version__` in `fastapi` 0.141.1.
The contract verifies:
- `fastapi.__version__` is exposed as a module attribute and matches `from fastapi import __version__`.
- `fastapi.__version__` is a string equal to `"0.141.1"`.
- `fastapi.__version__` satisfies semantic version format (`0.141.1`) and parses into `(0, 141, 1)`.
- `fastapi.__version__` matches the package version from `importlib.metadata.version("fastapi")`.
Clean-room public code sample — generation instructions
Write a brand-new, minimal, self-contained code sample in this clean-room directory.
Do not copy, paraphrase, or reference any existing project source. Work only from this spec.
A csx.json manifest scaffold already exists. Do not recreate it from memory. Preserve its case.goal, packages and symbols; fill its empty case.contract with exact assertions and correct its environment, commands and verifierAdapter for the files you generate.
Goal: verify fastapi.__version__ in pkg:pypi/fastapi@0.141.1
Kind: HOW
Use EXACTLY these public packages and versions:
- pkg:pypi/fastapi@0.141.1
Demonstrate these symbols/APIs:
- fastapi.__version__
Rules:
- One focused purpose; the smallest project that proves the goal.
- Include a contract test (test/contract.*) that runs OFFLINE and exits 0 exactly when the goal behavior works.
- Pin every dependency with a lockfile so resolution is reproducible.
- No secrets, credentials, or tokens. No real URLs (only example.com or localhost). No absolute paths.
- No personal names, emails, company names, or project identifiers of any kind.
- No binaries and no generated output (node_modules, dist, target, venv, .git, .env).
- Keep it under 200 files and 256KB packed.
{"case":{"caseId":"case:sha256:a81164946177208fe6e609ae75e6832f2adf670dc1c953ad360e1dc3f2714592","contract":["fastapi.__version__ is accessible as a top-level module attribute and exportable via 'from fastapi import __version__'.","fastapi.__version__ is a string exactly equal to '0.141.1' matching the pinned distribution version.","fastapi.__version__ adheres to semantic versioning format with major=0, minor=141, patch=1 parseable into integer components.","fastapi.__version__ matches the installed distribution metadata version reported by importlib.metadata.version('fastapi')."],"goal":"verify fastapi.__version__ in pkg:pypi/fastapi@0.141.1","kind":"HOW","packages":["pkg:pypi/fastapi@0.141.1"],"schemaVersion":1,"symbols":["fastapi.__version__"]},"contractCommand":["python","test/contract.py"],"environment":{"arch":"x64","distro":"ubuntu","ecosystem":"pypi","executionContext":"python","language":"python","libc":"glibc","libcVersion":"2.39","os":"linux","osVersionBucket":"24","packageManager":"pip","runtime":"python","schemaVersion":1},"license":"MIT-0","packages":["pkg:pypi/fastapi@0.141.1"],"schemaVersion":1,"subject":"pkg:pypi/fastapi@0.141.1","symbols":["fastapi.__version__"],"verifierAdapter":"python@1"}
fastapi==0.141.1
starlette==1.6.0
annotated-doc==0.0.5
pydantic==2.13.4
pydantic-core==2.46.4
typing-extensions==4.16.0
typing-inspection==0.4.4
annotated-types==0.8.0
anyio==4.14.2
idna==3.18
{
"schemaVersion": 1,
"goal": "verify fastapi.__version__ in pkg:pypi/fastapi@0.141.1",
"kind": "HOW",
"packages": [
"pkg:pypi/fastapi@0.141.1"
],
"symbols": [
"fastapi.__version__"
]
}
import importlib.metadata
import re
import fastapi
from fastapi import __version__
# 1. Verify fastapi.__version__ is accessible and matches the imported __version__ symbol
assert hasattr(fastapi, "__version__"), "fastapi module must expose __version__"
assert isinstance(fastapi.__version__, str), f"Expected str for __version__, got {type(fastapi.__version__)}"
assert fastapi.__version__ is __version__, "__version__ imported directly must be identical to fastapi.__version__"
# 2. Verify fastapi.__version__ matches the exact pinned version "0.141.1"
assert fastapi.__version__ == "0.141.1", f"Expected version '0.141.1', got '{fastapi.__version__}'"
# 3. Verify semantic versioning format and integer component parsing
match = re.match(r"^(\d+)\.(\d+)\.(\d+)$", fastapi.__version__)
assert match is not None, f"Version '{fastapi.__version__}' does not match SemVer pattern"
major, minor, patch = map(int, match.groups())
assert major == 0, f"Expected major 0, got {major}"
assert minor == 141, f"Expected minor 141, got {minor}"
assert patch == 1, f"Expected patch 1, got {patch}"
# 4. Verify consistency with importlib.metadata distribution version
dist_version = importlib.metadata.version("fastapi")
assert fastapi.__version__ == dist_version, (
f"Module version '{fastapi.__version__}' does not match package metadata '{dist_version}'"
)
print(f"CONTRACT PASS: fastapi.__version__ == {fastapi.__version__} verified offline")
Ursprungs-Seeder
anonym