Repository navigation
2.0.0
Flask API Guard 2.0.0 — guard-core Migration
Flask API Guard is now a thin adapter over guard-core, the framework-agnostic security engine that also powers fastapi-guard and djapi-guard.
What changed
- All security logic moved to guard-core — 17 security checks, 8 handlers, the detection engine, and suspicious pattern analysis now live in a shared engine (
guard-core1.0.0). This package provides only the Flask integration layer viabefore_request/after_requesthooks. - Dependencies trimmed — core dependencies like
cachetools,maxminddb,pydantic,redis, andrequestsare no longer direct dependencies (they come transitively throughguard-core). - Synchronous API — uses
guard_core.sync.*modules for Flask's synchronous request model.
Zero breaking changes to the public API
All existing imports continue to work exactly as before:
from flaskapi_guard.middleware import SecurityMiddleware
from flaskapi_guard import SecurityConfig, SecurityDecorator, IPBanManager, RateLimitManager
**Why v2.0.0**
The major version bump reflects the architectural shift — guard-core is now a required dependency, and internal modules (flaskapi_guard.core.*, flaskapi_guard.handlers.*, flaskapi_guard.detection_engine.*) no longer exist. If you only used the public API, no migration is needed.
**One engine, three frameworks**
┌─────────────────────┬────────────────────────────────────────────┬─────────┐
│ Framework │ Package │ Version │
├─────────────────────┼────────────────────────────────────────────┼─────────┤
│ FastAPI / Starlette │ https://github.com/rennf93/fastapi-guard │ 5.0.0 │
├─────────────────────┼────────────────────────────────────────────┼─────────┤
│ Flask │ https://github.com/rennf93/flaskapi-guard │ 2.0.0 │
├─────────────────────┼────────────────────────────────────────────┼─────────┤
│ Django │ https://github.com/rennf93/djapi-guard │ 2.0.0 │
└─────────────────────┴────────────────────────────────────────────┴─────────┘
All three share the same security engine, ensuring consistent behavior across frameworks.
**Full Changelog**: https://github.com/rennf93/flaskapi-guard/compare/1.1.1...2.0.0