integrium


Nameintegrium JSON
Version 0.2.0 PyPI version JSON
download
home_pageNone
SummaryAdvanced Data Validation Framework - The Integrity Element
upload_time2025-10-29 09:33:12
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseMIT License Copyright (c) 2024 Juste Elysée MALANDILA Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords async data integrity pydantic sanitization schema validation
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <div align="center">

```
██╗███╗   ██╗████████╗███████╗ ██████╗ ██████╗ ██╗██╗   ██╗███╗   ███╗
██║████╗  ██║╚══██╔══╝██╔════╝██╔════╝ ██╔══██╗██║██║   ██║████╗ ████║
██║██╔██╗ ██║   ██║   █████╗  ██║  ███╗██████╔╝██║██║   ██║██╔████╔██║
██║██║╚██╗██║   ██║   ██╔══╝  ██║   ██║██╔══██╗██║██║   ██║██║╚██╔╝██║
██║██║ ╚████║   ██║   ███████╗╚██████╔╝██║  ██║██║╚██████╔╝██║ ╚═╝ ██║
╚═╝╚═╝  ╚═══╝   ╚═╝   ╚══════╝ ╚═════╝ ╚═╝  ╚═╝╚═╝ ╚═════╝ ╚═╝     ╚═╝
```

### 🔐 *Advanced Data Validation Framework* 🔐

<p align="center">
  <strong>The Integrity Element - Where Data Meets Trust</strong>
</p>

[![PyPI version](https://img.shields.io/pypi/v/integrium?color=purple&style=for-the-badge)](https://pypi.org/project/integrium/)
[![Python Versions](https://img.shields.io/pypi/pyversions/integrium?style=for-the-badge)](https://pypi.org/project/integrium/)
[![License](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge)](https://opensource.org/licenses/MIT)
[![Downloads](https://img.shields.io/pypi/dm/integrium?style=for-the-badge&color=orange)](https://pepy.tech/project/integrium)

[![Type Checked](https://img.shields.io/badge/type%20checked-mypy-blue?style=for-the-badge)](http://mypy-lang.org/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge)](https://github.com/psf/black)

<p align="center">
  <a href="#-quick-start">Quick Start</a> •
  <a href="#-features">Features</a> •
  <a href="#-examples">Examples</a> •
  <a href="#-documentation">Documentation</a>
</p>

![Separator](https://user-images.githubusercontent.com/74038190/212284100-561aa473-3905-4a80-b561-0d28506553ee.gif)

</div>

## 🌟 What is INTEGRIUM?

**INTEGRIUM** is a modern, powerful data validation framework that goes **beyond** simple schema validation. It's built on **Pydantic** but adds intelligent sanitization, custom validators, and a developer-friendly API that makes data integrity **effortless**.

```python
from integrium import Validator, Field, sanitize

class User(Validator):
    name: str = Field(min_length=2, max_length=50)
    email: str = Field(pattern=r'^[\w\.-]+@[\w\.-]+\.\w+$')
    age: int = Field(ge=0, le=150)
    
user = User(name="  John Doe  ", email="john@example.com", age=30)
# ✅ Automatically validated and sanitized!
```

---

## ✨ Key Features

<table>
<tr>
<td width="50%">

### 🛡️ Validation Power
- ✅ **Pydantic Integration** - All Pydantic features included
- 📧 **Email Validation** - RFC-compliant email checking
- 🔢 **Numeric Constraints** - Min, max, ranges
- 📝 **String Validation** - Length, patterns, formats
- 📅 **Date/Time** - ISO formats, timezones

</td>
<td width="50%">

### 🧹 Smart Sanitization
- 🔤 **String Cleaning** - Trim, normalize whitespace
- 🔡 **Case Normalization** - Upper, lower, title case
- 🚫 **XSS Protection** - HTML/script stripping
- 🌐 **URL Validation** - Format checking
- 💾 **Data Coercion** - Type conversion

</td>
</tr>
<tr>
<td width="50%">

### 🎯 Developer Experience
- 💡 **Full Type Hints** - IDE autocomplete
- 📚 **Rich Error Messages** - Know exactly what failed
- 🔌 **Extensible** - Custom validators easy to add
- ⚡ **Fast** - Built on Pydantic's Rust core

</td>
<td width="50%">

### 🏗️ Production Ready
- ✅ **Tested** - Comprehensive test suite
- 📖 **Documented** - Every feature explained
- 🔒 **Secure** - Input sanitization built-in
- 🌍 **i18n Ready** - Multi-language errors

</td>
</tr>
</table>

---

## 📦 Installation

```bash
# Basic installation
pip install integrium

# With email validation
pip install integrium[email]

# With all features
pip install integrium[all]
```

---

## 🎯 Quick Start

### Basic Validation

```python
from integrium import Validator

class Product(Validator):
    name: str
    price: float
    quantity: int
    
# Valid data
product = Product(name="Laptop", price=999.99, quantity=10)
print(product.name)  # "Laptop"

# Invalid data raises ValidationError
try:
    Product(name="", price=-10, quantity="invalid")
except ValidationError as e:
    print(e.errors())
```

### With Advanced Constraints

```python
from integrium import Validator, Field
from pydantic import EmailStr

class UserProfile(Validator):
    username: str = Field(
        min_length=3,
        max_length=20,
        pattern=r'^[a-zA-Z0-9_]+$'
    )
    email: EmailStr
    age: int = Field(ge=13, le=120)
    bio: str = Field(max_length=500, default="")
    
profile = UserProfile(
    username="john_doe",
    email="john@example.com",
    age=25,
    bio="Python developer"
)
```

### Smart Sanitization

```python
from integrium import sanitize

# String cleaning
text = sanitize("  Hello   World  ")  # "hello world"

# Email normalization  
email = sanitize("John.Doe@EXAMPLE.COM", mode="email")  # "john.doe@example.com"

# URL cleaning
url = sanitize("  https://example.com/page  ", mode="url")  # "https://example.com/page"
```

---

## 🏗️ Architecture

```mermaid
graph LR
    A[Raw Data] --> B[INTEGRIUM]
    B --> C{Validation}
    B --> D{Sanitization}
    
    C --> E[Pydantic Core]
    D --> F[Custom Rules]
    
    E --> G[Type Checking]
    E --> H[Constraints]
    F --> I[String Clean]
    F --> J[XSS Filter]
    
    G --> K[Validated Data]
    H --> K
    I --> K
    J --> K
    
    K --> L[Your Application]
    
    style B fill:#9C27B0
    style K fill:#4CAF50
```

---

## 🔥 Advanced Features

### Custom Validators

```python
from integrium import Validator, field_validator

class Account(Validator):
    username: str
    password: str
    
    @field_validator('password')
    @classmethod
    def validate_password(cls, v):
        if len(v) < 8:
            raise ValueError('Password must be at least 8 characters')
        if not any(c.isupper() for c in v):
            raise ValueError('Password must contain uppercase letter')
        if not any(c.isdigit() for c in v):
            raise ValueError('Password must contain digit')
        return v
```

### Nested Validation

```python
from integrium import Validator
from typing import List

class Address(Validator):
    street: str
    city: str
    country: str
    postal_code: str

class Company(Validator):
    name: str
    employees: int
    addresses: List[Address]

company = Company(
    name="Tech Corp",
    employees=100,
    addresses=[
        {"street": "123 Main St", "city": "NYC", "country": "USA", "postal_code": "10001"},
        {"street": "456 Park Ave", "city": "LA", "country": "USA", "postal_code": "90001"}
    ]
)
```

### Schema Decorator

```python
from integrium import schema

@schema
class APIResponse:
    status: str
    data: dict
    message: str = "Success"
    
# Use as a validator
response = APIResponse(status="ok", data={"user_id": 123})
```

---

## 📊 Comparison with Other Libraries

| Feature | INTEGRIUM | Pydantic | Cerberus | Marshmallow | Voluptuous |
|---------|-----------|----------|----------|-------------|------------|
| Type Hints | ✅ Full | ✅ Full | ❌ No | ⚠️ Partial | ❌ No |
| Sanitization | ✅ Built-in | ❌ Manual | ⚠️ Limited | ⚠️ Limited | ❌ No |
| Async Support | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ❌ No |
| Error Messages | ✅ Rich | ✅ Good | ⚠️ Basic | ✅ Good | ⚠️ Basic |
| Performance | ⚡⚡⚡⚡ | ⚡⚡⚡⚡⚡ | ⚡⚡⚡ | ⚡⚡ | ⚡⚡⚡ |
| Learning Curve | 🟢 Easy | 🟢 Easy | 🟡 Medium | 🟡 Medium | 🟢 Easy |

---

## 🎨 Real-World Examples

### API Request Validation

```python
from integrium import Validator, Field
from fastapi import FastAPI, HTTPException

app = FastAPI()

class CreateUserRequest(Validator):
    username: str = Field(min_length=3, max_length=20)
    email: EmailStr
    password: str = Field(min_length=8)
    
@app.post("/users")
async def create_user(request: CreateUserRequest):
    # Data is already validated!
    return {"message": "User created", "username": request.username}
```

### Form Data Cleaning

```python
from integrium import sanitize

def clean_form_data(form):
    return {
        "name": sanitize(form.get("name", "")),
        "email": sanitize(form.get("email", ""), mode="email"),
        "message": sanitize(form.get("message", ""), mode="xss")
    }
```

### Database Model Validation

```python
from integrium import Validator
from datetime import datetime

class DBUser(Validator):
    id: int
    username: str
    email: str
    created_at: datetime
    is_active: bool = True
    
    class Config:
        from_attributes = True  # Allow ORM models

# Use with SQLAlchemy, Django, etc.
user = DBUser.from_orm(db_user_object)
```

---

## 📚 Documentation

- 📖 [Full API Reference](https://integrium.readthedocs.io)
- 🚀 [Quick Start Guide](https://integrium.readthedocs.io/quickstart)
- 🎓 [Tutorial](https://integrium.readthedocs.io/tutorial)
- 🎯 [Best Practices](https://integrium.readthedocs.io/best-practices)

---

## 🗺️ Roadmap

### ✅ Version 0.1.0 (Current)
- [x] Pydantic integration
- [x] Basic sanitization
- [x] Field validation
- [x] Custom validators

### 🚧 Version 0.2.0 (Coming Soon)
- [ ] Async validation
- [ ] i18n error messages
- [ ] JSON Schema export
- [ ] More sanitization modes

### 🔮 Version 0.3.0 (Planned)
- [ ] GraphQL schema generation
- [ ] OpenAPI integration
- [ ] Validation caching
- [ ] Performance optimizations

---

## 🤝 Contributing

Contributions welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.

---

## 📜 License

MIT License - see [LICENSE](LICENSE) file for details.

---

## 👤 Author

<div align="center">

### **Juste Elysée MALANDILA**

[![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://linkedin.com/in/juste-elysee-malandila)
[![Email](https://img.shields.io/badge/Email-D14836?style=for-the-badge&logo=gmail&logoColor=white)](mailto:justech4dev@gmail.com)
[![GitHub](https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white)](https://github.com/jdevsky)

*"Building trust through data integrity."* 🔐

</div>

---

<div align="center">

### Made with ❤️ by [Juste Elysée MALANDILA](https://linkedin.com/in/juste-elysee-malandila)

**INTEGRIUM** - *The Integrity Element* 🔐

![Footer](https://capsule-render.vercel.app/api?type=waving&color=gradient&height=100&section=footer)

</div>

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "integrium",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "async, data, integrity, pydantic, sanitization, schema, validation",
    "author": null,
    "author_email": "Juste Elys\u00e9e MALANDILA <justech4dev@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/2e/07/dc48605f78c8911d1d3f27e253f00b1d44160748d8a61d6da2b44e07943e/integrium-0.2.0.tar.gz",
    "platform": null,
    "description": "<div align=\"center\">\n\n```\n\u2588\u2588\u2557\u2588\u2588\u2588\u2557   \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557   \u2588\u2588\u2557\u2588\u2588\u2588\u2557   \u2588\u2588\u2588\u2557\n\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2557  \u2588\u2588\u2551\u255a\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255d\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255d\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255d \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2551   \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2551\n\u2588\u2588\u2551\u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551   \u2588\u2588\u2551   \u2588\u2588\u2588\u2588\u2588\u2557  \u2588\u2588\u2551  \u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d\u2588\u2588\u2551\u2588\u2588\u2551   \u2588\u2588\u2551\u2588\u2588\u2554\u2588\u2588\u2588\u2588\u2554\u2588\u2588\u2551\n\u2588\u2588\u2551\u2588\u2588\u2551\u255a\u2588\u2588\u2557\u2588\u2588\u2551   \u2588\u2588\u2551   \u2588\u2588\u2554\u2550\u2550\u255d  \u2588\u2588\u2551   \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551\u2588\u2588\u2551   \u2588\u2588\u2551\u2588\u2588\u2551\u255a\u2588\u2588\u2554\u255d\u2588\u2588\u2551\n\u2588\u2588\u2551\u2588\u2588\u2551 \u255a\u2588\u2588\u2588\u2588\u2551   \u2588\u2588\u2551   \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u255a\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d\u2588\u2588\u2551  \u2588\u2588\u2551\u2588\u2588\u2551\u255a\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255d\u2588\u2588\u2551 \u255a\u2550\u255d \u2588\u2588\u2551\n\u255a\u2550\u255d\u255a\u2550\u255d  \u255a\u2550\u2550\u2550\u255d   \u255a\u2550\u255d   \u255a\u2550\u2550\u2550\u2550\u2550\u2550\u255d \u255a\u2550\u2550\u2550\u2550\u2550\u255d \u255a\u2550\u255d  \u255a\u2550\u255d\u255a\u2550\u255d \u255a\u2550\u2550\u2550\u2550\u2550\u255d \u255a\u2550\u255d     \u255a\u2550\u255d\n```\n\n### \ud83d\udd10 *Advanced Data Validation Framework* \ud83d\udd10\n\n<p align=\"center\">\n  <strong>The Integrity Element - Where Data Meets Trust</strong>\n</p>\n\n[![PyPI version](https://img.shields.io/pypi/v/integrium?color=purple&style=for-the-badge)](https://pypi.org/project/integrium/)\n[![Python Versions](https://img.shields.io/pypi/pyversions/integrium?style=for-the-badge)](https://pypi.org/project/integrium/)\n[![License](https://img.shields.io/badge/License-MIT-green.svg?style=for-the-badge)](https://opensource.org/licenses/MIT)\n[![Downloads](https://img.shields.io/pypi/dm/integrium?style=for-the-badge&color=orange)](https://pepy.tech/project/integrium)\n\n[![Type Checked](https://img.shields.io/badge/type%20checked-mypy-blue?style=for-the-badge)](http://mypy-lang.org/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=for-the-badge)](https://github.com/psf/black)\n\n<p align=\"center\">\n  <a href=\"#-quick-start\">Quick Start</a> \u2022\n  <a href=\"#-features\">Features</a> \u2022\n  <a href=\"#-examples\">Examples</a> \u2022\n  <a href=\"#-documentation\">Documentation</a>\n</p>\n\n![Separator](https://user-images.githubusercontent.com/74038190/212284100-561aa473-3905-4a80-b561-0d28506553ee.gif)\n\n</div>\n\n## \ud83c\udf1f What is INTEGRIUM?\n\n**INTEGRIUM** is a modern, powerful data validation framework that goes **beyond** simple schema validation. It's built on **Pydantic** but adds intelligent sanitization, custom validators, and a developer-friendly API that makes data integrity **effortless**.\n\n```python\nfrom integrium import Validator, Field, sanitize\n\nclass User(Validator):\n    name: str = Field(min_length=2, max_length=50)\n    email: str = Field(pattern=r'^[\\w\\.-]+@[\\w\\.-]+\\.\\w+$')\n    age: int = Field(ge=0, le=150)\n    \nuser = User(name=\"  John Doe  \", email=\"john@example.com\", age=30)\n# \u2705 Automatically validated and sanitized!\n```\n\n---\n\n## \u2728 Key Features\n\n<table>\n<tr>\n<td width=\"50%\">\n\n### \ud83d\udee1\ufe0f Validation Power\n- \u2705 **Pydantic Integration** - All Pydantic features included\n- \ud83d\udce7 **Email Validation** - RFC-compliant email checking\n- \ud83d\udd22 **Numeric Constraints** - Min, max, ranges\n- \ud83d\udcdd **String Validation** - Length, patterns, formats\n- \ud83d\udcc5 **Date/Time** - ISO formats, timezones\n\n</td>\n<td width=\"50%\">\n\n### \ud83e\uddf9 Smart Sanitization\n- \ud83d\udd24 **String Cleaning** - Trim, normalize whitespace\n- \ud83d\udd21 **Case Normalization** - Upper, lower, title case\n- \ud83d\udeab **XSS Protection** - HTML/script stripping\n- \ud83c\udf10 **URL Validation** - Format checking\n- \ud83d\udcbe **Data Coercion** - Type conversion\n\n</td>\n</tr>\n<tr>\n<td width=\"50%\">\n\n### \ud83c\udfaf Developer Experience\n- \ud83d\udca1 **Full Type Hints** - IDE autocomplete\n- \ud83d\udcda **Rich Error Messages** - Know exactly what failed\n- \ud83d\udd0c **Extensible** - Custom validators easy to add\n- \u26a1 **Fast** - Built on Pydantic's Rust core\n\n</td>\n<td width=\"50%\">\n\n### \ud83c\udfd7\ufe0f Production Ready\n- \u2705 **Tested** - Comprehensive test suite\n- \ud83d\udcd6 **Documented** - Every feature explained\n- \ud83d\udd12 **Secure** - Input sanitization built-in\n- \ud83c\udf0d **i18n Ready** - Multi-language errors\n\n</td>\n</tr>\n</table>\n\n---\n\n## \ud83d\udce6 Installation\n\n```bash\n# Basic installation\npip install integrium\n\n# With email validation\npip install integrium[email]\n\n# With all features\npip install integrium[all]\n```\n\n---\n\n## \ud83c\udfaf Quick Start\n\n### Basic Validation\n\n```python\nfrom integrium import Validator\n\nclass Product(Validator):\n    name: str\n    price: float\n    quantity: int\n    \n# Valid data\nproduct = Product(name=\"Laptop\", price=999.99, quantity=10)\nprint(product.name)  # \"Laptop\"\n\n# Invalid data raises ValidationError\ntry:\n    Product(name=\"\", price=-10, quantity=\"invalid\")\nexcept ValidationError as e:\n    print(e.errors())\n```\n\n### With Advanced Constraints\n\n```python\nfrom integrium import Validator, Field\nfrom pydantic import EmailStr\n\nclass UserProfile(Validator):\n    username: str = Field(\n        min_length=3,\n        max_length=20,\n        pattern=r'^[a-zA-Z0-9_]+$'\n    )\n    email: EmailStr\n    age: int = Field(ge=13, le=120)\n    bio: str = Field(max_length=500, default=\"\")\n    \nprofile = UserProfile(\n    username=\"john_doe\",\n    email=\"john@example.com\",\n    age=25,\n    bio=\"Python developer\"\n)\n```\n\n### Smart Sanitization\n\n```python\nfrom integrium import sanitize\n\n# String cleaning\ntext = sanitize(\"  Hello   World  \")  # \"hello world\"\n\n# Email normalization  \nemail = sanitize(\"John.Doe@EXAMPLE.COM\", mode=\"email\")  # \"john.doe@example.com\"\n\n# URL cleaning\nurl = sanitize(\"  https://example.com/page  \", mode=\"url\")  # \"https://example.com/page\"\n```\n\n---\n\n## \ud83c\udfd7\ufe0f Architecture\n\n```mermaid\ngraph LR\n    A[Raw Data] --> B[INTEGRIUM]\n    B --> C{Validation}\n    B --> D{Sanitization}\n    \n    C --> E[Pydantic Core]\n    D --> F[Custom Rules]\n    \n    E --> G[Type Checking]\n    E --> H[Constraints]\n    F --> I[String Clean]\n    F --> J[XSS Filter]\n    \n    G --> K[Validated Data]\n    H --> K\n    I --> K\n    J --> K\n    \n    K --> L[Your Application]\n    \n    style B fill:#9C27B0\n    style K fill:#4CAF50\n```\n\n---\n\n## \ud83d\udd25 Advanced Features\n\n### Custom Validators\n\n```python\nfrom integrium import Validator, field_validator\n\nclass Account(Validator):\n    username: str\n    password: str\n    \n    @field_validator('password')\n    @classmethod\n    def validate_password(cls, v):\n        if len(v) < 8:\n            raise ValueError('Password must be at least 8 characters')\n        if not any(c.isupper() for c in v):\n            raise ValueError('Password must contain uppercase letter')\n        if not any(c.isdigit() for c in v):\n            raise ValueError('Password must contain digit')\n        return v\n```\n\n### Nested Validation\n\n```python\nfrom integrium import Validator\nfrom typing import List\n\nclass Address(Validator):\n    street: str\n    city: str\n    country: str\n    postal_code: str\n\nclass Company(Validator):\n    name: str\n    employees: int\n    addresses: List[Address]\n\ncompany = Company(\n    name=\"Tech Corp\",\n    employees=100,\n    addresses=[\n        {\"street\": \"123 Main St\", \"city\": \"NYC\", \"country\": \"USA\", \"postal_code\": \"10001\"},\n        {\"street\": \"456 Park Ave\", \"city\": \"LA\", \"country\": \"USA\", \"postal_code\": \"90001\"}\n    ]\n)\n```\n\n### Schema Decorator\n\n```python\nfrom integrium import schema\n\n@schema\nclass APIResponse:\n    status: str\n    data: dict\n    message: str = \"Success\"\n    \n# Use as a validator\nresponse = APIResponse(status=\"ok\", data={\"user_id\": 123})\n```\n\n---\n\n## \ud83d\udcca Comparison with Other Libraries\n\n| Feature | INTEGRIUM | Pydantic | Cerberus | Marshmallow | Voluptuous |\n|---------|-----------|----------|----------|-------------|------------|\n| Type Hints | \u2705 Full | \u2705 Full | \u274c No | \u26a0\ufe0f Partial | \u274c No |\n| Sanitization | \u2705 Built-in | \u274c Manual | \u26a0\ufe0f Limited | \u26a0\ufe0f Limited | \u274c No |\n| Async Support | \u2705 Yes | \u2705 Yes | \u274c No | \u274c No | \u274c No |\n| Error Messages | \u2705 Rich | \u2705 Good | \u26a0\ufe0f Basic | \u2705 Good | \u26a0\ufe0f Basic |\n| Performance | \u26a1\u26a1\u26a1\u26a1 | \u26a1\u26a1\u26a1\u26a1\u26a1 | \u26a1\u26a1\u26a1 | \u26a1\u26a1 | \u26a1\u26a1\u26a1 |\n| Learning Curve | \ud83d\udfe2 Easy | \ud83d\udfe2 Easy | \ud83d\udfe1 Medium | \ud83d\udfe1 Medium | \ud83d\udfe2 Easy |\n\n---\n\n## \ud83c\udfa8 Real-World Examples\n\n### API Request Validation\n\n```python\nfrom integrium import Validator, Field\nfrom fastapi import FastAPI, HTTPException\n\napp = FastAPI()\n\nclass CreateUserRequest(Validator):\n    username: str = Field(min_length=3, max_length=20)\n    email: EmailStr\n    password: str = Field(min_length=8)\n    \n@app.post(\"/users\")\nasync def create_user(request: CreateUserRequest):\n    # Data is already validated!\n    return {\"message\": \"User created\", \"username\": request.username}\n```\n\n### Form Data Cleaning\n\n```python\nfrom integrium import sanitize\n\ndef clean_form_data(form):\n    return {\n        \"name\": sanitize(form.get(\"name\", \"\")),\n        \"email\": sanitize(form.get(\"email\", \"\"), mode=\"email\"),\n        \"message\": sanitize(form.get(\"message\", \"\"), mode=\"xss\")\n    }\n```\n\n### Database Model Validation\n\n```python\nfrom integrium import Validator\nfrom datetime import datetime\n\nclass DBUser(Validator):\n    id: int\n    username: str\n    email: str\n    created_at: datetime\n    is_active: bool = True\n    \n    class Config:\n        from_attributes = True  # Allow ORM models\n\n# Use with SQLAlchemy, Django, etc.\nuser = DBUser.from_orm(db_user_object)\n```\n\n---\n\n## \ud83d\udcda Documentation\n\n- \ud83d\udcd6 [Full API Reference](https://integrium.readthedocs.io)\n- \ud83d\ude80 [Quick Start Guide](https://integrium.readthedocs.io/quickstart)\n- \ud83c\udf93 [Tutorial](https://integrium.readthedocs.io/tutorial)\n- \ud83c\udfaf [Best Practices](https://integrium.readthedocs.io/best-practices)\n\n---\n\n## \ud83d\uddfa\ufe0f Roadmap\n\n### \u2705 Version 0.1.0 (Current)\n- [x] Pydantic integration\n- [x] Basic sanitization\n- [x] Field validation\n- [x] Custom validators\n\n### \ud83d\udea7 Version 0.2.0 (Coming Soon)\n- [ ] Async validation\n- [ ] i18n error messages\n- [ ] JSON Schema export\n- [ ] More sanitization modes\n\n### \ud83d\udd2e Version 0.3.0 (Planned)\n- [ ] GraphQL schema generation\n- [ ] OpenAPI integration\n- [ ] Validation caching\n- [ ] Performance optimizations\n\n---\n\n## \ud83e\udd1d Contributing\n\nContributions welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.\n\n---\n\n## \ud83d\udcdc License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n\n---\n\n## \ud83d\udc64 Author\n\n<div align=\"center\">\n\n### **Juste Elys\u00e9e MALANDILA**\n\n[![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://linkedin.com/in/juste-elysee-malandila)\n[![Email](https://img.shields.io/badge/Email-D14836?style=for-the-badge&logo=gmail&logoColor=white)](mailto:justech4dev@gmail.com)\n[![GitHub](https://img.shields.io/badge/GitHub-100000?style=for-the-badge&logo=github&logoColor=white)](https://github.com/jdevsky)\n\n*\"Building trust through data integrity.\"* \ud83d\udd10\n\n</div>\n\n---\n\n<div align=\"center\">\n\n### Made with \u2764\ufe0f by [Juste Elys\u00e9e MALANDILA](https://linkedin.com/in/juste-elysee-malandila)\n\n**INTEGRIUM** - *The Integrity Element* \ud83d\udd10\n\n![Footer](https://capsule-render.vercel.app/api?type=waving&color=gradient&height=100&section=footer)\n\n</div>\n",
    "bugtrack_url": null,
    "license": "MIT License\n        \n        Copyright (c) 2024 Juste Elys\u00e9e MALANDILA\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy\n        of this software and associated documentation files (the \"Software\"), to deal\n        in the Software without restriction, including without limitation the rights\n        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n        copies of the Software, and to permit persons to whom the Software is\n        furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all\n        copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n        SOFTWARE.",
    "summary": "Advanced Data Validation Framework - The Integrity Element",
    "version": "0.2.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/jdevsky/integrium/issues",
        "Documentation": "https://github.com/jdevsky/integrium#readme",
        "Homepage": "https://github.com/jdevsky/integrium",
        "Repository": "https://github.com/jdevsky/integrium.git"
    },
    "split_keywords": [
        "async",
        " data",
        " integrity",
        " pydantic",
        " sanitization",
        " schema",
        " validation"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "f966a631d765ed0009e3f05fb9c9598b7c3316fa465b02e75a4f879fa6e1ce4c",
                "md5": "968ab58eb05b0c5e544cb3b614ad042e",
                "sha256": "9db41353cf81fc60cab55db4c974d116dfc53cb47c56c8ae5cc222950e6416fa"
            },
            "downloads": -1,
            "filename": "integrium-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "968ab58eb05b0c5e544cb3b614ad042e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 10142,
            "upload_time": "2025-10-29T09:33:10",
            "upload_time_iso_8601": "2025-10-29T09:33:10.477318Z",
            "url": "https://files.pythonhosted.org/packages/f9/66/a631d765ed0009e3f05fb9c9598b7c3316fa465b02e75a4f879fa6e1ce4c/integrium-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2e07dc48605f78c8911d1d3f27e253f00b1d44160748d8a61d6da2b44e07943e",
                "md5": "8e5cfc449b74647621939d290d4b0ac3",
                "sha256": "97357581789bb98d7f318f0cb7c889dcc3ef9adaf708f6683ceb8c01acd359cc"
            },
            "downloads": -1,
            "filename": "integrium-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "8e5cfc449b74647621939d290d4b0ac3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 10471,
            "upload_time": "2025-10-29T09:33:12",
            "upload_time_iso_8601": "2025-10-29T09:33:12.078865Z",
            "url": "https://files.pythonhosted.org/packages/2e/07/dc48605f78c8911d1d3f27e253f00b1d44160748d8a61d6da2b44e07943e/integrium-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-29 09:33:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "jdevsky",
    "github_project": "integrium",
    "github_not_found": true,
    "lcname": "integrium"
}
        
Elapsed time: 3.08718s