Skip to content

Plinx Web Framework

Welcome to the official documentation for Plinx, a simple, lightweight, and educational Python web framework and ORM.

About Plinx

Plinx is an experimental web framework designed with the following goals:

  • Simplicity: Clean API with minimal magic
  • Educational Value: Clear implementation for learning purposes
  • Minimalism: Small core with few dependencies
  • Extensibility: Easy to customize and extend
  • Python 3.11+: Taking advantage of modern Python features

Plinx is both a functional web framework for building simple applications and an educational tool for learning how web frameworks and ORMs work under the hood.

Key Features

Web Framework

  • Route Decorators: Simple URL routing with path parameters
  • Request/Response Model: Clean separation of concerns
  • Class-Based Views: Support for HTTP method-specific handlers
  • Middleware System: For global request/response processing
  • WSGI Compatibility: Works with standard WSGI servers

ORM (Object-Relational Mapping)

  • Simple Table Definitions: Define tables as Python classes
  • SQLite Support: Lightweight database integration
  • Basic CRUD Operations: Create, read, update, delete
  • Relationships: Support for foreign key relationships
  • Type Mapping: Python types to SQLite types

Quick Example

from plinx import Plinx

app = Plinx()

@app.route("/")
def home(request, response):
    response.text = "Hello, World!"

@app.route("/hello/{name}")
def hello(request, response, name):
    response.json = {"message": f"Hello, {name}!"}

if __name__ == "__main__":
    # For development only
    from wsgiref.simple_server import make_server
    server = make_server('localhost', 8000, app)
    print("Server running at http://localhost:8000")
    server.serve_forever()

Getting Started

User Guide

ORM Guide

API Reference

Development

About

Who Should Use Plinx?

  • Learners: Those interested in understanding web framework internals
  • Teachers: For educational demonstrations of web concepts
  • Developers: Building simple applications or prototypes
  • Contributors: Interested in evolving a minimalist framework

Plinx may not be suitable for large-scale applications with complex requirements. It is intentionally minimalistic and focused on clarity rather than comprehensive features.

Thank you for using Plinx! We hope you find it both useful and educational.