A FastAPI-based web framework
Project description
Vilcos Framework ๐
A modern, full-stack web framework built on FastAPI and Vue.js with real-time capabilities.
Features โจ
- Modern UI - Integrated with Vue 3 + Vuetify for beautiful interfaces
- Authentication - Simple, secure session-based auth with Argon2 password hashing
- Database - Async SQLAlchemy with connection pooling
- API Ready - FastAPI-powered REST endpoints with automatic OpenAPI docs
- Developer Friendly - CLI tools, hot reloading, and interactive shell
- Real-time WebSockets - Built-in support for multi-channel WebSocket communication
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
- Initialize and run:
vilcos init-db
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
โโโ routes/ # API endpoints and routes
โ โโโ auth.py # Authentication routes
โ โโโ ws.py # WebSocket routes
โโโ models.py # Database models
โโโ config.py # Application settings
โโโ db.py # Database configuration and 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/auth/me- Get current user info
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 ๐
WebSockets
// Connect and send messages
const ws = new WebSocket('ws://localhost:8000/live/ws/mychannel');
ws.send(JSON.stringify({ message: 'Hello!' }));
// Receive messages
ws.onmessage = (event) => console.log(JSON.parse(event.data));
CLI Tools
vilcos version # Show version
vilcos run # Development server
vilcos init-db # Setup database
vilcos shell # Interactive shell
Requirements ๐
- Python 3.8+
- PostgreSQL
- Redis
Configuration โ๏ธ
Essential .env settings:
DATABASE_URL=postgresql+asyncpg://user:pass@localhost/dbname
SECRET_KEY=your-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.
Project details
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 vilcos-0.1.3.tar.gz.
File metadata
- Download URL: vilcos-0.1.3.tar.gz
- Upload date:
- Size: 17.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d484ebc39aaeabcfadd0e816c39f0843009c758303225079b0b0a2dda2745a8
|
|
| MD5 |
b1c551d1ffa0ecfaea38952f8a9f3ef2
|
|
| BLAKE2b-256 |
04995b41e45c78f21bc3a0ac533566d46cd6bf57608ae293dfc48486d2ccf38e
|
File details
Details for the file vilcos-0.1.3-py3-none-any.whl.
File metadata
- Download URL: vilcos-0.1.3-py3-none-any.whl
- Upload date:
- Size: 21.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0554e6dd7601802a444f7cc37c6365362bba6006103006c2fced007e05b7a38b
|
|
| MD5 |
54f93e16ec06a0fa1549df59b0b55272
|
|
| BLAKE2b-256 |
2903f10aac086ca6281e2d9f937af723477fe8a56e276a5652390580dcb9b540
|