Skip to main content

Calethia SDK for writing compliance policies as code

Project description

Calethia SDK

Python SDK for writing compliance policies as code.

Installation

pip install calethia

Quick Start

from calethia import policy, Severity
from calethia.aws import iam
from calethia.frameworks import SOC2, CIS_AWS

@policy(
    id="aws.iam.mfa_required",
    name="IAM Users Have MFA",
    severity=Severity.HIGH,
    frameworks=[SOC2("CC6.1"), CIS_AWS("1.10")],
)
def check_mfa(ctx: iam.Context) -> iam.Result:
    """Ensure all IAM users with console access have MFA enabled."""
    users = ctx.list_users()

    for user in users:
        if user.has_console_access and not user.mfa_enabled:
            ctx.fail(user.to_resource(), "User has console access but no MFA")
        else:
            ctx.pass_(user.to_resource())

    return ctx.result()

Features

  • Decorator-based policy definition
  • Type-safe framework control mappings
  • AWS context with managed boto3 clients
  • Full IDE autocomplete support

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

calethia-0.2.0.tar.gz (510.0 kB view details)

Uploaded Source

Built Distribution

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

calethia-0.2.0-py3-none-any.whl (527.8 kB view details)

Uploaded Python 3

File details

Details for the file calethia-0.2.0.tar.gz.

File metadata

  • Download URL: calethia-0.2.0.tar.gz
  • Upload date:
  • Size: 510.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for calethia-0.2.0.tar.gz
Algorithm Hash digest
SHA256 f9b5872b01bb36fbd4aba492f526d7efffc9fc42969fce6cc97e113350e8a496
MD5 7796daf9b3091cc6dd54bfd238844659
BLAKE2b-256 28d2f1ba804c9d9070fb15eb27b23cdbbd9f8c1caa787b81ba28ae0925cd3598

See more details on using hashes here.

Provenance

The following attestation bundles were made for calethia-0.2.0.tar.gz:

Publisher: publish-sdk.yml on calethia/calethia

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file calethia-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: calethia-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 527.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for calethia-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9302edd2f3369e7f407556f3a2e11336eab38b31df322db6d729e2d5b31c3699
MD5 54e32ad82124ab498415487b6e24b733
BLAKE2b-256 bcfaed91efe213026adb93978be19e6f55834ccc3c82984024f0ce79d388e05c

See more details on using hashes here.

Provenance

The following attestation bundles were made for calethia-0.2.0-py3-none-any.whl:

Publisher: publish-sdk.yml on calethia/calethia

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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