Skip to main content

Versioned velero models for cloudcoil

Project description

cloudcoil-models-velero

Versioned velero models for cloudcoil.

[!WARNING]
This repository is auto-generated from the cloudcoil repository. Please do not submit pull requests here. Instead, submit them to the main repository at https://github.com/cloudcoil/cloudcoil.

🔧 Installation

[!NOTE] For versioning information and compatibility, see the Versioning Guide.

Using uv (recommended):

# Install with Velero support
uv add cloudcoil.models.velero

Using pip:

pip install cloudcoil.models.velero

💡 Examples

Using Velero Models

from cloudcoil import apimachinery
import cloudcoil.models.velero.v1 as velero

# Create a Backup
backup = velero.Backup(
    metadata=apimachinery.ObjectMeta(name="mybackup"),
    spec=velero.BackupSpec(
        included_namespaces=["default"],
        storage_location="default"
    )
).create()

# List Backups
for b in velero.Backup.list():
    print(f"Found Backup: {b.metadata.name}")

Using the Fluent Builder API

Cloudcoil provides a powerful fluent builder API for Velero resources:

from cloudcoil.models.velero.v1 import Backup

# Create a Backup using the fluent builder
backup = (
    Backup.builder()
    .metadata(lambda metadata: metadata
        .name("mybackup")
        .namespace("velero")
        .labels({"app": "myapp"})
    )
    .spec(lambda spec: spec
        .included_namespaces(["default", "kube-system"])
        .storage_location("default")
        .ttl("72h")
        .hooks(lambda hooks: hooks
            .resources(lambda resources: resources.add({
                "name": "my-hook",
                "included_namespaces": ["default"]
            }))
        )
    )
    .build()
)

Using the Context Manager Builder API

For complex backup configurations, you can use the context manager-based builder:

from cloudcoil.models.velero.v1 import Backup

# Create a Backup using context managers
with Backup.new() as backup:
    with backup.metadata() as metadata:
        metadata.name("mybackup")
        metadata.namespace("velero")

    with backup.spec() as spec:
        spec.included_namespaces(["default", "kube-system"])
        spec.storage_location("default")
        spec.ttl("72h")
        with spec.hooks() as hooks:
            with hooks.resources() as resources:
                with resources.add() as resource:
                    resource.name("my-hook").included_namespaces(["default"])
                with resources.add() as resource:
                    resource.name("another-hook").included_namespaces(["default"])
final_backup = backup.build()

📚 Documentation

For complete documentation, visit cloudcoil.github.io/cloudcoil

📜 License

Apache License, Version 2.0 - see LICENSE

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

cloudcoil_models_velero-1.15.2.1.tar.gz (99.8 kB view details)

Uploaded Source

Built Distribution

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

cloudcoil_models_velero-1.15.2.1-py3-none-any.whl (38.6 kB view details)

Uploaded Python 3

File details

Details for the file cloudcoil_models_velero-1.15.2.1.tar.gz.

File metadata

File hashes

Hashes for cloudcoil_models_velero-1.15.2.1.tar.gz
Algorithm Hash digest
SHA256 74b72073857364fac3644c25b590b5c41607173afa1e28b1bb05b927221a8a5c
MD5 3c2896e09afb25b3fe0e23d076272e1d
BLAKE2b-256 b33035b86641af18034bcf72e8860afbac907b91082646fd35e6e4db0ae4d5a2

See more details on using hashes here.

Provenance

The following attestation bundles were made for cloudcoil_models_velero-1.15.2.1.tar.gz:

Publisher: pypi_publish.yml on cloudcoil/models-velero

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file cloudcoil_models_velero-1.15.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for cloudcoil_models_velero-1.15.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c0aef920e00c9bef6ddf0189f89499d24716d0fdd138c1a9b16b0b43c226c1bf
MD5 c0f6f344641650c7eaeb61eafd8f8995
BLAKE2b-256 bd37d3208bc49d86653f741a20ef83943ab80e1af65aa4a108d2066d80cf9c1a

See more details on using hashes here.

Provenance

The following attestation bundles were made for cloudcoil_models_velero-1.15.2.1-py3-none-any.whl:

Publisher: pypi_publish.yml on cloudcoil/models-velero

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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