Zen, in-app firewall for Python 3 | by Aikido
Zen, your in-app firewall for peace of mind– at runtime.
Zen is an embedded Web Application Firewall that autonomously protects your Python apps against common and critical attacks.
Zen protects your Python apps by preventing user input containing dangerous strings, which allow SQL injections. It runs on the same server as your Python app for simple installation and zero maintenance.
Features
Zen will autonomously protect your Python applications from the inside against:
- 🛡️ NoSQL injection attacks
- 🛡️ SQL injection attacks
- 🛡️ Command injection attacks
- 🛡️ Path traversal attacks
- 🛡️ Server-side request forgery (SSRF)
- 🛡️ Attack wave detection
Zen operates autonomously on the same server as your Python app to:
- ✅ Secure your app like a classic web application firewall (WAF), but with none of the infrastructure or cost.
Supported libraries and frameworks
Zen for Python 3 is compatible with:
WSGI
WSGI Servers
ASGI
Database drivers
- ✅
mysqlclient^1.5 - ✅
PyMySQL^0.9 - ✅
pymongo^3.10 - ✅
psycopg2^2.9.2 - ✅
psycopg^3.1 - ✅
asyncpg^0.27 - ✅
motor(Seepymongoversion) - ✅
clickhouse-driver - ✅
sqlite3
AI SDKs
Zen instruments the following AI SDKs to track which models are used and how many tokens are consumed, allowing you to monitor your AI usage and costs:
Zen is compatible with Python 3.8-3.14 and can run on Windows, Linux, and Mac OS X.
Reporting to your Aikido Security dashboard
Aikido is your no nonsense application security platform. One central system that scans your source code & cloud, shows you what vulnerabilities matter, and how to fix them - fast. So you can get back to building.
Zen is a new product by Aikido. Built for developers to level up their security. While Aikido scans, get Zen for always-on protection.
You can use some of Zen’s features without Aikido, of course. Peace of mind is just a few lines of code away.
But you will get the most value by reporting your data to Aikido.
You will need an Aikido account and a token to report events to Aikido. If you don't have an account, you can sign up for free.
Here's how:
- Log in to your Aikido account.
- Go to Zen.
- Go to apps.
- Click on Add app.
- Choose a name for your app.
- Click Generate token.
- Copy the token.
- Set the token as an environment variable,
AIKIDO_TOKEN
Running in production (blocking) mode
By default, Zen will only detect and report attacks to Aikido.
To block requests, set the AIKIDO_BLOCK environment variable to true.
See Reporting to Aikido to learn how to send events to Aikido.
Additional configuration
Configure Zen using environment variables for authentication, mode settings, debugging, and more.
Benchmarks
The following table summarizes the performance of both a typical SQL Query and a typical NoSQL Query with and without the Zen, measured in milliseconds :
| Operation | Avg. time w/o Zen | Avg. time w/ Zen | Delta | Delta in % |
|---|---|---|---|---|
| SQL Query | 1.222 ms | 1.257 ms | +0.035 ms | +3% |
| NoSQL Query | 1.090 ms | 1.110 ms | +0.020 ms | +2% |
See benchmarks folder for more.
Bug bounty program
Our bug bounty program is public and can be found by all registered Intigriti users here
Contributing
See CONTRIBUTING.md for more information.
Code of Conduct
See CODE_OF_CONDUCT.md for more information.
Security
See SECURITY.md for more information.
Metadata
Release files for aikido-zen 1.2.36
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aikido_zen-1.2.36.tar.gz | 7.1 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| aikido_zen-1.2.36-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.3 MB
Release files / aikido_zen-1.2.36.tar.gz
| Download URL | aikido_zen-1.2.36.tar.gz |
|---|---|
| Size | 7.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4ca780841be6a348eb38d89b564e31d3257be9f0605868d31ae2415803532e60
|
|
BLAKE2b-256 checksum How to use checksums |
5608155d817d7c3261444b4133736c85677dea33ba1df6df5fc3d646d5a2ba0f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.
Transparency logRelease files / aikido_zen-1.2.36-py3-none-any.whl
| Download URL | aikido_zen-1.2.36-py3-none-any.whl |
|---|---|
| Size | 7.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
51655ad3bb9c3297e9e2c05eda5e92fd566985ca0209af21565c5fc39b4035e0
|
|
BLAKE2b-256 checksum How to use checksums |
87457ee2e581a8679df63ed17521f1e794dc4aba47a6a41d4e19f673abd4bdd2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.
Transparency log