Skip to content

2.0.0

Choose a tag to compare

@rennf93 rennf93 released this 26 Mar 02:08
· 76 commits to master since this release
799cf4c

Django API Guard 2.0.0 — guard-core Migration

Django API Guard is now a thin adapter over guard-core, the framework-agnostic security engine that also powers fastapi-guard and flaskapi-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-core 1.0.0). This package provides only the Django integration layer via standard Django middleware (__init__/__call__).
  • Dependencies trimmed — core dependencies like cachetools, maxminddb, pydantic, redis, and requests are no longer direct dependencies (they come transitively through guard-core).
  • Synchronous API — uses guard_core.sync.* modules for Django's synchronous request model.

Zero breaking changes to the public API

All existing imports continue to work exactly as before:

from djangoapi_guard.middleware import SecurityMiddleware
from djangoapi_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 (djangoapi_guard.core., djangoapi_guard.handlers., djangoapi_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: 1.0.1...2.0.0