Skip to main content

OCSF Simulator

A Python library and CLI that generates simulated OCSF (Open Cybersecurity Schema Framework) event streams. Useful for testing streaming pipelines, security analytics tools, SIEMs, and detection rules with realistic synthetic data.

Install

pip install .

Optional extras:

pip install ".[ocsf]"    # use the real ocsf-lib schema
pip install ".[kafka]"   # enable Kafka output
pip install ".[all]"

Use as a CLI

By default, events are written as JSON lines to stdout:

ocsf-sim --interval 1.0 --batch-size 5 --max-events 20

Send events to Kafka instead:

ocsf-sim --enable-kafka --kafka-servers localhost:9092 --kafka-topic ocsf-events

Common flags:

Flag Description
--interval Seconds between batches (default 1.0)
--batch-size Events per batch (default 10)
--max-events Stop after generating N events
--duration Stop after N minutes
--event-classes OCSF class UIDs to generate (default 3002 4001 1007 2001)
--profiles OCSF profiles to apply (default cloud security_control)
--ocsf-version OCSF schema version (default 1.1.0)
--enable-kafka Publish events to Kafka

Run ocsf-sim --help for the full list.

Use as a library

from ocsf_simulator import JSONSchemaFaker, stream_ocsf_events

# One-shot event generation
faker = JSONSchemaFaker(ocsf_version="1.1.0")
event = faker.generate_ocsf_event(3002, profiles=["host", "security_control"])

# Streaming generator (yields events forever)
for event in stream_ocsf_events(event_classes=[3002, 4001], interval=1.0):
    print(event)

Supported event classes

The simulator can generate events for any OCSF class, with richer dedicated generators for these commonly-used ones:

UID Class
1001 File System Activity
1007 Process Activity
2001 Security Finding
3002 Authentication
4001 Network Activity

License

Apache-2.0

Metadata

Release files for timeplus-ocsf-simulator 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for timeplus-ocsf-simulator 0.1.0
File Size Uploaded Provenance Actions
timeplus_ocsf_simulator-0.1.0.tar.gz 2.6 MB Without provenance Details for timeplus_ocsf_simulator-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for timeplus-ocsf-simulator 0.1.0
File Interpreter ABI Platform Actions
timeplus_ocsf_simulator-0.1.0-py3-none-any.whl Python 3 none any Details for timeplus_ocsf_simulator-0.1.0-py3-none-any.whl

Total release size: 5.1 MB

Release files / timeplus_ocsf_simulator-0.1.0.tar.gz

Download URL timeplus_ocsf_simulator-0.1.0.tar.gz
Size 2.6 MB
Tags Source
SHA-256 checksum
How to use checksums
88a5bc689148d2e1a1999cfba9163ad3340f38929750f30d50e0450793c1d88c
BLAKE2b-256 checksum
How to use checksums
f9ae4550dc260bc119790c200429124211ade6d581dd6f0b9a290daaf82b36bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / timeplus_ocsf_simulator-0.1.0-py3-none-any.whl

Download URL timeplus_ocsf_simulator-0.1.0-py3-none-any.whl
Size 2.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
b25e74635859b24c2e303c5b40f516c746c759b847af204d1b6a23efa2935e07
BLAKE2b-256 checksum
How to use checksums
a2347d36c96884bb5a75cc0acdc03743e9a079e721e4310a75c067ece1c897d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for timeplus-ocsf-simulator 0.1.0

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page