rajjix / poke_api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pokermon API

Python 3.7

After the disaster that happened in Oak town, Professor Oak decided that enough is enough, and he wants to share whatever data he managed to save from his labs with the public. Fortuantely, he contacted me and asked me to setup an API for people to be able to learn and study more about pokemon to prevent such disasters from ever happening again.

API Overview

This API is pretty simple and it depends on two mainstream opensource libraries

And another to help with testing our code.

Running locally

In order to setup this locally follow these steps after cloning the project.

  • setup python environment with: python -m venv env && source env/bin/activate

  • install requirements with: pip install -r requirements.txt

  • There are two main scripts.

  1. python run_server.py [--port <port_number>] [--debug] [--migrate]

    This script will run the server.

    --migrate   Flag to run migrations. REQUIRED ON FIRST RUN

    --port        To run on a different port (default 5000)

    --debug      For debuffing and hot reloading

  2. python execute.py import_pokemon --path ./Data/pokemon.csv

    This currently only support one command import_pokemon to import pokemon from a csv file into the database.

Testing

in order to execute tests, run pytest

About


Languages

Language:Python 100.0%