Flint v0.2.1
Flint v0.2.1 hardens the embedded persistent rate limiter with performance mode, async Python wrappers, shared-mode improvements, formal docs, and updated full Criterion benchmark numbers.
Highlights
- Persistent embedded rate limiting without Redis, broker, or daemon.
sync="always"for safest persistence andsync="batch"for higher throughput.- Explicit
flush()support in embedded and shared mode. - Async Python wrapper methods:
acheck,aallow,astatus,alist,aflush, and more. - FastAPI middleware offloads limiter checks away from the event loop.
- Shared HTTP server exposes
/v1/log/flush. - Formal docs added for Python usage, CLI, security, storage format, FastAPI, shared mode, and release flow.
Full Criterion Benchmarks
Latest local full Criterion run:
| Benchmark | Result |
|---|---|
| token bucket persistent check | ~569 us |
| sliding window persistent check | ~581 us |
| fixed window persistent check | ~580 us |
| cost-based token bucket check | ~570 us |
check_all() over 3 limits |
~654 us |
| configure 1,000 keys | ~581 ms |
| configure 10,000 keys | ~5.71 s |
| reopen from 1,000 AOF events | ~5.53 ms |
| reopen from 10,000 AOF events | ~50.8 ms |
| compact 1,000 AOF events | ~33.5 ms |
| compact 10,000 AOF events | ~354 ms |
Install
pip install -U flint-limiterOr pin the release:
pip install flint-limiter==0.2.1PyPI
Published package: https://pypi.org/project/flint-limiter/0.2.1/