--- id: py-ocsf-models version: "0.10.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # py-ocsf-models — This is a Python implementation of the OCSF models. The models are used to represent the data of the OCSF Schema defined in https://schema.ocsf.io/. License: permissive · Maintenance: active · Downloads: 138.0K/mo ## What it is and what it does py-ocsf-models is a Python library that implements the Open Cybersecurity Schema Framework (OCSF) as a set of Pydantic-based data models. It lets you work with structured cybersecurity data—events, findings, and objects—in a standardized format that can be serialized to and from JSON. The package is built to support tools like Prowler in generating OCSF-compliant security findings that can be shared across different security platforms and tools. The library depends on Pydantic for model validation and email-validator for email field handling. It covers Detection Findings, Compliance Findings, and Application Security Posture Findings as defined by the OCSF schema. You can create, modify, and serialize cybersecurity data structures while staying compliant with the OCSF specification, making it useful for security platforms, compliance reporting, and interoperability between tools. Use it for: - Generate standardized OCSF-formatted security findings from custom security tools or scanners - Consume and validate OCSF detection or compliance findings from external security platforms - Build compliance reporting pipelines that output findings in OCSF format for regulatory or audit purposes - Integrate security data from multiple sources into a unified OCSF-compliant data model - Serialize and store cybersecurity events in a standardized, widely-accepted schema for long-term analysis ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides Python models for the Open Cybersecurity Schema Framework (OCSF), enabling structured representation and manipulation of cybersecurity events, findings, and objects. Yes. The package is actively maintained, has low install friction, carries a permissive license, and fills a specific need for OCSF schema compliance in Python. It has no known vulnerabilities and is already in use by established security tools. Install it if you need to work with OCSF-formatted cybersecurity data or integrate with platforms that expect OCSF compliance. ## Install pip install py-ocsf-models uv add py-ocsf-models poetry add py-ocsf-models ## Installing py-ocsf-models Before you install: Low friction: pure Python wheel with only two runtime dependencies (pydantic and email-validator). Last release 32 days ago; repository is active with recent commits and no archived status. License in practice: Apache-2.0 permissive license allows commercial and private use with minimal restrictions; you must include a copy of the license and state significant changes, but derivative works are permitted. Quickstart: pip install py-ocsf-models import py_ocsf_models # Create and work with OCSF model instances for detection findings, compliance findings, or application security posture findings Requires Python 3.10 or later (supports up to but not including 3.15) Verify before relying: - Whether the package's OCSF coverage extends beyond the three finding types explicitly listed (Detection, Compliance, Application Security Posture) - Performance characteristics when handling large volumes of cybersecurity events or findings - Whether custom model extensions remain compatible with OCSF schema validation across updates ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 138.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags ocsf schema python models, cybersecurity data standardization, ocsf detection findings, structured security event models, ocsf compliance findings, security data serialization, cybersecurity schema framework, cybersecurity-schema, ocsf-compliance, security-findings [View on SkillFed](https://skillfed.io/packages/py-ocsf-models) · [View on PyPI](https://pypi.org/project/py-ocsf-models/)