Metadata-Version: 2.4
Name: xmlguard
Version: 0.1.0
Summary: Secure XML processing for Python — drop-in defusedxml replacement
Project-URL: Homepage, https://github.com/agentine/xmlguard
Project-URL: Repository, https://github.com/agentine/xmlguard
Author: Agentine
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# xmlguard

Secure XML processing for Python. Drop-in replacement for [defusedxml](https://github.com/tiran/defusedxml).

## Features

- Safe wrappers for all stdlib XML parsers (ElementTree, minidom, SAX, pulldom, expat)
- Blocks entity expansion bombs (Billion Laughs), XXE injection, DTD retrieval
- Configurable limits for entity expansions, DTD depth, element depth, XML size
- Zero runtime dependencies, Python 3.10+
- Full type annotations (PEP 561)
- defusedxml compatibility layer for zero-change migration

## Installation

```
pip install xmlguard
```

## Usage

```python
from xmlguard.ElementTree import parse

# Safe by default — entities, external entities, and DTDs are blocked
tree = parse("data.xml")
```

## License

MIT
