Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python/Django REST API Architecture

I'm trying to build a niche social network like Instagram as a Python/Django application.

So the things I need, regarding architecture, are (I guess):

  1. REST API (e.g. api.mystagram.com).
  2. Public website (www.mystagram.com or mystagram.com).
  3. URL shortener (e.g. mystagr.am).
  4. Android app
  5. iPhone app
  6. Windows Phone app
  7. ...

Before this I only built simple to some less-simple websites, but never extremely complex with own custom APIs or so. I have never build my own REST API before (I have used other REST APIs though) or even built an Android/iPhone app and distributed it in the Play Store/App Store (I have made some typical hello world examples though).

So, the most important thing to me seems to create a kick-ass REST API first and proceed from there. I am blocked however by a few questions.

  1. How should I organize the projects for the public website and REST API? Should these be separate Django projects or should I create only one Django project and add both the public website and REST API as an internal Django module?
  2. Should the public website also make use of the REST API? Or is it better to just use the plain Django models for this?

Thanks in advance for any help! If somebody knows some great presentations or so on this topic (architecture), always welcome!

Kind regards, Kristof

like image 640
Braek Avatar asked Sep 05 '13 19:09

Braek


People also ask

What is Django rest Framework architecture?

Django REST framework is an open source, flexible and fully-featured library with modular and customizable architecture that aims at building sophisticated web APIs and uses Python and Django.

Is Django GOOD FOR REST API?

Django REST framework (DRF) is a powerful and flexible toolkit for building Web APIs. Its main benefit is that it makes serialization much easier. Django REST framework is based on Django's class-based views, so it's an excellent option if you're familiar with Django.

What is the difference between Django and Django REST API?

Django is the web development framework in python whereas the Django Rest Framework is the library used in Django to build Rest APIs. Django Rest Framework is especially designed to make the CRUD operations easier to design in Django. Django Rest Framework makes it easy to use your Django Server as an REST API.


1 Answers

Django REST Framework

https://github.com/tomchristie/django-rest-framework

Very well maintained, great documentation, easy to use.

like image 156
stormlifter Avatar answered Oct 05 '22 08:10

stormlifter