28 Commits

Author SHA1 Message Date
4f19c0b19e ci: remove PyPI publish job 2026-02-04 01:50:11 +00:00
fe07912040 docs: update install instructions and bump version to 0.2.0 2026-02-04 01:49:53 +00:00
6bdeab2b4e docs: update repo URL in development guide 2026-02-04 01:39:17 +00:00
bb07ac816f fix: resolve flaky test and JSON config validation 2026-02-04 01:33:44 +00:00
34e07f6b7e style: apply ruff formatting 2026-02-04 01:28:45 +00:00
2900fca30a fix: add ruff per-file-ignores for tests and re-exports 2026-02-04 01:26:06 +00:00
a8b3319d14 fix: disable pyright false positives for FastAPI route handlers 2026-02-04 01:23:02 +00:00
3e431927b9 fix: install libatomic1 for pyright Node.js dependency 2026-02-04 01:19:33 +00:00
5298df5e72 fix: use uv sync --extra dev to install pyright and other dev tools 2026-02-04 01:17:35 +00:00
c966fdfe21 fix: exclude .venv and .cache from source distribution 2026-02-04 01:13:34 +00:00
3e026866cb ci: add GitLab CI/CD pipeline for linting, testing, and publishing 2026-02-04 01:09:47 +00:00
a46e216902 chore: update lockfile 2026-02-04 01:09:08 +00:00
64c368907f release: bump version to 0.2.0 2026-02-04 01:08:54 +00:00
ddd51aab39 docs: fix markdown formatting in development guide 2026-02-04 01:08:42 +00:00
fc88f84f4a style: apply ruff formatting and move TYPE_CHECKING imports in tests 2026-02-04 01:08:32 +00:00
d7966f7e96 style: clean up unused parameters and imports in examples 2026-02-04 01:08:16 +00:00
6bc108078f style: minor code style improvements in core modules 2026-02-04 01:07:53 +00:00
064af30d0f refactor: replace algorithm dict lookup with match/case pattern 2026-02-04 01:07:43 +00:00
3510ea564a refactor: use contextlib.suppress and sort __slots__ in backends 2026-02-04 01:07:32 +00:00
ac90ac4141 chore: update project URLs to GitLab and add black to dev deps 2026-02-04 01:07:14 +00:00
997eda7a36 chore: update gitignore with editor and cache directories 2026-02-04 01:07:01 +00:00
fb23e3c7cf feat: add configuration loader for .env and JSON files
- Add ConfigLoader class for loading RateLimitConfig and GlobalConfig
- Support .env files with FASTAPI_TRAFFIC_* prefixed variables
- Support JSON configuration files with type validation
- Add convenience functions: load_rate_limit_config, load_global_config
- Add load_rate_limit_config_from_env, load_global_config_from_env
- Support custom environment variable prefixes
- Add comprehensive error handling with ConfigurationError
- Add 47 tests for configuration loading
- Add example 11_config_loader.py with 9 usage patterns
- Update examples/README.md with config loader documentation
- Update CHANGELOG.md with new feature
- Fix typo in limiter.py (errant 'fi' on line 4)
2026-02-01 13:59:32 +00:00
6c5584c6b4 Switch from MIT to Apache 2.0 license 2026-01-09 01:11:07 +00:00
ca03f5d579 Minor fixes 2026-01-09 00:58:53 +00:00
e658aa92a2 Update docs to be more readable and add uv instructions
Rewrote README and DEVELOPMENT.md to sound less robotic. Added changelog
documenting the new test suite and other recent changes.
2026-01-09 00:50:57 +00:00
9fe700296d Add get_stats to MemoryBackend and update pytest config
Added get_stats() method for consistency with RedisBackend. Also added
httpx and pytest-asyncio as dev dependencies.
2026-01-09 00:50:43 +00:00
dfaa0aaec4 Add comprehensive test suite with 134 tests
Covers all algorithms, backends, decorators, middleware, and integration
scenarios. Added conftest.py with shared fixtures and pytest-asyncio
configuration.
2026-01-09 00:50:25 +00:00
da496746bb Initial commit: fastapi-traffic rate limiting library
- Core rate limiting with multiple algorithms (sliding window, token bucket, etc.)
- SQLite and memory backends
- Decorator and dependency injection patterns
- Middleware support
- Example usage files
2026-01-09 00:26:19 +00:00