This release is a pre-release and may not be stable for production use.
cdm-lite
Python Pydantic models for the FINOS Common Domain Model (CDM).
cdm-lite provides a lightweight CLI to download, clean, and compile official FINOS CDM JSON
schemas into Pydantic v2 models. This enables strict validation, autocompletion, and robust
deserialization of CDM JSON payloads in Python codebases without heavy Java dependencies.
Status
Current Phase: Beta
cdm-lite is currently in a beta development stage. While the core functionality is stable, we are actively refining the cleaning and generation logic based on community feedback.
Feedback Welcome: We gratefully encourage users to provide comments, recommendations, or report any issues found during usage. Your input will help in reaching a stable 1.0 release.
Scope & Limitations
⚠️ Disclaimer: cdm-lite is intended primarily as a lightweight deserializer. The generated
Python models are derived directly from the published JSON Schemas. While they provide close
structural validation, we cannot guarantee that the generated models perfectly match the
behavioral constraints of the full Common Domain Model.
Pydantic classes inherently cannot capture the full extent of the CDM's functionality, such as complex cross-field cardinality checks, conditions, or rosetta-injected logic. For robust serialization and comprehensive domain validation, we strongly recommend using the official, full CDM project implementations (e.g., the Java distribution).
Installation
uv tool install cdm-lite
Workflow
Download and compile the CDM models for your required schema version:
# List available FINOS CDM versions from Maven Central
cdm-lite versions
# Download schemas and compile Pydantic models locally
cdm-lite install 6.19.0
# Activate the version (updates a local symlink)
cdm-lite use 6.19.0
Note: Models are compiled into a user-level cache directory (e.g., ~/.cache/cdm-lite/). Run cdm-lite status to view your specific path.
Project Integration
To use the compiled models in your application, point your environment to the active models directory.
Using uv (pyproject.toml):
[tool.uv.sources]
# Use the exact absolute path returned by `cdm-lite use`
cdm-models = { path = "/home/user/.cache/cdm-lite/current" }
[project]
dependencies = ["cdm-models"]
Using PYTHONPATH:
# Use the exact absolute path returned by `cdm-lite use`
export PYTHONPATH="/home/user/.cache/cdm-lite/current:$PYTHONPATH"
Deserializing JSON
Once the models are available in your path, use standard Pydantic APIs to parse, validate, and interact with incoming JSON objects:
from cdm-models.models.cdm_event_common_TradeState_schema import TradeState # Exact import paths depend on the CDM schema
payload = '{"trade": {"tradeDate": {"value": "2023-10-25"}}}'
# Deserialize and strictly validate the JSON string
trade_state = TradeState.model_validate_json(payload)
# Access typed and autocompleted attributes
print(trade_state.trade.trade_date.value)
Reference Commands
cdm-lite --version: Print the installed version.cdm-lite versions: View available versions on Maven Central.cdm-lite install <version>: Fetch schemas and compile models.cdm-lite use <version>: Set the active version for thecurrentsymlink.cdm-lite list: Show locally compiled versions.cdm-lite status: Print active version and system cache location.cdm-lite remove <version>: Delete a specific version from the local cache.cdm-lite clear: Remove all local schemas and generated models.
Metadata
Release files for cdm-lite 0.5.0b4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cdm_lite-0.5.0b4.tar.gz | 19.5 kB | Without provenance | Details for cdm_lite-0.5.0b4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cdm_lite-0.5.0b4-py3-none-any.whl | Python 3 | none | any | Details for cdm_lite-0.5.0b4-py3-none-any.whl |
Total release size: 44.7 kB
Release files / cdm_lite-0.5.0b4.tar.gz
| Download URL | cdm_lite-0.5.0b4.tar.gz |
|---|---|
| Size | 19.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b1f14c336c1b500262013a933c827d48cf98217fac75acee2c5c708025771461
|
|
BLAKE2b-256 checksum How to use checksums |
6776f51a436c624e38bb8f4ca52b484d062d65f91891e511a89b32a76982278d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / cdm_lite-0.5.0b4-py3-none-any.whl
| Download URL | cdm_lite-0.5.0b4-py3-none-any.whl |
|---|---|
| Size | 25.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6a85938816969b2b2e2dde442f3b352b97ffd9369276cdce2a58fea2e3f72d14
|
|
BLAKE2b-256 checksum How to use checksums |
a910e6fd4d0c8c81079d6ac1c06e59e7f61c12da81d3b78b6922ce7c2d51ffa1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for cdm-lite 0.5.0b4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.