Skip to main content

cloudcoil-models-prometheus-operator

Versioned prometheus-operator 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 Prometheus Operator support
uv add cloudcoil.models.prometheus_operator

Using pip:

pip install cloudcoil.models.prometheus_operator

💡 Examples

Using Prometheus Operator Models

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

# Create a Prometheus instance
prometheus = prometheus_operator.Prometheus(
    metadata=apimachinery.ObjectMeta(name="main"),
    spec=prometheus_operator.PrometheusSpec(
        external_url="http://monitoring.my.systems/prometheus",
        resources=prometheus_operator.PrometheusSpecResources(
            requests={
                "memory": "400Mi"
            }
        )
    )
).create()

# Create an Alertmanager instance
alert_manager = prometheus_operator.Alertmanager(
    metadata=apimachinery.ObjectMeta(name="main"),
    spec=prometheus_operator.AlertmanagerSpec(
        replicas=3,
        external_url="http://monitoring.my.systems/alertmanager",
        resources=prometheus_operator.AlertmanagerSpecResources(
            requests={
                "memory": "400Mi"
            }
        )
    )
).create()

# List Prometheus instances
for prom in prometheus_operator.Prometheus.list():
    print(f"Found Prometheus: {prom.metadata.name}")

Using the Fluent Builder API

Cloudcoil provides a powerful fluent builder API for Prometheus Operator resources:

from cloudcoil.models.prometheus_operator.v1 import Prometheus, Alertmanager

# Create a Prometheus using the builder
prometheus = (
    Prometheus.builder()
    .metadata(lambda m: m
        .name("main")
    )
    .spec(lambda s: s
        .external_url("http://monitoring.my.systems/prometheus")
        .resources(lambda r: r
            .requests({
                "memory": "400Mi"
            })
        )
    )
    .build()
)

# Create an Alertmanager using the builder
alert_manager = (
    Alertmanager.builder()
    .metadata(lambda m: m
        .name("main")
    )
    .spec(lambda s: s
        .replicas(3)
        .external_url("http://monitoring.my.systems/alertmanager")
        .resources(lambda r: r
            .requests({
                "memory": "400Mi"
            })
        )
    )
    .build()
)

Using the Context Manager Builder API

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

from cloudcoil.models.prometheus_operator.v1 import Prometheus

# Create a Prometheus instance using context managers
with Prometheus.new() as prometheus:
    with prometheus.metadata() as metadata:
        metadata.name("main")
    
    with prometheus.spec() as spec:
        spec.external_url("http://monitoring.my.systems/prometheus")
        with spec.resources() as resources:
            resources.requests({
                "memory": "400Mi"
            })

final_prometheus = prometheus.build()

Mixing Builder Styles

You can mix different builder styles based on your needs:

from cloudcoil.models.prometheus_operator.v1 import Alertmanager
from cloudcoil import apimachinery

# Create an Alertmanager using mixed styles
with Alertmanager.new() as alert_manager:
    # Direct object initialization
    alert_manager.metadata(apimachinery.ObjectMeta(
        name="main"
    ))
    
    # Fluent style for spec
    alert_manager.spec(lambda s: s
        .replicas(3)
        .external_url("http://monitoring.my.systems/alertmanager")
        .resources(lambda r: r
            .requests({
                "memory": "400Mi"
            })
        )
    )

final_alert_manager = alert_manager.build()

📚 Documentation

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

📜 License

Apache License, Version 2.0 - see LICENSE

Release files for cloudcoil.models.prometheus-operator 0.93.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.prometheus-operator 0.93.1.0
File Size Uploaded
cloudcoil_models_prometheus_operator-0.93.1.0.tar.gz 936.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cloudcoil.models.prometheus-operator 0.93.1.0
File Interpreter ABI Platform
cloudcoil_models_prometheus_operator-0.93.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.8 MB

Release files / cloudcoil_models_prometheus_operator-0.93.1.0.tar.gz

Download URL cloudcoil_models_prometheus_operator-0.93.1.0.tar.gz
Size 936.1 kB
Tags Source
SHA-256 checksum
How to use checksums
21e38dfd1b6012107a03157e19d185e562706e0df0ea093c30cbb6be8a6f4287
BLAKE2b-256 checksum
How to use checksums
2c7e38b077bfe017d685aa9c714e236370ca1a707efb084943ebe60b45c733c1
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_prometheus_operator-0.93.1.0-py3-none-any.whl

Download URL cloudcoil_models_prometheus_operator-0.93.1.0-py3-none-any.whl
Size 895.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5a9502199a152c956c91197854af2e0900763fa87e52dbf6e03e0860b14ae9ce
BLAKE2b-256 checksum
How to use checksums
55c97206ba7a28da38e35ebe32d98e14a966b0827a355530bdfd2358a73166f2
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

0.93.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