A Security First Python library to generate web components and security utilities with zero external dependencies
Project description
🛡️ CodigoAS-librery
A "Security First" Python library to generate web components and security utilities with zero external dependencies.
Designed for developers who want to build secure websites and validate data using pure Python only.
✨ Features
- 🎨 HTML Generation — Create divs, cards, navbars, forms, and complete pages from Python.
- 🔐 Security — Salted hashing, password generation, XSS sanitization, SQL cleaning, and header/TLS auditing.
- 📝 Text Manipulation — Slugs, reading time, email and URL extraction with regex.
- ✅ Validation — Phone numbers, currency, credit cards (Luhn), and relative dates.
- 🎨 Data & Colors — RGB/Hex conversion, JSON handling, and list flattening.
- 🚫 Zero Dependencies — Standard Python 3.7+ library only.
📦 Installation
pip install CodigoAS-librery
🚀 Quick Start
from codigoas_librery import create_card, generate_password, create_html_page
# Generate a secure password
password = generate_password(20)
print(password) # aK9$mP2xLq...
# Create web components with Python
card = create_card("Cybersecurity", "Security First protection")
# Create a complete HTML page
page = create_html_page("My Website", card)
with open("index.html", "w", encoding="utf-8") as f:
f.write(page)
print("Website created!")
🔐 Security Example
from codigoas_librery import scan_headers, verify_tls, sanitize_xss
# Audit security headers of a website
result = scan_headers("https://example.com")
print(result)
# Verify TLS certificate
tls = verify_tls("example.com")
print(tls)
# Sanitize input against XSS
safe = sanitize_xss("<script>alert('hack')</script>")
print(safe)
📚 Function Categories
| Category | Functions | Description |
|---|---|---|
| HTML | 15 | Web component generation |
| Security | 15 | Hashing, XSS, auditing, TLS |
| Text | 12 | Slugs, regex, formatting |
| Validation | 10 | Phones, cards, currency |
| Data/Colors | 8 | JSON, RGB/Hex, lists |
Total: 60 pure Python functions 🐍
📄 License
This project is licensed under the MIT License. See the LICENSE file for details.
🤝 Contributing
Contributions are welcome! Feel free to open an issue or submit a pull request.
Made with 🛡️ by Ahmed Smaili — Codigo AS
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codigoas_librery-0.3.0.tar.gz.
File metadata
- Download URL: codigoas_librery-0.3.0.tar.gz
- Upload date:
- Size: 17.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e980c6ebf5874d62985d12c973dfb0e4162b3546af8372fb0f5dc0bdfa8b388
|
|
| MD5 |
54a373df6165b9bf76f56e5bdea42bd0
|
|
| BLAKE2b-256 |
5b2d1a64dce7d8d16261ce3e3e1fbc2c66190075d3e24692ea2c5f76a0528fcc
|
File details
Details for the file codigoas_librery-0.3.0-py3-none-any.whl.
File metadata
- Download URL: codigoas_librery-0.3.0-py3-none-any.whl
- Upload date:
- Size: 18.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e533939d63f0e169f78b15b1d62a97ea36bb8b5f81ff21039dc84e59dd0ace54
|
|
| MD5 |
5641e901c17421fabee0d7dd6e0c7313
|
|
| BLAKE2b-256 |
bfc523284e1b8488b772948f31f07f668e5d86a3a55b6ee77b2df96c0178767c
|