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

License

Source-available under the Functional Source License 1.1 with an Apache 2.0 Future License (FSL-1.1-ALv2). Copyright 2026 Calethia.

In short:

  • You may read, run, modify, and redistribute this SDK for any purpose except a Competing Use — reselling it, or shipping it inside a commercial product or service that substitutes for Calethia. Internal use at your company, non-commercial education, and non-commercial research are all expressly permitted.
  • Your policies are yours. FSL carries no copyleft or share-alike obligation. Importing calethia does not encumber the policy code you write against it — keep it, relicense it, or take it elsewhere.
  • Every version becomes Apache-2.0 on the second anniversary of its release, so you can keep running your compliance checks indefinitely, with or without an account.

FSL is source-available, not an OSI-approved open source license. The SDK is provided as is, without warranties, and Calethia's liability is limited — see the Disclaimer section of LICENSE.md. It assists with compliance verification; it does not guarantee a passing audit. Third-party dependency licenses are inventoried in NOTICE.md.

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.1.tar.gz (646.9 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.1-py3-none-any.whl (603.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: calethia-0.2.1.tar.gz
  • Upload date:
  • Size: 646.9 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.1.tar.gz
Algorithm Hash digest
SHA256 ca448ac32cdbe62e321011e880398506d045c2c0f781374dbdd0069f03c17036
MD5 328a9708bfe098e42d9c96b57b805bf1
BLAKE2b-256 f68dfa6f4b4572b863487c9b94c5fa959e5b7fe002200e55ad5eb034fb9fa5ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for calethia-0.2.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: calethia-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 603.6 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1b988343dc38b529da028026a7e288fcc6a13e208ce51f682b462bf4af37eaa3
MD5 ccc26485db70d8189a7f755a021768d2
BLAKE2b-256 547f3e8f6e567206599c8c7056d46020733e0437609c303cb6f5f20180ec0fd4

See more details on using hashes here.

Provenance

The following attestation bundles were made for calethia-0.2.1-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