Introduction to Framefox
Framefox is a Python web framework that makes development enjoyable and productive. Built on FastAPI’s foundation, it combines speed, type safety, and clean architecture to help you ship fast without sacrificing code quality.Swift, smart, and a bit foxy! Framefox is designed for developers who want to build modern web applications with Python 3.12+ while maintaining clean, maintainable code.
Why Framefox?
Framefox combines the speed of FastAPI with clean MVC architecture, type-safe SQLModel, robust Pydantic validation, and developer-friendly tooling. It’s built for developers who want to ship fast without sacrificing code quality.FastAPI Foundation
Built on FastAPI with async/await support out of the box. Get blazing fast performance with modern Python async patterns.
Clean MVC Architecture
Separation of concerns with Controllers, Templates, and Repositories. Your code stays maintainable as your team grows.
Type-Safe Database
SQLModel integration provides type safety with automatic validation. Catch errors before they reach production.
Interactive CLI
Generate components instantly with commands like
framefox create controller. Build faster with intelligent scaffolding.Key Features
Performance & Architecture
- FastAPI Foundation - Built on FastAPI for exceptional performance
- Async/Await Support - Modern async patterns throughout the framework
- MVC Architecture - Clean separation with Controllers, Templates, and Repositories
- Dependency Injection - Built-in container for managing services
- Repository Pattern - Clean data access layer for database operations
Security First
- CSRF Protection - Automatic CSRF token generation and validation
- XSS Prevention - Secure templating with built-in escaping
- Session Management - Secure, encrypted session handling
- Authentication System - Ready-to-use user authentication
- Role-Based Access Control - Fine-grained permission management
Developer Experience
- Interactive CLI - Powerful commands for rapid development
- Component Generators - Create controllers, entities, and full CRUD instantly
- Hot Reload - Development server with automatic reloading
- Comprehensive Error Pages - Detailed debugging information
- Built-in Profiler - Performance monitoring and optimization
Database & ORM
- SQLModel Integration - Type-safe models with Pydantic validation
- Entity-Repository Pattern - Clean separation of data and business logic
- Database Migrations - Built-in Alembic support
- Query Builder - Fluent interface for complex queries
- Multi-Database Support - MySQL, PostgreSQL, SQLite, and more
Architecture Overview
Framefox follows a clean, organized project structure that scales:This clean MVC separation means your code stays maintainable as your team and project grow. Each layer has a clear responsibility and purpose.
Quick Example
Here’s what a simple controller looks like in Framefox:Template System
Framefox uses Jinja2 with powerful built-in functions:{{ url_for('route.name', param=value) }}- Generate URLs from route names{{ asset('path/file.css') }}- Asset management with versioning{{ csrf_token() }}- CSRF protection tokens{{ current_user }}- Access authenticated user{{ get_flash_messages() }}- Session-based notifications
Get Started
Ready to build your first Framefox application? Continue to the next sections:Installation
Set up Framefox on your system and verify your environment
Quickstart
Build your first application in under 5 minutes
Who’s Behind Framefox?
Framefox is developed and maintained by SOMA Smart, a technology company focused on building innovative development tools. The framework is backed by passionate developers: SOMA Smart is committed to empowering developers with cutting-edge tools and frameworks, with a focus on open-source development and long-term support.Framefox is open source and licensed under the MIT License. Contributions are welcome!