PyFusion - All-in-One Python Framework 🚀
A comprehensive Python framework that bundles web development, database operations, and utility functions into a single, easy-to-use package.
✨ Features
🌐 Web Framework
- Built-in Web Server - Flask-based web framework with easy routing
- HTTP Client - Robust HTTP client for API interactions
- Background Server - Run servers in background threads
- API Endpoints - Easy creation of RESTful APIs
- HTML Templates - Serve dynamic HTML content
💾 Database Management
- SQLite Integration - Built-in database manager with ORM-like interface
- CRUD Operations - Simple insert, update, delete, and query methods
- Key-Value Store - Generic app data storage
- Auto-setup - Automatic table creation and connection management
- Transaction Support - Safe database operations
🔧 Utilities
- File Operations - JSON, CSV, and text file handling
- Network Tools - Internet connectivity checks, port scanning, IP detection
- Data Validation - Email, phone, password strength validation
- Data Formatting - Date, currency, and hashing utilities
- Security - Data hashing and input sanitization
⚡ Easy to Use
- Auto-dependency Installation - Automatically installs required packages
- Simple Import - Single import for all components
- Comprehensive Examples - Ready-to-run demo code
- Production Ready - Well-tested and documented
- Zero Configuration - Works out of the box
🚀 Quick Installation
pip install pyfusion-v1
📖 Quick Start
Web Server Example
from pyfusion_v1 import WebServer
# Create and configure server
app = WebServer()
@app.route('/hello')
def hello():
return {"message": "Hello from PyFusion!", "status": "success"}
@app.route('/users', methods=['POST'])
def create_user():
return {"message": "User created", "method": "POST"}
# Run server
app.run(host='localhost', port=5000)
Database Operations
from pyfusion_v1 import Database
# Initialize database
db = Database('my_app.db')
# Insert data
user_id = db.insert('users', {
'username': 'john_doe',
'email': 'john@example.com'
})
# Query data
users = db.fetch_all('SELECT * FROM users')
user = db.fetch_one('SELECT * FROM users WHERE id = ?', [1])
# Update data
db.update('users', {'username': 'john_updated'}, 'id = 1')
# Delete data
db.delete('users', 'id = ?', [1])
HTTP Client
from pyfusion_v1 import HttpClient
# Create client
client = HttpClient('https://api.example.com')
# Make requests
response = client.get('/users')
response = client.post('/users', {'name': 'John', 'email': 'john@example.com'})
File Operations
from pyfusion_v1 import FileManager
# Read/write JSON
data = FileManager.read_json('config.json')
FileManager.write_json('output.json', data)
# Read/write CSV
csv_data = FileManager.read_csv('data.csv')
FileManager.write_csv('output.csv', csv_data)
# Text files
content = FileManager.read_file('README.md')
FileManager.write_file('copy.txt', content)
Utilities
from pyfusion_v1 import Validator, Formatter, NetworkTools
# Validation
print(Validator.is_email('test@example.com')) # True
print(Validator.is_strong_password('Secure123!')) # True
# Formatting
print(Formatter.format_date('2024-01-15')) # 15/01/2024
print(Formatter.format_currency(1500.75)) # ₹1,500.75
# Network
print(NetworkTools.check_internet()) # True
print(NetworkTools.get_local_ip()) # 192.168.1.100
🏗️ Project Structure
pyfusion_v1/
├── __init__.py # Main package initialization
├── assets/
│ └── logo.jpg # Project logo
├── web/
│ ├── __init__.py
│ ├── server.py # WebServer class
│ └── client.py # HttpClient class
├── database/
│ ├── __init__.py
│ └── manager.py # Database class
└── utils/
├── __init__.py
├── file_ops.py # FileManager class
├── network.py # NetworkTools class
└── helpers.py # Validator & Formatter classes
📚 Examples
Check the examples/ directory for complete working examples:
· web_app.py - Full web application example · database_demo.py - Database operations demo · full_stack.py - Complete full-stack application
Running Examples:
# Clone the repository
git clone https://github.com/anshuman365/pyfusion.git
cd pyfusion
# Run web application example
python examples/web_app.py
# Run database demo
python examples/database_demo.py
# Run full-stack example
python examples/full_stack.py
🔧 Requirements
· Python 3.6 or higher · Dependencies (automatically installed): · Flask >= 2.0.0 · Requests >= 2.25.0 · SQLAlchemy >= 1.4.0 · Jinja2 >= 3.0.0
🎯 Use Cases
· Rapid Prototyping - Quickly build MVP applications · Learning Tool - Perfect for beginners learning web development · Internal Tools - Build admin panels and internal dashboards · API Development - Create RESTful APIs with minimal setup · Full-Stack Apps - End-to-end web applications · Scripting - Enhanced scripting with database and web capabilities
🤝 Contributing
We welcome contributions! Please feel free to submit issues, feature requests, or pull requests.
- Fork the repository
- Create your feature branch (git checkout -b feature/AmazingFeature)
- Commit your changes (git commit -m 'Add some AmazingFeature')
- Push to the branch (git push origin feature/AmazingFeature)
- Open a Pull Request
Development Setup:
git clone https://github.com/anshuman365/pyfusion.git
cd pyfusion
pip install -e .
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🐛 Bug Reports
If you encounter any bugs or have suggestions, please open an issue.
❓ FAQ
Q: Is PyFusion suitable for production use? A: Yes! PyFusion is built with production-ready components and includes proper error handling.
Q: Can I use PyFusion with other databases? A: Currently PyFusion uses SQLite, but you can extend it to support other databases.
Q: How is this different from Flask/Django? A: PyFusion provides an all-in-one solution with built-in database, HTTP client, and utilities, reducing setup time.
Q: Is there documentation? A: Comprehensive documentation is available in the README and code examples.
🔗 Links
· PyPI: https://pypi.org/project/pyfusion-v1/ · GitHub: https://github.com/anshuman365/pyfusion · Issue Tracker: https://github.com/anshuman365/pyfusion/issues
📞 Support
If you need help or have questions:
- Check the examples directory
- Open an issue on GitHub
- Review the source code documentation
Made with ❤️ by PyFusion Team
Simplifying Python development, one line at a time.
Metadata
Release files for pyfusion-v1 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyfusion_v1-1.0.3.tar.gz | 66.3 kB | Without provenance | Details for pyfusion_v1-1.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyfusion_v1-1.0.3-py3-none-any.whl | Python 3 | none | any | Details for pyfusion_v1-1.0.3-py3-none-any.whl |
Total release size: 128.4 kB
Release files / pyfusion_v1-1.0.3.tar.gz
| Download URL | pyfusion_v1-1.0.3.tar.gz |
|---|---|
| Size | 66.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ba29d7f1f656c67ac8424a10dfd1485412808c57ea6bb3fe5de0510c85b3fd99
|
|
BLAKE2b-256 checksum How to use checksums |
6ae79b3dba645ab2b8b3fc8ca363f18dab3844e65badd17337f01698240a9a41
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.12.1.2 readme-renderer/36.0 requests/2.32.4 requests-toolbelt/1.0.0 urllib3/2.5.0 tqdm/4.67.1 importlib-metadata/8.6.1 keyring/25.6.0 rfc3986/1.5.0 colorama/0.4.6 CPython/3.12.10
|
Release files / pyfusion_v1-1.0.3-py3-none-any.whl
| Download URL | pyfusion_v1-1.0.3-py3-none-any.whl |
|---|---|
| Size | 62.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a1ed042a9023c8d20c7afd6939ee3f802f7df40d9c5001ada6de483ce9ec1f42
|
|
BLAKE2b-256 checksum How to use checksums |
14cf12013729961b293d7af2acf5667e9e7cbfaa1e7b49d54672bd2702ceba5d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.12.1.2 readme-renderer/36.0 requests/2.32.4 requests-toolbelt/1.0.0 urllib3/2.5.0 tqdm/4.67.1 importlib-metadata/8.6.1 keyring/25.6.0 rfc3986/1.5.0 colorama/0.4.6 CPython/3.12.10
|
Security for pyfusion-v1 1.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.