Skip to main content

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

  1. 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
  1. 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

  1. Generate a strong secret key:
python -c "import secrets; print(secrets.token_hex(32))"
  1. 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 ๐Ÿค

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/amazing)
  3. Commit changes (git commit -m 'Add feature')
  4. Push branch (git push origin feature/amazing)
  5. 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

vilcos-0.1.3.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vilcos-0.1.3-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

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

Hashes for vilcos-0.1.3.tar.gz
Algorithm Hash digest
SHA256 8d484ebc39aaeabcfadd0e816c39f0843009c758303225079b0b0a2dda2745a8
MD5 b1c551d1ffa0ecfaea38952f8a9f3ef2
BLAKE2b-256 04995b41e45c78f21bc3a0ac533566d46cd6bf57608ae293dfc48486d2ccf38e

See more details on using hashes here.

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

Hashes for vilcos-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0554e6dd7601802a444f7cc37c6365362bba6006103006c2fced007e05b7a38b
MD5 54f93e16ec06a0fa1549df59b0b55272
BLAKE2b-256 2903f10aac086ca6281e2d9f937af723477fe8a56e276a5652390580dcb9b540

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page