# nolar/kopf

A Python framework to write Kubernetes operators in just a few lines of code

Repository: https://github.com/nolar/kopf
Canonical: https://ross.abutalabs.com/products/kopf
Homepage: https://docs.kopf.dev/
Language: Python
License: MIT
License Family: permissive
Topics: kubernetes, kubernetes-operator, kubernetes-operators, python, python3, framework, asyncio, operator, operators, python-framework, kopf, admission-webhook, admission-controller, admission-controllers, operator-framework, kubernetes-concepts
Last push: 2026-06-03T12:59:47+00:00

## Health v2 (maintenance only)
Score: 89/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 85, release rhythm 87, longevity 100
- inputs: {"age_days": 2207, "days_push": 91, "days_rel": 91, "gap_med": 4, "n_releases_24m": 24}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2632, forks 198 (observed 2026-08-28T04:07:06.124352+00:00)

## What it is
Kopf is a Python framework and library for building Kubernetes operators with minimal boilerplate, using decorator-based handlers for custom and built-in resources. It maps Kubernetes concepts to Pythonic constructs, handling API communication, status updates, and event logging automatically.

## Use cases
- write a kubernetes operator in python
- automate management of custom kubernetes resources
- react to pod or namespace events with custom logic
- build a kubernetes admission webhook
- sync external systems with kubernetes resource state
- implement domain logic on top of k8s custom resources

## When to choose
- you want to build Kubernetes operators quickly in Python with minimal boilerplate
- you need both sync and async handlers for resource events
- you want a stable, production-ready operator framework with semantic v1 guarantees

## When to avoid
- you need a framework with active development of major new features
- your team standardizes on Go for Kubernetes controllers
- you require cutting-edge operator capabilities beyond what Kopf expresses

## Facets
- artifact type: framework
- maturity: maintenance
- function: web-framework, middleware, workflow-automation, developer-tools
- domain: cloud-computing, infrastructure-as-code
- platform: python, cloud, self-hosted
- tags: kubernetes-operator, asyncio, custom-resources, admission-webhook, controller, declarative-handlers, devops, containers, automation, kubernetes, docker

## Member repositories
- nolar/kopf (main) score 89

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:06.124352+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:19:36.560440+00:00, confidence not recorded.
  - readme: https://github.com/nolar/kopf (fetched 2026-08-28T04:07:06.124352+00:00, sha 23c68a495242)
  - registry_pypi: https://pypi.org/pypi/kopf/json (fetched 2026-08-29T10:02:57.460908+00:00, sha 75736e534b42)
- Data as of 2026-08-30T08:39:29.467469+00:00.
