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

Uploaded Python 3

File details

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

File metadata

  • Download URL: metacontroller_api-0.1.2.tar.gz
  • Upload date:
  • Size: 12.9 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.2.tar.gz
Algorithm Hash digest
SHA256 abe9bb2e5069c5b55415f22a4b7e74b0f0ac7c7abd50045d5ff2f7bb76b95bd9
MD5 976db480118e635c5feb1fffe0359bb2
BLAKE2b-256 1ae843a9ef45862e2a69e711ed6a862d725bf1624f649b298a67043f9c8ccef1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for metacontroller_api-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 343d5b180bb5d5de4f539168c73a5dff9867ee7c5929b957c52defd632ac30dc
MD5 f434abf7073c2de85fe943027177f77e
BLAKE2b-256 f11bbfd86223b9007d48a02fa600f5ac7243a40b50526e6bda1f233cccc63f12

See more details on using hashes here.

Provenance

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