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-framework

🧪 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

Apache-2.0

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.0a1.tar.gz (13.4 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.0a1-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mangoapi_framework-0.1.0a1.tar.gz
  • Upload date:
  • Size: 13.4 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.0a1.tar.gz
Algorithm Hash digest
SHA256 cd1c7e1597aa2188a6279cf25403df3f6f375f2b77b672ad8ed04f9c58433ae3
MD5 1fc5abd38c2315b25fc5f59cd5477e67
BLAKE2b-256 31c1d6d7335681c22b28472e6212c98ca885d121f2c8cb14b5aaccc4167b161e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mangoapi_framework-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 95ab4047e6cca70db32a1d51c451ba1025adc31ac5376c5d3d064bd432e418de
MD5 daa31f598bdd8183a3817822f876ddea
BLAKE2b-256 f8717ab52498ae2e6db185d5bff5b6b56e9907783b56065fffb077e57d377d0d

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