Skip to content

garden-share-08/location-microservice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Garden-Share: Location Microservice

Overview

This repository is a microservice for the Garden-Share application. It's sole purpose is to collect an array of zip codes that fall within a specified mile radius and origin zip code.

All repositories in the Garden-Share project can be found here.

Table of Contents

Installation Instructions

  1. Clone the repository.
  2. Set up a virtual environment: python3 -m venv ./venv
    i. To shut off the virtual environment: deactivate
  3. Activate virtual environment: source venv/bin/activate
  4. Install Python packages: pip3 install -r requirements.txt
    i. If you get a ImportError: No module named dotenv error, shut off the virtual environment and run pip3 python-dotenv in the command line to install dotenv globally.
  5. Create a .env file in the root directory and add a ZIPCODE_API_KEY key with your registered api key as its value. (See the .env_example file as an example).
    i. Go to this website to register for a free api key.

Run Tests

  1. Run pytest in terminal
  2. Keep in mind, that your api key has a rate limit of 50 requests/hour (for the first 2 weeks) and 10 requests/hour after that.

The Python Equivalent to Pry

  1. Place code snippet at location where you want to break execution: import ipdb; ipdb.set_trace()
    i. If you want to break execution when running a test, use pytest -s

Authors

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages