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.1.tar.gz (12.8 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.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: metacontroller_api-0.1.1.tar.gz
  • Upload date:
  • Size: 12.8 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.1.tar.gz
Algorithm Hash digest
SHA256 69091dbad9da43b3da938b37cc9ce0c55f761008db6bfc867113cba66c7fe0e2
MD5 5cec5477f930102429e086902532a2d7
BLAKE2b-256 6ca2a25679c14e9998aaefc464e05301711815ad00bbb101e93153b2013f6e2c

See more details on using hashes here.

Provenance

The following attestation bundles were made for metacontroller_api-0.1.1.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.1-py3-none-any.whl.

File metadata

File hashes

Hashes for metacontroller_api-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5cd41c5156d397b210273dab82953283785ec35593629afbf6eb3e8e5d88b7fd
MD5 68e5a56acbdab6961ab6b242bde0abb7
BLAKE2b-256 39b15fb1f168bbc61103e9e83313a0b06b64774ac1859914fb4591a07b4edf3b

See more details on using hashes here.

Provenance

The following attestation bundles were made for metacontroller_api-0.1.1-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