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.9.tar.gz (38.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.9-py3-none-any.whl (45.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: anvil_cloud-0.0.9.tar.gz
  • Upload date:
  • Size: 38.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.9.tar.gz
Algorithm Hash digest
SHA256 6bf9e67d7602a00edfd66b99056a8fb58c4bf4098a37e1de2d5f244a9a1b55d0
MD5 972206f12e4abe4b434b102407ba1c87
BLAKE2b-256 2ae363251cdab0b6e2cd95c1a657989aeaf3e18c14a12e22c6267b706f2e2729

See more details on using hashes here.

File details

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

File metadata

  • Download URL: anvil_cloud-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 45.4 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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 c04469a16221035f086c66e9158cba4a3486d424b28e16755584f1cddf1ba6fb
MD5 dee3ab8bfb79b6391300cba4ec80d4a2
BLAKE2b-256 7ed3ce7f4e6eb9c183964fe8d9275d07bd3b9bb9f1a18b00c59af97e89e0ff31

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