FDA / openfda

openFDA is an FDA project to provide open APIs, raw data downloads, documentation and examples, and a developer community for an important collection of FDA public datasets.
https://open.fda.gov
Creative Commons Zero v1.0 Universal
572 stars 132 forks source link

Python 3 Support #114

Closed paulbsanders closed 4 years ago

paulbsanders commented 4 years ago

With Python 2 coming to end of life on January 1, will support for Python 3 be added to this project?

dkrylovsb commented 4 years ago

We're looking into this.

JCui2017 commented 4 years ago

I tested the code below in Python 3 and it works nicely:

import requests
import json

url = 'https://api.fda.gov/drug/ndc.json?search=brand_name:"zyrtec"&limit=1'
r = requests.get(url)

print(json.dumps(r.json(), indent=2))
dkrylovsb commented 4 years ago

Done.