Create API by Python

Last renew: July 5, 2022 pm

Framework:Django

The Description of Django:

Django is a open-source web application framework writted by Python.

Django is based on MVC model (MVC = Model + View + Controller)

The merits of Django:

  1. Powerful database functions
  2. Powerful backend functions
  3. Elegant URL

MVC model

The diagram of MVC model.

![截屏2022-05-03 09.06.44](Create-API-by-Python/截屏2022-05-03 09.06.44.png)

The merits of MVC model:

  1. low coupling
  2. Fast development
  3. Easy to deploy
  4. High reusability
  5. Low maintenance cost

Install django for mac with anaconda environment

Open the terminal of Pycharm and write:

1
2
3
pip install Django

pip install djangorestframework

Then we are ready to finish the installation.