#π Django and FASTApi Help
36 messages Β· Page 1 of 1 (latest)
@sage blade
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
you should be using Django or FastAPI for everything, you generally don't combine them
django has DRF
for making resful apis
or you could just return a JSON response in django
look at django docs
its great
Yeah. But i am an intern and the person wants me to mount the Django's WSGI appplication inside the FastAPI's ASGI Application. Which creates a single entry point.
so you would have two backend servers?
also, a lot of Django tutorials are for 3.x and 4.x, not even 5.x and 6.x was released just before the end of 2025
the official docs on the other hand is always up to date
The end project has must have a streaming capability and i have to design an api. Which toggles the camera or a .py file.
Like i said i have no idea what the person wants. Do you want me to explaing the whole project ?
I think he just want me run Locally and see if it works. or If i can make it work.
ah idk really i never tried it.
Would you be using Django REST Framework or Django Ninja or something else for the Django API?
Django REST Framework. i think Django Ninja already has features which FastAPI has.
Both DRF and Django Ninja has similar features to FastAPI. Not sure why you would need 2 different API backends
Here's a tutorial where its up to date with the latest version of DRF. https://www.django-rest-framework.org/tutorial/quickstart/
Django REST framework - Web APIs for Django
Okay. Here's the thing . There's a .py file which initiates camera and saves some data and picture into database. I want to make backend api to toggle it all in one click. Let's say a start button (UI) which runs .py file(the .py file saves data, this can be modified). And starts sending data from server to UI.
you can include a .py file instead of running it as an external process
Is this py file in Django or FastAPI or a completely separate script?
Seperate script.
How to do that ?
Then you can plug that in to whatever existing API. Doesn't need to be a separate process.
There is no EXISTING API i have to design it. I just made Models and Views. for the Database and routing.
Personally, I prefer Django Ninja. Its simpler than DRF
Alright. Is there a documentation for DJango NInja where i can see the tutorial. ?
Django Ninja - Django REST framework with high performance, easy to learn, fast to code.
Also can you guys tell what would be your approach for this ?
Thanks. π
This help channel has been closed. Feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.