Vilcos Framework 🚀
A modern, full-stack web framework built on FastAPI and Vue.js with real-time capabilities.
Features ✨
- Modern UI - Vue 3 + Vuetify 3.7.3 for beautiful, responsive interfaces
- Authentication - Secure session-based auth with Argon2 password hashing and role-based access control
- Database - Async SQLAlchemy with PostgreSQL and connection pooling
- API Ready - FastAPI-powered REST endpoints with automatic OpenAPI docs
- Developer Friendly - CLI tools, hot reloading, and interactive shell
- Real-time WebSockets - Multi-channel WebSocket support with JSON message broadcasting
- Session Management - Redis-backed secure sessions with configurable settings
- User Management - Complete user administration with CRUD operations
- Role-Based Access - Flexible role management system with admin interface
- Modern Frontend - Material Design Icons, Axios for HTTP requests, and responsive layouts
Quick Start 🏃
Installation
# Clone the repository
git clone https://github.com/yourusername/vilcos.git
cd vilcos
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activate
# Install vilcos
pip install vilcos
Environment Setup
- Set up your environment variables:
# Copy the sample environment file
cp .env.sample .env
# Edit .env with your configuration
vim .env # or use your preferred editor
Required environment variables:
# Database Configuration
DATABASE_URL=postgresql+asyncpg://user:pass@localhost/dbname
# Security Settings
SECRET_KEY=your-secure-secret-key
SESSION_COOKIE_NAME=vilcos_session
SESSION_COOKIE_MAX_AGE=86400
SESSION_COOKIE_SECURE=true
SESSION_COOKIE_SAMESITE=lax
# Redis Configuration
REDIS_URL=redis://localhost:6379
- Initialize and run:
# Create database tables and default roles
vilcos init-db
# Create an admin user (optional)
vilcos create-admin
# Start the development server
vilcos run
Your app is now running at http://localhost:8000 🎉
Project Structure 📁
vilcos/
├── .env.sample # Sample environment configuration
├── pyproject.toml # Project configuration and dependencies
├── requirements.txt # Python dependencies
└── vilcos/ # Main package
├── static/ # Static assets
├── templates/ # View templates
│ ├── admin/ # Admin interface templates
│ └── auth/ # Authentication templates
├── routes/ # API endpoints and routes
│ ├── auth.py # Authentication routes
│ ├── users.py # User management routes
│ ├── roles.py # Role management routes
│ └── websockets.py # WebSocket routes
├── models.py # Database models
├── schemas.py # Pydantic schemas
├── config.py # Application settings
├── db.py # Database configuration and utilities
├── auth_utils.py # Authentication utilities
├── utils.py # Utility functions
├── cli.py # Command-line interface
└── app.py # Application entry point
Authentication 🔑
Vilcos uses a simple but secure session-based authentication system:
- Secure Password Storage: Argon2 hashing (winner of the Password Hashing Competition)
- Session Management: Redis-backed sessions with secure defaults
- Cookie Security: HTTPOnly, Secure, and SameSite flags enabled
- Database Integration: Direct SQLAlchemy models for user management
Routes
/auth/signin- User login/auth/signup- New user registration/auth/signout- User logout/admin/users- User management dashboard/admin/roles- Role management dashboard
Security Best Practices
- Generate a strong secret key:
python -c "import secrets; print(secrets.token_hex(32))"
- In production:
- Set
SESSION_COOKIE_SECURE=True - Use HTTPS
- Configure Redis with authentication
- Use strong database passwords
Key Features 🔑
User Management
The framework includes a comprehensive user management system:
-
User Administration
- Create, read, update, and delete users
- Manage user roles and permissions
- Toggle user activation status
- Secure password management
-
Role Management
- Create and manage custom roles
- Assign/remove roles from users
- Role-based access control for routes
- Admin interface for role management
WebSockets
// Connect to a specific channel
const ws = new WebSocket('ws://localhost:8000/ws/mychannel');
// Send JSON messages
ws.send(JSON.stringify({
type: 'chat',
content: 'Hello everyone!'
}));
// Handle incoming messages
ws.onmessage = (event) => {
const data = JSON.parse(event.data);
console.log(`Received at ${data.timestamp}:`, data.data);
};
CLI Tools
vilcos version # Show version
vilcos run # Start development server
vilcos init-db # Initialize database tables
vilcos create-admin # Create admin user
vilcos shell # Launch interactive shell
Requirements 📋
- Python 3.8+
- PostgreSQL
- Redis
Configuration ⚙️
Essential .env settings:
DATABASE_URL=postgresql+asyncpg://user:pass@localhost/dbname
SECRET_KEY=your-secure-secret-key
REDIS_URL=redis://localhost:6379
Contributing 🤝
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing) - Commit changes (
git commit -m 'Add feature') - Push branch (
git push origin feature/amazing) - Open Pull Request
License 📄
MIT License - see LICENSE file
Support 💬
- GitHub Issues: Bug reports
- GitHub Discussions: Questions
- Documentation: [Coming Soon]
Built with ❤️ using FastAPI, Vue.js, and modern web technologies.
Metadata
Release files for vilcos 0.4.0
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 |
|---|---|---|---|---|
| vilcos-0.4.0.tar.gz | 152.8 kB | Without provenance | Details for vilcos-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| vilcos-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for vilcos-0.4.0-py3-none-any.whl |
Total release size: 181.6 kB
Release files / vilcos-0.4.0.tar.gz
| Download URL | vilcos-0.4.0.tar.gz |
|---|---|
| Size | 152.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8c607831018cef8debadb8235048d27ba571c2e44d739186860e4eea84d8f445
|
|
BLAKE2b-256 checksum How to use checksums |
908158c47e8cfc8ff5b21ffae23a8cc510b40e87898b9987cc088785b1b2a3b5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.32.0
|
Release files / vilcos-0.4.0-py3-none-any.whl
| Download URL | vilcos-0.4.0-py3-none-any.whl |
|---|---|
| Size | 28.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e1da7400779a4e9ea5f43dd3581fae9e8b5d361245a22cf4489faa058839e235
|
|
BLAKE2b-256 checksum How to use checksums |
f85776c40937fa7309490e2ed48a76f729ec366cdb201cdf570bab886259e94e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.32.0
|
Security for vilcos 0.4.0
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.