Ulinzilogs ๐ก๏ธ
Lightweight, nonโblocking security logging middleware for Python web apps Built for developers who want visibility without performance pain.
๐ What is Ulinzilogs?
Ulinzilogs is a securityโfocused middleware that silently watches incoming HTTP requests in your Python web application, redacts sensitive data, and ships sanitized logs to the Ulinzi Security API for AIโpowered threat analysis.
Think of it as:
๐ A security camera for your API โ always on, never in the way.
โจ Key Features
- ๐ NonโBlocking by Design โ Uses background threads so your request/response cycle stays fast.
- ๐ Automatic Data Redaction โ Sensitive fields are replaced with
[REDACTED]before leaving your server. - ๐ MultiโFramework Support โ Works out of the box with FastAPI, Flask, and Django.
- ๐งน Clean & Safe Headers โ Excludes
AuthorizationandCookieheaders automatically.
๐ฆ Installation
Install only what your stack needs:
# FastAPI / Starlette
pip install ulinzilogs[fastapi]
# Flask
pip install ulinzilogs[flask]
# Django
pip install ulinzilogs[django]
# All frameworks
pip install ulinzilogs[all]
๐ Getting Your Project Key
After installing, run:
ulinzi-init
This generates a unique Project Key for your app and prints setup instructions.
โ ๏ธ Important: This key is generated locally on your machine. To activate it, copy the key and register it at ulinzilogs.com. Once registered, your dashboard will start receiving logs from your app.
โ๏ธ Setup & Usage
๐ข FastAPI
from fastapi import FastAPI
from ulinzilogs import UlinziFastAPIMiddleware
app = FastAPI()
app.add_middleware(
UlinziFastAPIMiddleware,
api_key="YOUR_ULINZI_KEY"
)
@app.get("/")
async def root():
return {"message": "Protected by Ulinzi"}
๐ต Flask
from flask import Flask
from ulinzilogs import UlinziFlaskMiddleware
app = Flask(__name__)
UlinziFlaskMiddleware(app, api_key="YOUR_ULINZI_KEY")
@app.route("/")
def hello():
return "Protected by Ulinzi"
๐ฃ Django
In settings.py:
MIDDLEWARE = [
# ... other middleware
'ulinzilogs.UlinziDjangoMiddleware',
]
ULINZI_API_KEY = "YOUR_ULINZI_KEY"
ULINZI_APP_NAME = "MyDjangoApp" # optional label shown in dashboard
๐ง How Ulinzilogs Works
Client Request โ โผ โโโโโโโโโโโโโโโโโ โ Middleware โ โโโโโโโโฌโโโโโโโโโ โ โผ โโโโโโโโโโโโโโโโโโโโโโ โ Redact Sensitive โ โ Fields & Headers โ โโโโโโโโฌโโโโโโโโโโโโโโ โ โผ (Background Thread) โโโโโโโโโโโโโโโโโโโโโโ โ Send to Ulinzi โ โ Security API โ โโโโโโโโฌโโโโโโโโโโโโโโ โ โผ โโโโโโโโโโโโโโโโโโโโโโ โ AI Threat Analysis โ โ (SQLi, XSS, etc.) โ โโโโโโโโโโโโโโโโโโโโโโ
- Intercept โ Captures request metadata (IP, URL, method, body).
- Redact โ Removes secrets before transmission.
- Dispatch โ Sends logs asynchronously in a background thread.
- Analyze โ Central AI scans for malicious patterns.
๐ Sensitive Data Protection
The following keys are automatically redacted:
| Field | Redacted? |
|---|---|
password |
โ Yes |
secret |
โ Yes |
token |
โ Yes |
key |
โ Yes |
cvv |
โ Yes |
api_key |
โ Yes |
Example:
{
"email": "user@mail.com",
"password": "[REDACTED]"
}
Your users' secrets never leave your server in plaintext.
โก Performance Philosophy
- No request blocking
- No database writes on your server
- No logging delays
Ulinzilogs runs beside your app โ not inside its critical path.
๐งฉ Package Structure
ulinzilogs/ โโโ init.py โโโ middleware.py โโโ utils.py โโโ cli.py โโโ pyproject.toml โโโ README.md
๐ License
Copyright (c) 2026 PashyGeek. Licensed under the MIT License โ see the LICENSE file for details.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ulinzilogs-0.1.2.tar.gz.
File metadata
- Download URL: ulinzilogs-0.1.2.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58094a381ebee0b7c0e1da8e829631ac07cfd6290295acbd7c8bb13bfcb46e95
|
|
| MD5 |
a848f87497bf5a397359dd1b6ba2a1fa
|
|
| BLAKE2b-256 |
1f1d4fb4ba9d80eb24ef9553acd1ea2a16e2e6dd5aec8af75a4900733bba4e50
|
File details
Details for the file ulinzilogs-0.1.2-py3-none-any.whl.
File metadata
- Download URL: ulinzilogs-0.1.2-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1cae0b969222752644b821ca80d4d859721a30b8dbc0d362dc31e9ca5d6fc6a
|
|
| MD5 |
f8676c4b2a760035969f905df4b078f3
|
|
| BLAKE2b-256 |
6ca9505a8a7cbe7f94cb5b38886f3dbfc5f5ac4ac9ca45bce5644cfcb785c2bb
|