B
B
Bjornie2017-05-06 13:43:35
Django
Bjornie, 2017-05-06 13:43:35

How is a Django project made using someone else's API?

I want to make my own project that uses a free API, collects this data at regular intervals (because there are limits), processes it and gives it to the client. I use Django as a framework.
I have already worked with their API by writing my script with requests and cached the data - everything works.
Now I want to understand how to correctly implement the project structure, as I described in the 1st paragraph.
Most of all, it is not clear to me whether I should access the API outside of Django, write data somewhere, and Django will already access the database (for example). Or Django should work directly with the API, respecting caching, etc.
I have not yet had experience in developing such applications, but I really want to try. Tell me where to start? What libraries should be used and what is the order of development?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dimonchik, 2017-05-06
@dimonchik2013

something like this , but it all depends on the tasks
, usually third-party resources are robbed in the background, there are options for Python:
1) just Gearman / RabbitMQ queues (there are excellent manuals)
2) Celery , well integrated with Dzhanga, but still complicated

S
sim3x, 2017-05-06
@sim3x

API has
- restrictions on requests that you do not fit into
- stupid
= save to ourselves, give the user from our database
if not
- we request the API directly in the view

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question