Installation¶
PyWebGuard is designed to be modular, allowing you to install only the components you need. The core package provides basic functionality, while additional features can be installed using extras.
Basic Installation¶
To install the core package:
pip install pywebguard
This installs the basic functionality, including the core Guard classes and in-memory storage.
Framework-Specific Installation¶
FastAPI¶
To install PyWebGuard with FastAPI support:
pip install pywebguard[fastapi]
This installs the FastAPI middleware and dependencies.
Flask¶
To install PyWebGuard with Flask support:
pip install pywebguard[flask]
This installs the Flask extension and dependencies.
Storage Backend Installation¶
Redis¶
To install PyWebGuard with Redis storage support:
pip install pywebguard[redis]
SQLite¶
To install PyWebGuard with SQLite storage support:
pip install pywebguard[sqlite]
TinyDB¶
To install PyWebGuard with TinyDB storage support:
pip install pywebguard[tinydb]
MongoDB¶
To install PyWebGuard with MongoDB storage support:
pip install pywebguard[mongodb]
PostgreSQL¶
To install PyWebGuard with PostgreSQL storage support:
pip install pywebguard[postgresql]
Logging Backend Installation¶
Elasticsearch¶
To install PyWebGuard with Elasticsearch logging support:
pip install pywebguard[elasticsearch]
Combined Installation¶
All Storage Backends¶
To install PyWebGuard with all storage backends:
pip install pywebguard[all-storage]
All Frameworks¶
To install PyWebGuard with all framework integrations:
pip install pywebguard[all-frameworks]
Complete Installation¶
To install PyWebGuard with all components:
pip install pywebguard[all]
Development Installation¶
For development purposes, including testing and code quality tools:
pip install pywebguard[dev]
From Source¶
To install from source:
git clone https://github.com/py-daily/pywebguard.git
cd pywebguard
pip install -e .
For development:
pip install -e ".[dev]"