Skip to content

code4mk/fastapi-pundra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FastAPI Pundra

PyPI version Python 3.10+ License: MIT Downloads

Pundra: Your FastAPI Companion for Productivity

FastAPI Pundra is a comprehensive toolkit that extends FastAPI with essential utilities, helpers, and integrations to accelerate your API development. Whether you're building REST APIs or GraphQL endpoints, Pundra provides the building blocks you need to create robust, scalable applications.



✨ Why FastAPI Pundra?

  • 🚀 Zero Boilerplate: Auto-discover routes, automatic pagination, built-in exception handling
  • 🔋 Batteries Included: Email system, JWT auth, GraphQL support, raw SQL utilities out of the box
  • 📦 Production Ready: Battle-tested utilities for password hashing, validation, and error handling
  • 🎯 Developer Experience: Write less code, focus on business logic, ship faster

🚀 Features

  • 🔧 Common Utilities: Password hashing, JWT auth, raw SQL support, helper functions
  • 📧 Email System: Template-based emails, background tasks, mail templating with inline CSS
  • 🌐 REST API: Auto router registration, exception handling, pagination, validation helpers
  • 🍓 GraphQL (Strawberry): Common types, pagination, resolver utilities, validation integration

📖 Explore all features in detail →

📦 Installation

Using pip:

pip install fastapi-pundra

Using uv (recommended for faster installation):

uv pip install fastapi-pundra

Or add to your project:

uv add fastapi-pundra

⚡ Quick Start (30 Seconds)

from fastapi import FastAPI
from fastapi_pundra.rest import auto_bind_router
from fastapi_pundra.rest.global_exception_handler import setup_exception_handlers

app = FastAPI()

# Setup global exception handling
setup_exception_handlers(app)

# Auto-discover and bind all API routes
router = APIRouter()
auto_bind_router(router, "app.api")
app.include_router(router)

Project Structure:

app/
└── api/
    ├── health.py      # → /health/*
    └── v1/
        ├── users.py   # → /v1/users/*
        └── posts.py   # → /v1/posts/*

📖 View complete tutorials and examples →

🔧 Key Features Showcase

Auto Router Registration

No more manual router imports! Pundra automatically discovers and registers all your API routes.

Email System

Send beautiful HTML emails with templates and background tasks using FastAPI's native BackgroundTasks.

REST & GraphQL

Comprehensive utilities for both REST APIs and GraphQL (Strawberry) endpoints.

📖 See detailed examples and configuration →

📚 Documentation & Resources

🌐 Full Documentation Site ← Start here!

Quick Links:

💬 Community & Support

  • 📖 Documentation - Comprehensive guides and tutorials
  • 🐛 Issues - Report bugs or request features
  • 💡 Discussions - Ask questions and share ideas
  • 🔗 LinkedIn - Follow for updates
  • 📧 Email - Direct support

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

For major changes, please open an issue first to discuss what you would like to change.

📖 Contributing Guide →

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

👨‍💻 Author

Mostafa Kamal (@code4mk)

🙏 Acknowledgments

Built with these amazing tools:


Made with ❤️ for the FastAPI community

⭐ Star us on GitHub | 📖 Read the Docs

About

FastAPI Pundra: Your FastAPI Companion for Productivity

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published