Skip to main content

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, Factories
from metacontroller_api.contrib.flask import MetacontrollerBlueprint
from flask import Flask

class MyController(DecoratorController):

    def sync(self, request: DecoratorSyncRequest) -> DecoratorSyncResponse:
        # ...
        return {
            "labels": {},
            "annotations": {},
            "status": {},
            "attachments": [
                # ...
            ],
            "resyncAfterSeconds": 0,
        }

app = Flask(__name__)
app.register_blueprint(MetacontrollerBlueprint(MyController()))
app.run()

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

metacontroller_api-0.1.0.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

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

metacontroller_api-0.1.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file metacontroller_api-0.1.0.tar.gz.

File metadata

  • Download URL: metacontroller_api-0.1.0.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for metacontroller_api-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2994b94777eb617866031fc136dbea67db5727e0d747526b10bd2a843373595e
MD5 f8a8a47be0a116f261e5ee10a050285c
BLAKE2b-256 45f9db328742d350ea826bf3113bb49051c5a2a8c96594b262c83b9893c33f81

See more details on using hashes here.

Provenance

The following attestation bundles were made for metacontroller_api-0.1.0.tar.gz:

Publisher: python.yaml on NiklasRosenstein/python-metacontroller-api

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

File details

Details for the file metacontroller_api-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for metacontroller_api-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1ab30393f9c84c685c3955a291ef2979aab791e3ca2adcf0986cf0c89b4f2ab8
MD5 892c77aae42ded16975e554ed44de81a
BLAKE2b-256 ad1067ec11802cdb027399246171df368bf86f9e9c8b2576538bfa9c60de06c6

See more details on using hashes here.

Provenance

The following attestation bundles were made for metacontroller_api-0.1.0-py3-none-any.whl:

Publisher: python.yaml on NiklasRosenstein/python-metacontroller-api

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