cloudcoil-models-istio
Versioned istio 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 Istio support
uv add cloudcoil.models.istio
Using pip:
pip install cloudcoil.models.istio
💡 Examples
Using Istio Models
from cloudcoil import apimachinery
from cloudcoil.models.istio import networking
# Create a Gateway
gateway = networking.v1.Gateway(
metadata=apimachinery.ObjectMeta(name="main-gateway"),
spec=networking.v1.GatewaySpec(
selector={"istio": "ingressgateway"},
servers=[networking.v1.GatewaySpecServersItem(
port=networking.v1.GatewaySpecServersItemPort(
number=80,
name="http",
protocol="HTTP"
),
hosts=["*.example.com"]
)]
)
).create()
# Create a VirtualService
virtual_service = networking.v1.VirtualService(
metadata=apimachinery.ObjectMeta(name="website"),
spec=networking.v1.VirtualServiceSpec(
hosts=["website.example.com"],
gateways=["main-gateway"],
http=[networking.v1.VirtualServiceSpecHttpItem(
route=[networking.v1.VirtualServiceSpecHttpItemRouteItem(
destination=networking.v1.VirtualServiceSpecHttpItemRouteItemDestination(
host="website-svc",
port=networking.v1.VirtualServiceSpecHttpItemRouteItemDestinationPort(number=8080)
)
)]
)]
)
).create()
# List Virtual Services
for vs in networking.v1.VirtualService.list():
print(f"Found VirtualService: {vs.metadata.name}")
Using the Fluent Builder API
from cloudcoil.models.istio import networking
# Create a Gateway using the fluent builder
gateway = (
networking.v1.Gateway.builder()
.metadata(lambda metadata: metadata
.name("main-gateway")
.namespace("default")
)
.spec(lambda gateway_spec: gateway_spec
.selector({"istio": "ingressgateway"})
.servers(lambda servers: servers.add(
lambda server: server
.port(lambda port: port
.number(80)
.name("http")
.protocol("HTTP")
)
.hosts(["*.example.com"])
))
)
.build()
)
Using the Context Manager Builder API
from cloudcoil.models.istio import networking
# Create a Gateway using context managers
with networking.v1.Gateway.new() as gateway:
with gateway.metadata() as metadata:
metadata.name("main-gateway")
metadata.namespace("default")
with gateway.spec() as spec:
spec.selector({"istio": "ingressgateway"})
with spec.servers() as server_list:
with server_list.add() as server:
with server.port() as port:
port.number(80)
port.name("http")
port.protocol("HTTP")
server.hosts(["*.example.com"])
# Create a VirtualService using context managers
with networking.v1.VirtualService.new() as vs:
with vs.metadata() as metadata:
metadata.name("website")
metadata.namespace("default")
with vs.spec() as vs_spec:
vs_spec.hosts(["website.example.com"])
vs_spec.gateways(["main-gateway"])
with vs_spec.http() as http_list:
with http_list.add() as route:
with route.route() as route_list:
with route_list.add() as weight:
with weight.destination() as dest:
dest.host("website-svc")
with dest.port() as dest_port:
dest_port.number(8080)
final_vs = vs.build()
Mixing Builder Styles
from cloudcoil.models.istio import networking
from cloudcoil import apimachinery
# Create a Gateway mixing different builder styles
with networking.v1.Gateway.new() as gateway:
# Direct object initialization
gateway.metadata(apimachinery.ObjectMeta(
name="main-gateway",
namespace="default"
))
with gateway.spec() as spec:
# Simple field assignment
spec.selector({"istio": "ingressgateway"})
# Fluent style for complex structures
spec.servers([
networking.v1.GatewaySpecServersItem(
port=networking.v1.GatewaySpecServersItemPort(
number=80,
name="http",
protocol="HTTP"
),
hosts=["*.example.com"]
)
])
final_gateway = gateway.build()
# Create a VirtualService mixing styles
with networking.v1.VirtualService.new() as vs:
vs.metadata(lambda m: m
.name("website")
.namespace("default")
)
with vs.spec() as spec:
# Simple assignments
spec.hosts(["website.example.com"])
spec.gateways(["main-gateway"])
# Context managers for deep nesting
with spec.http() as http_list:
with http_list.add() as route:
# Fluent style for route configuration
route.route(lambda routes: routes
.add(lambda w: w
.destination(lambda d: d
.host("website-svc")
.port(lambda p: p.number(8080))
)
)
)
final_vs = vs.build()
The builder system provides:
- ✨ Full IDE support with detailed type information
- 🔍 Rich autocomplete for all fields and nested objects
- ⚡ Compile-time validation of your configuration
- 🎯 Clear and chainable API that guides you through resource creation
- 🔀 Flexibility to mix different builder styles
📚 Documentation
For complete documentation, visit cloudcoil.github.io/cloudcoil
📜 License
Apache License, Version 2.0 - see LICENSE
Metadata
Release files for cloudcoil.models.istio 1.31.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cloudcoil_models_istio-1.31.0.0.tar.gz | 325.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cloudcoil_models_istio-1.31.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 599.9 kB
Release files / cloudcoil_models_istio-1.31.0.0.tar.gz
| Download URL | cloudcoil_models_istio-1.31.0.0.tar.gz |
|---|---|
| Size | 325.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1e15aa1e62be54cdcce6a5fb792ee0e9802dbde4fad670e67b0ba96ae9aec026
|
|
BLAKE2b-256 checksum How to use checksums |
cd3af6edc59bab1c00ec0db25246b0340275460d1d43d5dffca60bfd010128d3
|
| 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 logRelease files / cloudcoil_models_istio-1.31.0.0-py3-none-any.whl
| Download URL | cloudcoil_models_istio-1.31.0.0-py3-none-any.whl |
|---|---|
| Size | 274.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8dc19194e808c8bd4a699af337af4cf9f3151f76124e71eca5b7f040d3b5569d
|
|
BLAKE2b-256 checksum How to use checksums |
d77ffd20471dd49ef7802d63569bd2413c721a4c4d1cf29b343163d8a7eb5e92
|
| 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