Python query module versus urllib.request versus javascript using jQuery / ajax in a production environment

I am writing a small program that uses an API. The program uses Python with JSON requests and a request module. it makes an HTTP request and the API returns json data. Then I will do something for the data.

he looks like this.

import json, requests

url = 'http://maps.googleapis.com/maps/api/directions/json'
params = {...}

resp = requests.get(url=url, params=params)
data = json.loads(resp.text)
#do something with data

However, I begin to wonder about 3 specific questions about my choice of language and design:

  • Currently, it’s obvious that I am the only one who uses this program, but ultimately, if I publish this program, it means that more than one person will use it. Should my choice of language and module be different when it comes to the production environment?

  • , urllib.request ? urllib HTTP-.

  • , Python? Python, . , JavaScript. JQuery AJAX . ? , ?

.


: , , , .

, , . , JSON API? ? , ? ?

+4
1
  • . , , urllib2
  • . - CLI GUI, JS, , , -. Kivy CLICK
  • - , . , , , , , .
+1

Source: https://habr.com/ru/post/1684267/


All Articles