Skip to main content

A small Python toolkit for defining and evaluating compliance checklists.

Project description

compliance-checkkit

compliance-checkkit is a small Python library and CLI for defining compliance controls, attaching evidence, and producing simple pass/fail reports.

It is designed for early audit automation, internal readiness checks, and CI gatekeeping where a lightweight checklist is enough.

Install

pip install compliance-checkkit

For local development:

python -m pip install -e ".[dev]"

Quick Start

Create a checklist:

id: soc2-lite
name: SOC 2 Readiness
controls:
  - id: access-review
    title: Quarterly access reviews are completed
    required: true
    checks:
      - evidence_key: access_review_completed
        equals: true
  - id: incident-plan
    title: Incident response plan exists
    required: true
    checks:
      - evidence_key: incident_response_plan_url
        present: true

Create evidence:

{
  "access_review_completed": true,
  "incident_response_plan_url": "https://example.com/plan"
}

Run the CLI:

compliance-checkkit evaluate checklist.yml evidence.json

Use the library:

from compliance_checkkit import evaluate_files

report = evaluate_files("checklist.yml", "evidence.json")
print(report.summary.status)

Checklist Format

Each control contains one or more checks. A control passes only when all of its checks pass.

Supported check fields:

  • evidence_key: key to read from the evidence file
  • present: true: value must be present and non-empty
  • equals: value must equal the expected value
  • contains: value must contain the expected item or substring
  • one_of: value must be one of the listed values

Publish

Update the package metadata in pyproject.toml, especially the GitHub URLs, then:

python -m pip install -e ".[dev]"
python -m pytest
python -m build
python -m twine upload dist/*

For a safer first release, publish to TestPyPI:

python -m twine upload --repository testpypi dist/*

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

compliance_checkkit-0.1.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

compliance_checkkit-0.1.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file compliance_checkkit-0.1.0.tar.gz.

File metadata

  • Download URL: compliance_checkkit-0.1.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for compliance_checkkit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b1a063fa014fecb085e60071c3933e027b0049c9c00b85c8031f79cfcd268348
MD5 174d6f6d2d407b5e65dc33ae10887eae
BLAKE2b-256 1482008ac734e6be3dcc03cfe3c1ddb674d98dce628abcd5716ac9c052b6097f

See more details on using hashes here.

File details

Details for the file compliance_checkkit-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for compliance_checkkit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fe2167f243bdef6c52f2b6def606b6db99dbbe72273b755fc34e5881a94a121d
MD5 9902039f5d978efc9247fb7f08a027bc
BLAKE2b-256 169f17f83216874b57574f3a5f5209a2821c444ee3e4eabe4204841f6a241c12

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page