{"id":22940578,"url":"https://github.com/pymodsecurity/pymodsecurity","last_synced_at":"2026-04-01T23:36:51.800Z","repository":{"id":60721422,"uuid":"149035511","full_name":"pymodsecurity/pymodsecurity","owner":"pymodsecurity","description":"Python Bindings for ModSecurity v3","archived":false,"fork":false,"pushed_at":"2023-11-11T13:36:55.000Z","size":90,"stargazers_count":84,"open_issues_count":5,"forks_count":18,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-12-13T22:28:40.879Z","etag":null,"topics":["bindings","modsecurity","python","python3","security"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pymodsecurity.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-16T20:59:41.000Z","updated_at":"2024-11-18T19:30:23.000Z","dependencies_parsed_at":"2022-10-03T20:03:29.007Z","dependency_job_id":null,"html_url":"https://github.com/pymodsecurity/pymodsecurity","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pymodsecurity%2Fpymodsecurity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pymodsecurity%2Fpymodsecurity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pymodsecurity%2Fpymodsecurity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pymodsecurity%2Fpymodsecurity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pymodsecurity","download_url":"https://codeload.github.com/pymodsecurity/pymodsecurity/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230852607,"owners_count":18290081,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bindings","modsecurity","python","python3","security"],"created_at":"2024-12-14T13:23:48.052Z","updated_at":"2025-12-12T00:46:40.015Z","avatar_url":"https://github.com/pymodsecurity.png","language":"C++","readme":"[![Build Status](https://travis-ci.com/pymodsecurity/pymodsecurity.svg?branch=master)](https://travis-ci.com/pymodsecurity/pymodsecurity)\n[![PyPI version](https://img.shields.io/pypi/v/pymodsecurity.svg)](https://pypi.org/project/pymodsecurity)\n[![conda-forge version](https://img.shields.io/conda/vn/conda-forge/pymodsecurity.svg)](https://anaconda.org/conda-forge/pymodsecurity)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pymodsecurity.svg)](https://pypi.org/project/pymodsecurity)\n[![modsecurity version](https://img.shields.io/badge/modsecurity-3.0.3-blue.svg)](https://github.com/SpiderLabs/ModSecurity/releases)\n\n# ModSecurity Python\n\nPython binding for ModSecurity\n\n* Note: This is an alpha version. Crashes are expected. Comments and suggestions are welcome\n\n## Developer Guide\n\n### Dependencies\n\n`libmodsecurity`, `python-dev` or `python3-dev` as well as `cmake`\n\n#### Bindings and ModSecurity Version Reference\n\n| pymodsecurity \t| ModSecurity \t|\n|---------------\t|-------------\t|\n| v0.0.1 \t| v3.0.2 \t|\n| v0.0.2 \t| v3.0.2 \t|\n| v0.0.3 \t| v3.0.2 \t|\n| v0.0.4 \t| v3.0.3 \t|\n| v0.0.5 \t| v3.0.3 \t|\n\nPlease refer to [ModSecurity Releases](https://github.com/SpiderLabs/ModSecurity/releases) and [ModSecurity Installation Guide](https://github.com/SpiderLabs/ModSecurity/wiki)\n\n### Packages\n\nPymodsecurity is available as an python package, to install it simply run:\n```\n$ pip install pymodsecurity\n```\n\n### Building from source\n\nThere are multiple ways to build pymodsecurity from source, you can either compile the module manually with CMake, install using setup.py or build a conda package using the recipe. Below are steps for each way.\n\n#### Installing via setup.py\n\n1 - Clone this repo and update the pybind11 submodule:\n```bash\n$ git clone --recurse-submodules https://github.com/pymodsecurity/pymodsecurity.git\n```\n\n2 - Compile and install the module:\n```\n$ python setup.py install\n```\n\n#### Compiling with CMake\n\n1 - Clone this repo and update the pybind11 submodule:\n```bash\n$ git clone --recurse-submodules https://github.com/pymodsecurity/pymodsecurity.git\n```\n\n2 - Create a build directory:\n```bash\n$ mkdir build \u0026\u0026 cd build\n```\n\n3 - Run CMake and make:\n```bash\n$ cmake .. \u0026\u0026 make\n```\n4 - Add the shared library to python's path\n\n#### Building and installing with conda\n\nIf you're using conda, you can build the package locally using conda-build (you will need to install `conda-build`).\n\n1 - Clone this repo and update the pybind11 submodule:\n```bash\n$ git clone --recurse-submodules https://github.com/pymodsecurity/pymodsecurity.git\n```\n\n2 - Run conda-build:\n```\n$ conda-build recipe\n```\n\n3 - Install the package:\n```\n$ conda install --use-local pymodsecurity\n```\n\n### Examples\n\nSome examples are provided in the `examples/` directory. More are coming soon.\n\n#### Real world examples\n\n[django middleware](https://github.com/pymodsecurity/django-pymodsecurity)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpymodsecurity%2Fpymodsecurity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpymodsecurity%2Fpymodsecurity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpymodsecurity%2Fpymodsecurity/lists"}