Giter Club home page Giter Club logo

openfda's Introduction

OpenFDA

JSON File Location

  1. https://open.fda.gov/apis/drug/ndc/download/
  2. Unzip and rename 'drug-ndc.json'
  3. Place JSON file in ./data/ folder

Run in venv

  1. Clone repo
  2. Enter repo: cd OpenFDA
  3. Create virtual environment: python3 -m venv ./venv
  4. Enter venv: source venv/bin/activate
  5. Install requirements: pip3 install -r requirements.txt
  6. Run DB loader: python app/load_data.py
  7. Run Cherrypy server: python app/serve_data.py

Run in docker

  1. First run to load DB: docker-compose up --build
  2. Once DB created: docker-compose -f docker-compose.prod.yml up --build
  3. Destroy entire build, including DB: docker-compose down -v

openfda's People

Contributors

finish06 avatar yevgenybulochnik avatar hl1 avatar

Stargazers

 avatar  avatar  avatar

Watchers

James Cloos avatar Joseph LeGrand avatar  avatar Seth S avatar  avatar  avatar

Forkers

finish06

openfda's Issues

Python package management

Wanted to create this issue mostly as food for thought. How do you guys feel about using a python package management lib, like pipenv or poetry. Both libraries are helpful to pin dependency versions and make dependencies easier to manage (install and update).

If these are kinda overkill at this point we may want to create a requirements.txt to pin dependency versions. This isnt a huge deal at this point but we may want to consider this. With the current setup when the docker image is built it will install the latest versions of all the python libraries. This may lead to some users having different versions of these libraries as they develop code for this.

Remove hardcoded data filename

Currently to load data into the database a file must be present in data/. This file name is currently hardcoded. I would suggest we come up with a solution to remove this dependency. This issue is likely dependent on #15

Adjust logger file name

Currently the logger will generate log names based on hour minute second. This is slightly problematic as the dev server will create new logs on every file change. The dev server auto reloads on file changes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.