aiwaf-rust
Fast WAF heuristics and anomaly scoring implemented in Rust and exposed to Python. Designed for lightweight request validation and isolation-forest style scoring.
Install
pip install aiwaf-rust
Quickstart
from aiwaf_rust import (
validate_headers,
validate_url,
validate_content,
validate_recent,
AiwafIsolationForest,
)
headers = {
"user-agent": "Mozilla/5.0",
"accept": "text/html,application/xhtml+xml",
"accept-language": "en-US,en;q=0.9",
"accept-encoding": "gzip, deflate",
"connection": "keep-alive",
}
print(validate_headers(headers))
print(validate_url("https://example.com/login"))
print(validate_content("username=admin&password=..."))
print(validate_recent([{ "path": "/", "status": 200 }]))
model = AiwafIsolationForest(100, 256, 0.5, 42)
model.fit([[0.1, 0.2, 0.3], [0.2, 0.1, 0.4]])
print(model.anomaly_score([0.3, 0.2, 0.1]))
Notes
- Built with PyO3 and
abi3so a single wheel works on Python 3.8+ (including 3.12+). - The WASM package is published as
aiwaf-wasmon npm.
License
MIT
Release files for aiwaf-rust 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| aiwaf_rust-0.2.1.tar.gz | 29.0 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| aiwaf_rust-0.2.1-cp38-abi3-win_amd64.whl | CPython 3.8 | abi3 | Windows x86-64 | Details |
| aiwaf_rust-0.2.1-cp38-abi3-musllinux_1_2_x86_64.whl | CPython 3.8 | abi3 | Linux musl 1.2+ x86-64 | Details |
| aiwaf_rust-0.2.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.8 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| aiwaf_rust-0.2.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.8 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| aiwaf_rust-0.2.1-cp38-abi3-macosx_11_0_arm64.whl | CPython 3.8 | abi3 | macOS 11.0+ ARM64 | Details |
| aiwaf_rust-0.2.1-cp38-abi3-macosx_10_12_x86_64.whl | CPython 3.8 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 6.2 MB
Release files / aiwaf_rust-0.2.1.tar.gz
| Download URL | aiwaf_rust-0.2.1.tar.gz |
|---|---|
| Size | 29.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2024b46888f14ee4aebdf1064b6b25cea45290dbb4f2f85753f8209db83168c0
|
|
BLAKE2b-256 checksum How to use checksums |
79233f9b3049640dc0b9967461c42cf39e3c42cb666a0926355b6a798532c631
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 14, 2026.
Transparency logRelease files / aiwaf_rust-0.2.1-cp38-abi3-win_amd64.whl
| Download URL | aiwaf_rust-0.2.1-cp38-abi3-win_amd64.whl |
|---|---|
| Size | 840.9 kB |
| Tags | CPython 3.8 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
a3e15ba638a5c118909e78bcdec3217898ead5a828d4bfd8f2c64850d9ed5d85
|
|
BLAKE2b-256 checksum How to use checksums |
5ab8f9f49aacd4b0988f6578890b039ea1de6021d16d78e8cb7d36b3a68a442f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 14, 2026.
Transparency logRelease files / aiwaf_rust-0.2.1-cp38-abi3-musllinux_1_2_x86_64.whl
| Download URL | aiwaf_rust-0.2.1-cp38-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.8 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
0898531136705aa6ec280104bd0632302ff31d8d80cf5c3a55591899bbff0f57
|
|
BLAKE2b-256 checksum How to use checksums |
3d0d6909d66b680cb8c9445b19707594b6eb7d738e1ee23a552e112937b5c48c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 14, 2026.
Transparency logRelease files / aiwaf_rust-0.2.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | aiwaf_rust-0.2.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
b2124a3209e07edbac54ee1f20113a7a121ef838afe0b7c96f7e35783225ac8c
|
|
BLAKE2b-256 checksum How to use checksums |
f989fe99b94bb3d83ef2a38a38958680f527849522824689a48afc22038a6b7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 14, 2026.
Transparency logRelease files / aiwaf_rust-0.2.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | aiwaf_rust-0.2.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
ec15c3f03a6d984b2be3038cc62ab2382c7af5e473c1fa0b7ea19afc58b5b25c
|
|
BLAKE2b-256 checksum How to use checksums |
0d844e3b1c2f6346acb3a6b71bac0fe5ef2dab3f5cb5faa87954fe6078be6d48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 14, 2026.
Transparency logRelease files / aiwaf_rust-0.2.1-cp38-abi3-macosx_11_0_arm64.whl
| Download URL | aiwaf_rust-0.2.1-cp38-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 925.0 kB |
| Tags | CPython 3.8 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
9b8b5e4d5731cd6cb92695cd58e514017a4a6462ef8381501078875464540697
|
|
BLAKE2b-256 checksum How to use checksums |
294295c405acd00905fb5a905f2dbd205f2bda180ceeaa157a194cd049f81b4c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 14, 2026.
Transparency logRelease files / aiwaf_rust-0.2.1-cp38-abi3-macosx_10_12_x86_64.whl
| Download URL | aiwaf_rust-0.2.1-cp38-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 962.5 kB |
| Tags | CPython 3.8 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
6943fd8e2bc7912ff52366d002b9bc9f6ea0528ae3a1cf9ecb3dd740b6046f4c
|
|
BLAKE2b-256 checksum How to use checksums |
348cd71496324d82d3059fa05f101766a7bd89520c2b2d6e96482eaf540f2fb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 14, 2026.
Transparency log