Skip to main content

Modern lightweight framework for building async APIs on top of Django

Project description

🍋 MangoAPI

MangoAPI is a lightweight meta-framework that lets you build modern, clean and asynchronous APIs inside a traditional Django project.

It integrates Starlette for async routing, while preserving Django’s admin, ORM, and all core functionality.


🚀 Features

  • Clean sintaxis.
  • Powered by Starlette for async support.
  • Fully compatible with Django admin, ORM, and views.
  • Minimal and zero-boilerplate setup.

🔧 Django Integration

  • Your Django project continues to work as usual (/admin, ORM, templates).
  • Async routes are automatically mounted under /api.

🎯 Why MangoAPI?

Because you want the best of both worlds:

  • Django’s power and ecosystem.
  • The speed and modernity of async APIs.

⚙️ Installation

pip install mangoapi

🧪 Quick Example

1- Create a django project:

django-admin startproject project .

2- Create a api django app:

python3 manage.py startapp appname

3- Add de app in your settings:

# project/settings.py
INSTALLED_APPS = [
    ....

    "api",
]

4- Create inside your project directory a api.py file:

# project/api.py
from mangoapi import MangoAPI
from api.routes.hello import router as hello_router

app = MangoAPI()
app.include_router(hello_router)

5- Delete all in asgi.py and add te MangoAPI app inside:

from mangoapi_demo.api import app

application = app

6- Create a new endpoint

# api/routes/hello.py
from mangoapi import Router

router = Router(prefix="/hello")

@router.get("/")
async def say_hello(name: str = "world"):
    return {"message": f"Hello {name} 👋"}

6- Run the app

mangoapi run

7- Test

GET http://localhost:8000/api/hello/?name=Mango

👤 Author

Built by Leandro Carriego(https://github.com/leandrocarriego)


📄 License

MIT

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

mangoapi_framework-0.1.0.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

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

mangoapi_framework-0.1.0-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file mangoapi_framework-0.1.0.tar.gz.

File metadata

  • Download URL: mangoapi_framework-0.1.0.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for mangoapi_framework-0.1.0.tar.gz
Algorithm Hash digest
SHA256 20ea8797a05ac1346dcf7e86d87b4622528b0fadeec36093a100a66cec32a01a
MD5 23b7b1b9a2a0700cb388562ed2e06643
BLAKE2b-256 30b56c98440c2179fef81d8c855bca61643069a08719dc44cfa60c12116d761d

See more details on using hashes here.

File details

Details for the file mangoapi_framework-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mangoapi_framework-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a3ff73e35d08f9a4ec376356a56287252f3f35cace3150408756eeea0bebc73c
MD5 7d3728182ace0442c343a6220912fe2c
BLAKE2b-256 ef2ba3d5df3542ca4bcc92d2868eb24533622e3bf7c79cb9f56010ace388f8c9

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