Skip to main content

A python web framework for people who read their code

Project description

Proper Web Framework

Proper is a new Python web framework. Not another Flask clone, it's a Ruby-on-Rails clone :P.

More seriously: it isn't a clone, but it is heavily influenced by Rails in the ways that matter. Very opinionated, generator-heavy, focused on REST and server-rendered HTML, built around a fixed project structure, and packed with hardcoded batteries. You can swap pieces if you must, but the assumption is that you won't.

The one thing Proper does very differently: sync above, async below. The runtime is ASGI (you need it for performance and WebSockets), but the code you write is synchronous. No async/await confetti scattered across code that doesn't need concurrency.

Quick start

Requires uv.

uvx proper_new myapp
cd myapp
proper g resource Post title:str body:text
proper server

That's a working CRUD app with model, controller, views, routes, migrations, and tests.

Full (human-shaped) docs at properproject.org/docs.

Why not X?

Why not Flask? - Absolute freedom means absolute chaos.

Why not Django? - Django gives you the pieces and expects you to assemble them; Proper assembles them and gives you direction.

Why not FastAPI? - FastAPI is awesome, but has the opposite shape: It's all about APIs and async-first, while Proper is server-rendered and sync-first. Building a React SPA on top of a JSON backend? You might want to use it. Building HTML for humans? Try Proper.

Why Peewee instead of SQLAlchemy? - Smaller surface area, more readable, and ActiveRecord-style scopes fit it cleanly. SQLAlchemy is excellent but not something I want to read every day.

Why Jx instead of Jinja? - Server-rendered Python components with typed props and slots. See the Jx docs for the case.

Built with AI agents in mind

Proper ships with an official skill: properproject.org/skill.zip. Drop it in ~/.claude/skills/ and your agent will scaffold and edit your app the Proper way (pun intended).

This isn't just an extra. Hard conventions are exactly what makes AI output legible to humans: fewer tokens to understand a project, fewer surprises in generated code, and less effort reviewing it.

What's in the box

  • Peewee ORM with migrations, query helpers, and connection handling
  • Forms — declarative, validated, ORM-integrated, with rendering helpers
  • Jx components — server-rendered Python components, typed props, slots
  • Caching — fragment, action, and low-level, on SQLite or Redis
  • Background tasks via Huey, with retries, schedules, and cron syntax
  • Authentication — sessions, password resets, rate limiting, pwned-password checks
  • File storage — disk and S3 adapters, signed URLs, image variants
  • i18n — locale-aware routing, translations, pluralization, date formats
  • Email — templated transactional mail, SMTP and console mailers
  • WebSockets — channels, broadcasts, presence

For the press release

Proper is the Python web framework I built for myself after fifteen years in the trade, once I understood that hard conventions do not lock you in — they free you to focus on what's important.

(It also works for the back cover of my future biography by Walter Isaacson).

Status

This is 0.9, I'll call it 1.0 when I've found more bugs. Bug reports and contributions are very welcome. File them at github.com/jpsca/proper/issues.

Community

License

Code: MIT. Documentation: CC BY-SA 4.0.

Made by Juan-Pablo Scaletti in Lima, Perú.

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

proper-0.10.0.tar.gz (210.9 kB view details)

Uploaded Source

Built Distribution

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

proper-0.10.0-py3-none-any.whl (189.4 kB view details)

Uploaded Python 3

File details

Details for the file proper-0.10.0.tar.gz.

File metadata

  • Download URL: proper-0.10.0.tar.gz
  • Upload date:
  • Size: 210.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for proper-0.10.0.tar.gz
Algorithm Hash digest
SHA256 0026e338616814b48963c6f2a2647033357c5d4d2dc71ad15a9c94eeb6389810
MD5 284d8e872ed8f038f4d16f882133560b
BLAKE2b-256 bf5e54bd0e95b365d5bc728058d7183d82cd63f16b8499721ada285ae1ec43b2

See more details on using hashes here.

File details

Details for the file proper-0.10.0-py3-none-any.whl.

File metadata

  • Download URL: proper-0.10.0-py3-none-any.whl
  • Upload date:
  • Size: 189.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.15

File hashes

Hashes for proper-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eebd3e22836342622cceb76734fc882df6396ce6074f9b4420be2adacc2a9c6b
MD5 ed0d916b7ff9de9154321a2337f07e62
BLAKE2b-256 76b7f740795d7376fe46153af4567d1acddbf588d6061ab4be3d9f34f20a814d

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