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

Uploaded Python 3

File details

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

File metadata

  • Download URL: anvil_cloud-0.0.6.tar.gz
  • Upload date:
  • Size: 35.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.6.tar.gz
Algorithm Hash digest
SHA256 2b621345e73cc027ca09bf1e84aad0862e7544e4737bc72996f3035208939ae6
MD5 27c2275aea6ab0cd55bb20b5ec98d0e3
BLAKE2b-256 e66438e453a709717a3affd5b9e849935e6ae6ded539b1976edf8407e127be61

See more details on using hashes here.

File details

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

File metadata

  • Download URL: anvil_cloud-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 40.8 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 628aaee6daf364669c85f9cc5406b5f8fb4aa0d2386dd49851ab3e1aa32ae97e
MD5 cd22cd537f7414691f5d3247e331550e
BLAKE2b-256 e35a7024153d128d1bf92b01274d3d8aa69c5e7a1eb27717180ba9c99f1e09fb

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