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.0a0.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.0a0-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mangoapi_framework-0.1.0a0.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.0a0.tar.gz
Algorithm Hash digest
SHA256 cd40ef30694454a705aff47721ba1e9ff04cf71a4cc4016ef80a535bee241f3e
MD5 9f465c806d76a8cf2fb18167f2b8810b
BLAKE2b-256 8dd32cdc1c6c9bbe34115dba1fd856df299c12715095231dcaa6ede83b5d6fe8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for mangoapi_framework-0.1.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 18b4a037c31456d0d9e23000664cad782903a91806f8c5320cf5b9645ed4fe11
MD5 b5d8b037e8463e3abfebb0e288590c3c
BLAKE2b-256 849e0f02db5262de004807cba13bb36d2a37ddc199a62b1dd51fe796ba6377be

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