# yizhang7210/liang

Liang - Non functional requirements should be part of function interfaces

Repository: https://github.com/yizhang7210/liang
Canonical: https://ross.abutalabs.com/products/liang
Language: Python
License: MIT
License Family: permissive
Topics: performance, python3
Last push: 2021-11-08T04:57:32+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 1801, "days_push": 1759, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1010, forks 89 (observed 2026-08-28T04:03:13.020855+00:00)

## What it is
Liang is a Python library for specifying non-functional requirements like latency thresholds directly in function interfaces via decorators. It enforces or monitors latency budgets, raising timeouts or logging warnings through configurable handlers and measurers.

## Use cases
- enforce a function completes within a time threshold
- log warnings when a function exceeds its latency budget
- track percentile latency across repeated function runs
- attach custom failure handlers to performance violations
- make performance requirements part of the code interface

## When to choose
- you want latency SLAs enforced or monitored at the function level in Python
- you need timeout guarantees for potentially slow functions
- you want percentile-based latency tracking with custom handlers

## When to avoid
- you need full application performance monitoring or distributed tracing
- your project is not in Python
- you need actively maintained tooling - the last release was 2021

## Facets
- artifact type: library
- maturity: maintenance
- function: monitoring, logging, testing, benchmarking
- domain: developer-tools, performance
- platform: python, cross-platform
- tags: non-functional-requirements, decorators, latency-enforcement, sla, python3, python

## Member repositories
- yizhang7210/liang (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:13.020855+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-30T07:11:59.432136+00:00, confidence not recorded.
  - readme: https://github.com/yizhang7210/liang (fetched 2026-08-28T04:03:13.020855+00:00, sha 74a2c6b41d3b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
