Pydantic models for the Open Cybersecurity Schema Framework (OCSF)
Project description
pydantic-ocsf
Pydantic models for the Open Cybersecurity Schema Framework (OCSF).
Installation
pip install pydantic-ocsf
Version Scheme
This package uses a version format of {ocsf_version}.{generation_date}:
- OCSF Version: The latest OCSF schema version included (e.g.,
1.7.0) - Generation Date: When the models were generated (format:
YYYYMMDD)
Example: 1.7.0.20260129 means OCSF schema v1.7.0 generated on January 29, 2026
This versioning scheme ensures you can track both the OCSF schema version and when the Pydantic models were last regenerated.
Quick Start
from ocsf import File, StatusId
import time
# Create a file object (using latest v1.7.0 by default)
file = File(
name="document.pdf",
type_id=1,
size=1024000,
)
# Serialize to JSON
json_str = file.model_dump_json(indent=2)
print(json_str)
# Parse from JSON
parsed = File.model_validate_json(json_str)
Supported OCSF Versions
ocsf.v1_7_0- OCSF 1.7.0 (also available asfrom ocsf import ...)ocsf.v1_6_0- OCSF 1.6.0ocsf.v1_5_0- OCSF 1.5.0ocsf.v1_2_0- OCSF 1.2.0ocsf.v1_1_0- OCSF 1.1.0ocsf.v1_0_0- OCSF 1.0.0
License
Apache 2.0
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 pydantic_ocsf-1.7.0.20260129.tar.gz.
File metadata
- Download URL: pydantic_ocsf-1.7.0.20260129.tar.gz
- Upload date:
- Size: 612.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1129ad6b8c9f444dfda577a7b05ad6b56d9121a9bfc16cb2072d84678ca4773f
|
|
| MD5 |
9e54a8b36d03b77f09ccda4ad686d2f4
|
|
| BLAKE2b-256 |
da6004a103b54da5fdd8f2dabbcc23144f7df542683f2c7ccee87529e9ed1b92
|
Provenance
The following attestation bundles were made for pydantic_ocsf-1.7.0.20260129.tar.gz:
Publisher:
publish.yml on mcm/pydantic-ocsf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pydantic_ocsf-1.7.0.20260129.tar.gz -
Subject digest:
1129ad6b8c9f444dfda577a7b05ad6b56d9121a9bfc16cb2072d84678ca4773f - Sigstore transparency entry: 870691036
- Sigstore integration time:
-
Permalink:
mcm/pydantic-ocsf@31f68573d073c3d595676e29bba2502f79f0f7e6 -
Branch / Tag:
refs/tags/v1.7.0.20260129 - Owner: https://github.com/mcm
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@31f68573d073c3d595676e29bba2502f79f0f7e6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pydantic_ocsf-1.7.0.20260129-py3-none-any.whl.
File metadata
- Download URL: pydantic_ocsf-1.7.0.20260129-py3-none-any.whl
- Upload date:
- Size: 1.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5461c1d3354229d2b8ecb04415c6cae10e6154b21742c80e698e117765b08af0
|
|
| MD5 |
b2e46444e4a3c798e72c7e92d6fb91d2
|
|
| BLAKE2b-256 |
24c508bdba8deb97633d50d83060756f72342f0d67b58ffa0882ee4f59092304
|
Provenance
The following attestation bundles were made for pydantic_ocsf-1.7.0.20260129-py3-none-any.whl:
Publisher:
publish.yml on mcm/pydantic-ocsf
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pydantic_ocsf-1.7.0.20260129-py3-none-any.whl -
Subject digest:
5461c1d3354229d2b8ecb04415c6cae10e6154b21742c80e698e117765b08af0 - Sigstore transparency entry: 870691041
- Sigstore integration time:
-
Permalink:
mcm/pydantic-ocsf@31f68573d073c3d595676e29bba2502f79f0f7e6 -
Branch / Tag:
refs/tags/v1.7.0.20260129 - Owner: https://github.com/mcm
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@31f68573d073c3d595676e29bba2502f79f0f7e6 -
Trigger Event:
push
-
Statement type: