# webpy/webpy

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/webpy-webpy).**

5,919 stars · 1,296 forks · Python · NOASSERTION

## Links

- GitHub: https://github.com/webpy/webpy
- Homepage: http://webpy.org
- awesome-repositories: https://awesome-repositories.com/repository/webpy-webpy.md

## Description

web.py is a minimal Python web framework that provides the core components needed to build web applications: URL routing, template rendering, database access, form handling, and session management. The framework uses a convention-based approach where URL patterns are automatically mapped to handler classes based on their names, eliminating the need for manual route configuration. It exposes applications as WSGI callables, making them deployable with any WSGI-compliant server.

The framework distinguishes itself through its metaclass-driven auto-discovery system, which automatically registers handler classes and builds URL mappings at class definition time. It includes a built-in template rendering engine for generating dynamic HTML pages, a database abstraction layer for executing SQL queries and returning structured results, and a form validation system that creates HTML forms and validates user-submitted data against defined rules. The middleware hook system allows custom processing logic to be inserted before or after request handlers, while the session management system maintains per-user data across requests using server-side storage.

Beyond its core capabilities, web.py supports multi-app hosting through subdirectory, subdomain, or URL-prefix-based routing, and provides configurable HTTP error page generation for standard error codes. The framework includes a built-in development server for local testing, CGI script serving for platforms like Google App Engine, and an application testing utility that simulates HTTP requests with custom paths, methods, and headers.

## Tags

### Web Development

- [Python Web Frameworks](https://awesome-repositories.com/f/web-development/backend-development/web-frameworks/language-specific-ecosystems/python-web-frameworks.md) — A minimal Python web framework handling routing, templating, and database access with a simple API.
- [Minimal](https://awesome-repositories.com/f/web-development/backend-development/web-frameworks/language-specific-ecosystems/python-web-frameworks/minimal.md) — Provides a minimal Python web framework that keeps routing, templating, and database access simple and explicit.
- [HTTP Request Handling](https://awesome-repositories.com/f/web-development/backend-development/request-response-handling/http-request-handling.md) — Processes GET and POST requests through handler methods and sends a response back to the client. ([source](http://webpy.org/))
- [URL Route Mapping](https://awesome-repositories.com/f/web-development/dynamic-content-resolution/url-route-mapping.md) — Maps URL patterns to handler classes so each request is processed by the correct code. ([source](http://webpy.org/docs/0.3/apps))
- [Auto-Discovering URL Routes](https://awesome-repositories.com/f/web-development/dynamic-content-resolution/url-route-mapping/auto-discovering-url-routes.md) — Derives URL routes from class names so no explicit URL mappings are needed. ([source](http://webpy.org/docs/0.3/))
- [Auto-Registering URL Routes](https://awesome-repositories.com/f/web-development/dynamic-content-resolution/url-route-mapping/auto-registering-url-routes.md) — Builds URL mappings from class definitions using a metaclass to eliminate manual route configuration. ([source](http://webpy.org/docs/0.3/api))
- [Class-Name-Based URL Mappings](https://awesome-repositories.com/f/web-development/dynamic-content-resolution/url-route-mapping/class-name-based-url-mappings.md) — Derives URL routing automatically from class names to eliminate manual mapping configuration. ([source](http://webpy.org/docs/0.3/apps/auto))
- [Convention-Based URL Routers](https://awesome-repositories.com/f/web-development/dynamic-content-resolution/url-route-mapping/convention-based-url-routers.md) — Maps URL patterns to handler classes automatically from class names, eliminating manual route configuration.
- [Dynamic Template Rendering](https://awesome-repositories.com/f/web-development/dynamic-template-rendering.md) — Generates HTML pages by combining templates with data using the built-in templating system. ([source](http://webpy.org/docs/0.3/))
- [Form Validation Libraries](https://awesome-repositories.com/f/web-development/form-validation-libraries.md) — Provides a form builder that creates HTML forms and validates user-submitted data against defined rules.
- [Full-Stack Web Frameworks](https://awesome-repositories.com/f/web-development/full-stack-web-frameworks.md) — Creates a full-stack web application using a minimal, expressive framework that handles routing, templating, and database access. ([source](https://cdn.jsdelivr.net/gh/webpy/webpy@main/README.md))
- [Convention-Based URL Routers](https://awesome-repositories.com/f/web-development/rule-based-url-routing/convention-based-url-routers.md) — Automatically maps URL patterns to handler classes using class names, eliminating manual route configuration.
- [Session Management Systems](https://awesome-repositories.com/f/web-development/session-management-systems.md) — Implements a server-side session store that maintains per-user data across multiple requests.
- [Web Application Frameworks](https://awesome-repositories.com/f/web-development/web-application-frameworks.md) — Creates full-featured web applications using a minimal, straightforward framework that prioritizes simplicity and power. ([source](https://cdn.jsdelivr.net/gh/webpy/webpy@main/README.md))
- [WSGI Application Servers](https://awesome-repositories.com/f/web-development/web-infrastructure-deployment/web-infrastructure-servers/application-servers/wsgi-application-servers.md) — Exposes the application as a WSGI-compatible callable for deployment with production web servers. ([source](http://webpy.org/docs/0.3/api))
- [WSGI Frameworks](https://awesome-repositories.com/f/web-development/web-server-frameworks/wsgi-frameworks.md) — Exposes applications as WSGI callables for deployment with any WSGI-compliant server.
- [Error Route Handling](https://awesome-repositories.com/f/web-development/backend-development/web-frameworks/routing-request-handling/error-route-handling.md) — Returns configurable HTTP error pages for common errors like 404 Not Found and 500 Internal Server. ([source](http://webpy.org/docs/0.3/api))
- [Request Middleware](https://awesome-repositories.com/f/web-development/request-middleware.md) — Inserts custom logic that runs before or after each request handler to modify or inspect the request and response. ([source](http://webpy.org/docs/0.3/api))

### Data & Databases

- [Session Storage](https://awesome-repositories.com/f/data-databases/data-engineering-infrastructure/data-persistence-storage/data-storage/session-storage-synchronization/session-storage.md) — Maintains per-user data across multiple requests using server-side session storage. ([source](http://webpy.org/docs/0.3/))
- [Server-Side Session Storages](https://awesome-repositories.com/f/data-databases/data-engineering-infrastructure/data-persistence-storage/data-storage/session-storage-synchronization/session-storage/server-side-session-storages.md) — Maintains per-user data across requests using server-side session storage. ([source](http://webpy.org/docs/0.3/))
- [Database Query Execution](https://awesome-repositories.com/f/data-databases/database-query-execution.md) — Executes SQL queries against a database and returns results as structured data. ([source](http://webpy.org/docs/0.3/))
- [Server-Side Session Stores](https://awesome-repositories.com/f/data-databases/session-state-management/server-side-session-stores.md) — Maintains per-user data across requests using server-side session storage with a simple key-value interface.

### Development Tools & Productivity

- [Template Rendering Engines](https://awesome-repositories.com/f/development-tools-productivity/template-rendering-engines.md) — Includes a built-in templating engine that generates HTML pages by combining templates with dynamic data.
- [Request-Response Middleware](https://awesome-repositories.com/f/development-tools-productivity/execution-middleware/request-response-middleware.md) — Inserts custom processing logic before or after request handlers to modify requests and responses.

### Software Engineering & Architecture

- [Database Abstraction Layers](https://awesome-repositories.com/f/software-engineering-architecture/database-abstraction-layers.md) — Provides a database abstraction layer that executes SQL queries and returns structured results.
- [Request Delegation](https://awesome-repositories.com/f/software-engineering-architecture/server-side-logic-frameworks/request-delegation.md) — Delegates incoming HTTP requests to handler classes based on the request path. ([source](http://webpy.org/docs/0.3/api))

### User Interface & Experience

- [Auto-Registering Handler Classes](https://awesome-repositories.com/f/user-interface-experience/component-utilities/ui-frameworks/rendering-models/composition-rendering-patterns/component-patterns/class-components/class-decorators/metaclass-definitions/metaclass-transformations/auto-registering-handler-classes.md) — Uses a metaclass to automatically register handler classes and build URL mappings at class definition time.
- [Form Input Validation](https://awesome-repositories.com/f/user-interface-experience/form-input-validation.md) — Ships a built-in form validation system that defines fields with rules and processes submitted data. ([source](http://webpy.org/docs/0.3/))
- [Built-in Template Renderers](https://awesome-repositories.com/f/user-interface-experience/layout-utilities/presentation-engines/template-engines/server-side-rendering-engines/html-template-renderers/built-in-template-renderers.md) — Ships a built-in template rendering engine for generating dynamic HTML pages without external dependencies.

### Part of an Awesome List

- [Forms and Validation](https://awesome-repositories.com/f/awesome-lists/devtools/forms-and-validation.md) — Creates HTML forms and checks user-submitted data against defined field rules to ensure correctness. ([source](http://webpy.org/docs/0.3/))
- [Server-Side Form Generators](https://awesome-repositories.com/f/awesome-lists/devtools/forms-and-validation/server-side-form-generators.md) — Creates HTML forms with defined field rules and validates user-submitted data automatically on the server.
- [Language Toolkits](https://awesome-repositories.com/f/awesome-lists/devtools/language-toolkits.md) — Minimalist web framework for Python.
- [Web Frameworks](https://awesome-repositories.com/f/awesome-lists/devtools/web-frameworks.md) — Simple and powerful web framework.

### Networking & Communication

- [Pre-Request Logic Hooks](https://awesome-repositories.com/f/networking-communication/communication-protocols-architectures/request-processing-architectures/request-execution/pre-request-logic-hooks.md) — Executes custom logic before every request is handled, useful for authentication or setting up user state. ([source](http://webpy.org/docs/0.3/))

### Testing & Quality Assurance

- [Simulated Request Testing](https://awesome-repositories.com/f/testing-quality-assurance/api-endpoint-testing/simulated-request-testing.md) — Simulates requests and verifies application behavior during development. ([source](http://webpy.org/docs/0.3/))
