Skip to main content

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 abi3 so a single wheel works on Python 3.8+ (including 3.12+).
  • The WASM package is published as aiwaf-wasm on npm.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aiwaf_rust-0.2.1.tar.gz (29.0 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

aiwaf_rust-0.2.1-cp38-abi3-win_amd64.whl (840.9 kB view details)

Uploaded CPython 3.8+Windows x86-64

aiwaf_rust-0.2.1-cp38-abi3-musllinux_1_2_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.8+musllinux: musl 1.2+ x86-64

aiwaf_rust-0.2.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

aiwaf_rust-0.2.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

aiwaf_rust-0.2.1-cp38-abi3-macosx_11_0_arm64.whl (925.0 kB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

aiwaf_rust-0.2.1-cp38-abi3-macosx_10_12_x86_64.whl (962.5 kB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

Details for the file aiwaf_rust-0.2.1.tar.gz.

File metadata

  • Download URL: aiwaf_rust-0.2.1.tar.gz
  • Upload date:
  • Size: 29.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for aiwaf_rust-0.2.1.tar.gz
Algorithm Hash digest
SHA256 2024b46888f14ee4aebdf1064b6b25cea45290dbb4f2f85753f8209db83168c0
MD5 1d0f7b722c5728a020e894a57cf60cdb
BLAKE2b-256 79233f9b3049640dc0b9967461c42cf39e3c42cb666a0926355b6a798532c631

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiwaf_rust-0.2.1.tar.gz:

Publisher: rust-publish.yml on aiwaf-project/aiwaf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aiwaf_rust-0.2.1-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: aiwaf_rust-0.2.1-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 840.9 kB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for aiwaf_rust-0.2.1-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 a3e15ba638a5c118909e78bcdec3217898ead5a828d4bfd8f2c64850d9ed5d85
MD5 a899ee55cb8136597f87a980b471f659
BLAKE2b-256 5ab8f9f49aacd4b0988f6578890b039ea1de6021d16d78e8cb7d36b3a68a442f

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiwaf_rust-0.2.1-cp38-abi3-win_amd64.whl:

Publisher: rust-publish.yml on aiwaf-project/aiwaf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aiwaf_rust-0.2.1-cp38-abi3-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for aiwaf_rust-0.2.1-cp38-abi3-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 0898531136705aa6ec280104bd0632302ff31d8d80cf5c3a55591899bbff0f57
MD5 6bd7b172d97b6225fc01ff1990412cb1
BLAKE2b-256 3d0d6909d66b680cb8c9445b19707594b6eb7d738e1ee23a552e112937b5c48c

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiwaf_rust-0.2.1-cp38-abi3-musllinux_1_2_x86_64.whl:

Publisher: rust-publish.yml on aiwaf-project/aiwaf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aiwaf_rust-0.2.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for aiwaf_rust-0.2.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b2124a3209e07edbac54ee1f20113a7a121ef838afe0b7c96f7e35783225ac8c
MD5 832b06435e39bbe080a917cac27ad7b8
BLAKE2b-256 f989fe99b94bb3d83ef2a38a38958680f527849522824689a48afc22038a6b7e

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiwaf_rust-0.2.1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: rust-publish.yml on aiwaf-project/aiwaf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aiwaf_rust-0.2.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for aiwaf_rust-0.2.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 ec15c3f03a6d984b2be3038cc62ab2382c7af5e473c1fa0b7ea19afc58b5b25c
MD5 c8f2896158b31193fc0d35a611f401f8
BLAKE2b-256 0d844e3b1c2f6346acb3a6b71bac0fe5ef2dab3f5cb5faa87954fe6078be6d48

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiwaf_rust-0.2.1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: rust-publish.yml on aiwaf-project/aiwaf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aiwaf_rust-0.2.1-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for aiwaf_rust-0.2.1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9b8b5e4d5731cd6cb92695cd58e514017a4a6462ef8381501078875464540697
MD5 f05726c7a334cc2359d452f54061be6c
BLAKE2b-256 294295c405acd00905fb5a905f2dbd205f2bda180ceeaa157a194cd049f81b4c

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiwaf_rust-0.2.1-cp38-abi3-macosx_11_0_arm64.whl:

Publisher: rust-publish.yml on aiwaf-project/aiwaf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aiwaf_rust-0.2.1-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for aiwaf_rust-0.2.1-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 6943fd8e2bc7912ff52366d002b9bc9f6ea0528ae3a1cf9ecb3dd740b6046f4c
MD5 bc685e9704b13e5698af9bf833448bfe
BLAKE2b-256 348cd71496324d82d3059fa05f101766a7bd89520c2b2d6e96482eaf540f2fb4

See more details on using hashes here.

Provenance

The following attestation bundles were made for aiwaf_rust-0.2.1-cp38-abi3-macosx_10_12_x86_64.whl:

Publisher: rust-publish.yml on aiwaf-project/aiwaf

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.1 This release

7 files

0.2.0

7 files

0.1.9

6 files

0.1.8

3 files

0.1.6

3 files

0.1.5

3 files

0.1.4

3 files

0.1.3

4 files

0.1.2

4 files

0.1.1

16 files

0.1.0

16 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page