pyramid-capstone
FastAPI-like decorators for Pyramid - Build type-safe REST APIs with automatic validation, serialization, and OpenAPI documentation.
⚠️ Development Status Warning
This project is in early development (v0.1.x) and should NOT be used in production environments.
While we have comprehensive tests and the core functionality works, the API may change significantly between versions. Use at your own risk and expect breaking changes until we reach v1.0.0.
- 📖 Documentation: https://tomascorrea.github.io/pyramid-capstone/
- 🔧 Source Code: https://github.com/tomascorrea/pyramid-capstone/
- 🐍 PyPI: <https://pypi.org/project/pyramid-capstone/
✨ What is pyramid-capstone?
pyramid-capstone enhances Pyramid's already excellent foundation with modern developer conveniences. Built on Pyramid's proven architecture of robustness, flexibility, and enterprise-grade security, it adds automatic validation, serialization, and documentation generation while preserving Pyramid's minimalist philosophy.
🎯 Key Features
- ⚡ Developer Experience: Modern decorators with automatic validation and serialization
- 🏗️ Pyramid Foundation: Built on Pyramid's battle-tested, production-ready framework
- 🔗 Seamless Integration: Works perfectly with existing Pyramid applications and middleware
- 📚 Auto Documentation: Automatic OpenAPI/Swagger documentation generation
- 🛡️ Enterprise Security: Leverages Pyramid's comprehensive security and authentication system
- 🧪 Production Ready: Comprehensive test suite built on Pyramid's reliability
🚀 Quick Example
from pyramid.config import Configurator
from pyramid_capstone import api
@api.get('/users/{user_id}')
def get_user(request, user_id: int) -> dict:
return {"id": user_id, "name": "John Doe"}
@api.post('/users')
def create_user(request, name: str, email: str) -> dict:
# Parameters automatically extracted and validated from JSON body
return {"message": "User created", "name": name, "email": email}
# Pyramid app setup
def main(global_config, **settings):
config = Configurator(settings=settings)
config.include('pyramid_capstone')
config.scan()
return config.make_wsgi_app()
That's it! No manual schema definitions, no boilerplate validation code.
🏃♂️ Quick Start
Installation
pip install pyramid-capstone
Basic Setup
from pyramid.config import Configurator
from pyramid_capstone import api
# Include the library in your Pyramid app
def main(global_config, **settings):
config = Configurator(settings=settings)
config.include('pyramid_capstone')
# Scan for your decorated views
config.scan()
return config.make_wsgi_app()
🎯 Why Choose pyramid-capstone?
pyramid-capstone combines Pyramid's enterprise-grade foundation with modern developer experience:
| Feature | pyramid-capstone | Pure Pyramid | Pure Cornice |
|---|---|---|---|
| Developer Experience | ✅ Modern + Simple | ✅ Minimal | ⚠️ Schema-heavy |
| Auto Validation | ✅ Type-hint based | ❌ Manual setup | ✅ Schema-based |
| OpenAPI Docs | ✅ Auto-generated | ❌ Manual | ⚠️ Limited |
| Production Readiness | ✅ Pyramid foundation | ✅ Battle-tested | ✅ Pyramid foundation |
| Security & Auth | ✅ Full Pyramid power | ✅ Comprehensive | ✅ Full Pyramid power |
| Flexibility | ✅ Pyramid's strength | ✅ Maximum | ✅ Pyramid's strength |
| Learning Curve | ✅ Gentle enhancement | ⚠️ Framework mastery | ⚠️ Schema complexity |
The Best of Both Worlds: Get Pyramid's proven robustness, security, and flexibility with the convenience of automatic validation and documentation.
📚 Learn More
- 📖 Full Documentation - Complete guides and API reference
- 🚀 Getting Started - Step-by-step tutorial
- 💡 Examples - Complete blog API example with advanced features
- 🔒 Security Guide - Authentication and authorization
🤝 Contributing
We welcome contributions! Please see our Contributing Guide for details.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for pyramid-capstone 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyramid_capstone-0.2.0.tar.gz | 18.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyramid_capstone-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 39.8 kB
Release files / pyramid_capstone-0.2.0.tar.gz
| Download URL | pyramid_capstone-0.2.0.tar.gz |
|---|---|
| Size | 18.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f95d6a880745c86bf139321a3566f54db549d778084b265abe43d1f3bbe5d907
|
|
BLAKE2b-256 checksum How to use checksums |
8e48b4f29377abdc372a6fec6c0894f548d425021c90b32d186e37104a4355d1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 17, 2026.
Transparency logRelease files / pyramid_capstone-0.2.0-py3-none-any.whl
| Download URL | pyramid_capstone-0.2.0-py3-none-any.whl |
|---|---|
| Size | 21.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
48634b22ae312d6faf817871663151194bf7da5b42a9d438ed394251ea1edc0f
|
|
BLAKE2b-256 checksum How to use checksums |
97d16c8c7cc48d55546b1377922c73d50f4ed823f9085765be5ca0de9f80c433
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Mar 17, 2026.
Transparency log