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.5.tar.gz (34.5 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.5-py3-none-any.whl (39.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: anvil_cloud-0.0.5.tar.gz
  • Upload date:
  • Size: 34.5 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.5.tar.gz
Algorithm Hash digest
SHA256 6d0bf9974505543d8cf4dc7326e39834886750389018b6eea2b8b7286092f11d
MD5 3d5504703b2abdbf13549a708fa8b5c5
BLAKE2b-256 a5e7967f18d771cd21b7c538bf8da897ad27ac1020013f4ee61c4bc1eb3d467e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: anvil_cloud-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 39.6 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 4466429c8c4d78dca131967509a6ffbba51d7855642929a803d39c1f6bcfb6c1
MD5 bf2dfe1460ece412ebb8647c856bc10b
BLAKE2b-256 49aebd7819bf8147a223e85d1d2fbfdbc0c500e052e19e84b6ddcfb3f3e47732

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