Convenient package for implement Kubernetes controllers using Metacontroller.
Project description
python-metacontroller-api
API for implementing Kubernetes controllers via Metacontroller.
Example
from metacontroller_api import DecoratorController, DecoratorSyncRequest, DecoratorSyncResponse
from metacontroller_api.contrib.flask import serve
from metacontroller_api.types import CustomizeRequest, CustomizeResponse, FinalizeRequest, FinalizeResponse
class MyController(DecoratorController):
def customize(self, request: CustomizeRequest) -> CustomizeResponse:
# ...
return {
"relatedResources": [],
}
def sync(self, request: DecoratorSyncRequest) -> DecoratorSyncResponse:
# ...
return {
"labels": {},
"annotations": {},
"status": {},
"attachments": [],
"resyncAfterSeconds": 0,
}
def finalize(self, request: FinalizeRequest) -> FinalizeResponse:
# ...
return {"finalized": True}uvx mksync README.md -i
serve(MyController())
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file metacontroller_api-0.3.0.tar.gz.
File metadata
- Download URL: metacontroller_api-0.3.0.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7fbacff9d61c63418cbc747889fb56cfff40145a55953ac7399f387ab5dc2a74
|
|
| MD5 |
975aff8acd40c4d04e2f691e7e134967
|
|
| BLAKE2b-256 |
85cc18af2d38d0ae7c4cc66a179b7ba7e7ecd734385a1aacad0f817635e03bf3
|
Provenance
The following attestation bundles were made for metacontroller_api-0.3.0.tar.gz:
Publisher:
python.yaml on NiklasRosenstein/python-metacontroller-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
metacontroller_api-0.3.0.tar.gz -
Subject digest:
7fbacff9d61c63418cbc747889fb56cfff40145a55953ac7399f387ab5dc2a74 - Sigstore transparency entry: 165065795
- Sigstore integration time:
-
Permalink:
NiklasRosenstein/python-metacontroller-api@4f878be2b2f37894daaaf6344d60c9a16a36ece0 -
Branch / Tag:
refs/tags/0.3.0 - Owner: https://github.com/NiklasRosenstein
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python.yaml@4f878be2b2f37894daaaf6344d60c9a16a36ece0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file metacontroller_api-0.3.0-py3-none-any.whl.
File metadata
- Download URL: metacontroller_api-0.3.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9048dc3a6d61abe2c4e3e747eafd4e9d25a053be7c4477bfcdd626960fcdaaf6
|
|
| MD5 |
a2533cb52a2214cdc070f2144dbeab1c
|
|
| BLAKE2b-256 |
71f2b4dc47ae453c826a482354c19cbd51b21a928780b57574c0632b979a92d0
|
Provenance
The following attestation bundles were made for metacontroller_api-0.3.0-py3-none-any.whl:
Publisher:
python.yaml on NiklasRosenstein/python-metacontroller-api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
metacontroller_api-0.3.0-py3-none-any.whl -
Subject digest:
9048dc3a6d61abe2c4e3e747eafd4e9d25a053be7c4477bfcdd626960fcdaaf6 - Sigstore transparency entry: 165065796
- Sigstore integration time:
-
Permalink:
NiklasRosenstein/python-metacontroller-api@4f878be2b2f37894daaaf6344d60c9a16a36ece0 -
Branch / Tag:
refs/tags/0.3.0 - Owner: https://github.com/NiklasRosenstein
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python.yaml@4f878be2b2f37894daaaf6344d60c9a16a36ece0 -
Trigger Event:
push
-
Statement type: