gardenbuilder-app / gardenbuilder-backend-python

Django-based REST API
6 stars 11 forks source link

query that pulls fruit/vegetable info from Trefle API #47

Open rexdivakar opened 3 years ago

rexdivakar commented 3 years ago

Related to:

Resolves: #issueNumber

Description:

A short description of what you did, and why.

Tests:

Description of any tests you may have written to support this feature, if any. Tests are appreciated for all features of the app.

Checklist:

Please put an x in each box that you have completed

rexdivakar commented 3 years ago

Hey @capndave I have added the query part and a database for storing and returning data too

As you know Hactobesfest rule is change in Repo: Hactobesfest label and in PR: Hactobesfest-accepted label should be there then It will count In my PR Hactobesfest-accepted are show if can Please can u change the labels !! Also validate my work and close this PR

rexdivakar commented 3 years ago

Please remove myself as a maintainer so my PR gets approved by Hacktoberfest and let me know if u need a automated cache system that can update the database once in a while so we dont need to pull data often from the source thus making efficient and redis usage is not needed since the usage limit is less.

Please share ur comments on this @capndave

rexdivakar commented 3 years ago

1) Regarding .json files its easier to maintain sqlite file where we can add in multiple tables based on our requirements and parsing them is much easier and efficient 2) We can upgrade to other databases but i wasn't aware of ur full needs and the way u deploy !! if u feel the needs are huge yeah sure we can go for PostgreSQL which offers much flexibility in future.

3) We can add a function to cache the data for easier day load, if u wish please create an issue and assign me once i complete the database part i can add it for ur application.

If u don't mind may be we can connect to discuss about the way u are planning to pull data so i can modify the existing setup suiting the application needs !! @capndave let me know what u feel

capndave commented 3 years ago

I'd like to:

  1. Add the query mentioned above to schema.py, test, ensure it works. I can work on this shortly or I can assign it to you if you'd prefer.
  2. We talk about the best way to do the caching/storage. Maybe a google meeting?
  3. We implement that.

Let me know your thoughts!

rexdivakar commented 3 years ago

Kindly drop a mail invite to rexdivakar@gmail.com and lets connect to discuss about the work

capndave commented 3 years ago

@rexdivakar just sent you an email link