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

Uploaded Python 3

File details

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

File metadata

  • Download URL: anvil_cloud-0.0.7.tar.gz
  • Upload date:
  • Size: 35.8 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.7.tar.gz
Algorithm Hash digest
SHA256 781cfe9392c9658e9ae6b06c4b423160a398b8e1f846fcbda66fdb77d6507e3f
MD5 2575bbf2b780f87e8d6e2b12b97c3186
BLAKE2b-256 decd589ca3baca1d76f9dd9476361028567c9164b63d979dc5f395143a59e847

See more details on using hashes here.

File details

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

File metadata

  • Download URL: anvil_cloud-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 41.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.7-py3-none-any.whl
Algorithm Hash digest
SHA256 44ad7701b9929f3c94ae987c9be4fe1ddb49aed663439707a2643bbc0b547f79
MD5 f0663a92d31ba427f0881ee910061739
BLAKE2b-256 e9599bc44e93f26b67c957d3c43a16adbaac9f947fe17e49f568c5e38c0a7562

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