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.3.tar.gz (13.0 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.3-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: metacontroller_api-0.1.3.tar.gz
  • Upload date:
  • Size: 13.0 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.3.tar.gz
Algorithm Hash digest
SHA256 a3515451939157c898eb8e0a13f806b12a44a192f338500c2134a67035a00024
MD5 a42a8b935399a588a5fe2f6578954b32
BLAKE2b-256 207b63257a7eb667d7d584349eb9b4531bf569ca5720179c6f117e4f302d9863

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for metacontroller_api-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6db053365b50b92ee9e1135999d11ec854f685a0fbbb56a57fb3e589de5af8d9
MD5 6de829618f073dc5237155228ffeac86
BLAKE2b-256 23a56b52e90d8870e62ec346d78e40a373a4fa46229b6b1af7e1674473f833ed

See more details on using hashes here.

Provenance

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