Skip to main content

cloudcoil-models-cert-manager

Versioned cert-manager models for cloudcoil.

PyPI Downloads License: Apache-2.0 CI

[!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 cert-manager support
uv add cloudcoil.models.cert_manager

Using pip:

pip install cloudcoil.models.cert_manager

💡 Examples

Using cert-manager Models

from cloudcoil import apimachinery
import cloudcoil.models.cert_manager.v1 as cm

# Create a Certificate
certificate = cm.Certificate(
    metadata=apimachinery.ObjectMeta(name="example-cert", namespace="default"),
    spec=cm.CertificateSpec(
        secret_name="example-cert-tls",
        issuer_ref=cm.IssuerRef(name="example-issuer"),
        dns_names=["example.com"]
    )
).create()

# List Certificates
for cert in cm.Certificate.list(namespace="default"):
    print(f"Found certificate: {cert.metadata.name}")

# Update a Certificate
certificate.spec.dns_names.append("www.example.com")
certificate.save()

# Delete a Certificate
cm.Certificate.delete("example-cert", namespace="default")

Using the Fluent Builder API

Cloudcoil provides a powerful fluent builder API for cert-manager resources with full IDE support and rich autocomplete capabilities:

from cloudcoil.models.cert_manager.v1 import Certificate, ClusterIssuer

# Create a Certificate using the fluent builder
# The fluent style is great for one-liners and simple configurations
certificate = (
    Certificate.builder()
    .metadata(lambda metadata: metadata
        .name("example-cert")
        .namespace("default")
        .labels({"env": "prod"})
    )
    .spec(lambda cert_spec: cert_spec
        .secret_name("example-cert-tls")
        .issuer_ref(lambda issuer: issuer
            .name("example-issuer")
            .kind("ClusterIssuer")
        )
        .dns_names(["example.com", "www.example.com"])
        .subject(lambda subject: subject
            .organizations(["Example Corp"])
        )
    )
    .build()
)

# Create a ClusterIssuer using the builder
cluster_issuer = (
    ClusterIssuer.builder()
    .metadata(lambda m: m.name("letsencrypt-prod"))
    .spec(
        lambda s: s.acme(
            lambda acme: acme.email("admin@example.com")
            .server("https://acme-v02.api.letsencrypt.org/directory")
            .private_key_secret_ref(lambda ref: ref.name("letsencrypt-account-key"))
            .solvers(
                lambda solvers: solvers.add(
                    lambda solver: solver.http01(
                        lambda http: http.ingress(lambda ing: ing.class_("nginx"))
                    )
                )
            )
        )
    )
    .build()
)

Using the Context Manager Builder API

For complex nested resources, Cloudcoil also provides a context manager-based builder pattern that can make the structure more clear:

from cloudcoil.models.cert_manager.v1 import Certificate, ClusterIssuer

# Create a certificate using context managers
with Certificate.new() as cert:
    with cert.metadata() as metadata:
        metadata.name("example-cert")
        metadata.namespace("default")
        metadata.labels({"env": "prod"})
    
    with cert.spec() as spec:
        spec.secret_name("example-cert-tls")
        
        with spec.issuer_ref() as issuer_ref:
            issuer_ref.name("example-issuer")
            issuer_ref.kind("ClusterIssuer")
        
        spec.dns_names(["example.com", "www.example.com"])
        
        with spec.subject() as subject:
            subject.organizations(["Example Corp"])

final_cert = cert.build()

# Create a ClusterIssuer using context managers
with ClusterIssuer.new() as issuer:
    with issuer.metadata() as metadata:
        metadata.name("letsencrypt-prod")
    
    with issuer.spec() as spec:
        with spec.acme() as acme:
            acme.email("admin@example.com")
            acme.server("https://acme-v02.api.letsencrypt.org/directory")
            
            with acme.private_key_secret_ref() as key_ref:
                key_ref.name("letsencrypt-account-key")
            
            with acme.solvers() as solvers:
                with solvers.add() as solver:
                    with solver.http01() as http:
                        with http.ingress() as ingress:
                            ingress.class_("nginx")

final_issuer = issuer.build()

The context manager builder provides:

  • 🎭 Clear visual nesting of resource structure
  • 🔒 Automatic resource cleanup
  • 🎯 Familiar Python context manager pattern
  • ✨ Same great IDE support as the fluent builder

Mixing Builder Styles

CloudCoil's intelligent builder system automatically detects which style you're using and provides appropriate IDE support:

from cloudcoil.models.cert_manager.v1 import Certificate
from cloudcoil import apimachinery

# Mixing styles lets you choose the best approach for each part
with Certificate.new() as cert:
    # Direct object initialization with full type checking
    cert.metadata(apimachinery.ObjectMeta(
        name="example-cert",
        namespace="default",
        labels={"env": "prod"}
    ))
    
    with cert.spec() as spec:
        # Simple fields directly
        spec.secret_name("example-cert-tls")
        # Fluent style
        spec.issuer_ref(lambda ref: ref
            .name("example-issuer")
            .kind("ClusterIssuer")
        )
        # Direct assignment
        spec.dns_names(["example.com", "www.example.com"])
        # Context manager style
        with spec.subject() as subject:
            subject.organizations(["Example Corp"])

final_cert = cert.build()

This flexibility allows you to:

  • 🔀 Choose the most appropriate style for each part of your configuration
  • 📖 Maximize readability for both simple and complex structures
  • 🎨 Format your code according to your team's preferences
  • 🧠 Get full IDE support with automatic style detection
  • ✨ Enjoy rich autocomplete in all styles
  • ⚡ Benefit from type checking across mixed styles
  • 🎯 Receive immediate feedback on type errors
  • 🔍 See documentation for all fields regardless of style

📚 Documentation

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

📜 License

Apache License, Version 2.0 - see LICENSE

Release files for cloudcoil.models.cert-manager 1.21.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cloudcoil.models.cert-manager 1.21.1.0
File Size Uploaded
cloudcoil_models_cert_manager-1.21.1.0.tar.gz 233.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cloudcoil.models.cert-manager 1.21.1.0
File Interpreter ABI Platform
cloudcoil_models_cert_manager-1.21.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 407.5 kB

Release files / cloudcoil_models_cert_manager-1.21.1.0.tar.gz

Download URL cloudcoil_models_cert_manager-1.21.1.0.tar.gz
Size 233.8 kB
Tags Source
SHA-256 checksum
How to use checksums
0aed73ee2bf418a802804beba7f89302b04e52f17344f142035c422204c05cf3
BLAKE2b-256 checksum
How to use checksums
92dcdd508172d8482537f39828a1ea1ae94e31516a8278d9441ac7b25a95bdc3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 7, 2026.

Transparency log

Release files / cloudcoil_models_cert_manager-1.21.1.0-py3-none-any.whl

Download URL cloudcoil_models_cert_manager-1.21.1.0-py3-none-any.whl
Size 173.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9ddee51f279de62915144b7831dea10543de2884a488150ce9686fef85e18820
BLAKE2b-256 checksum
How to use checksums
e07ef83fff3ee736404fce8996b326f64da54feb9d2ae172ee42ac478519efd9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 7, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.21.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page