Skip to main content

Anvil — secure-by-default cloud infrastructure components

Project description

anvil-cloud

Cloud infrastructure that's secure by default — not by accident.

Anvil wraps raw cloud resources into opinionated, production-ready components. No boilerplate. No copy-pasting security configs. Just declare what you need.

Install

pip install anvil-cloud

Quick start

Create anvil.config.py at your project root:

import anvil_cloud as anvil

def infra(ctx: anvil.Context):
    bucket = anvil.aws.Bucket("uploads",
        data_classification="sensitive",
    )
    ctx.export("bucketName", bucket.bucket_name)

anvil.App(run=infra)

Deploy:

anvil deploy

That S3 bucket ships with public access blocked, encryption enabled, and versioning on — because that's how every bucket should start.

The App class

Every Anvil program starts with anvil.App(). The run callback receives a Context with:

  • ctx.stage — the current deployment stage (defaults to your OS username for dev isolation)
  • ctx.project — the project name from anvil.yaml
  • ctx.export(name, value) — export stack outputs
  • ctx.providers — named cloud providers for multi-region / multi-account

Multi-cloud

import anvil_cloud as anvil

def infra(ctx: anvil.Context):
    # AWS
    bucket = anvil.aws.Bucket("data",
        data_classification="sensitive",
    )

    # GCP
    gcs = anvil.gcp.StorageBucket("backup",
        data_classification="internal",
        location="US",
    )

anvil.App(run=infra)

Overrides

Every component accepts a transform argument to override the underlying resource config:

bucket = anvil.aws.Bucket("custom",
    data_classification="non-sensitive",
    transform=anvil.aws.BucketTransformArgsArgs(
        overrides=anvil.aws.BucketOverridesArgs(
            force_destroy=True,
            tags={"env": "dev"},
        ),
    ),
)

Requirements

  • Python >= 3.8
  • Pulumi >= 3.0.0
  • The Anvil CLI (curl -fsSL https://raw.githubusercontent.com/DamienPace15/anvil/master/install.sh | sh)

Links

License

Apache-2.0

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

anvil_cloud-0.0.8.tar.gz (36.4 kB view details)

Uploaded Source

Built Distribution

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

anvil_cloud-0.0.8-py3-none-any.whl (43.1 kB view details)

Uploaded Python 3

File details

Details for the file anvil_cloud-0.0.8.tar.gz.

File metadata

  • Download URL: anvil_cloud-0.0.8.tar.gz
  • Upload date:
  • Size: 36.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for anvil_cloud-0.0.8.tar.gz
Algorithm Hash digest
SHA256 13301f57ee27ac77513fee83f648ef7a54d91c70ed1c712917b5b9a597a5c35a
MD5 9451997fca882b5bf612533fe1143278
BLAKE2b-256 91e2703485330fbf2bb8a15557109d39a8d90b6693fa6cdcf4ad88d63e3737da

See more details on using hashes here.

File details

Details for the file anvil_cloud-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: anvil_cloud-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 43.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for anvil_cloud-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 f17d358578ca35ffb354cccea0de4a7b5781d7e8c380065737084f23daa12f85
MD5 beb353ac4738229ee5c1edca7916f46a
BLAKE2b-256 1e3a4074020ce2f0ecdd8dd4def8214e28df0bc47d9c844e3b79bb90b3ff6b70

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