Skip to content

Usage for register, find and search partners based on GeoJson with MongoDB

Notifications You must be signed in to change notification settings

srdantas/partner-sales-points

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Partner sales points

Usage for the register, find and search partners based on GEOJson with MongoDB.

Requirements

  • python3.8
  • docker
  • mongodb

Structure

Has three modules:

  • database: access to database and queries for run.
  • partners: views and services with business rules there.
  • tests: all unit tests off app inside there.

Run

This app required a localhost instance of mongodb running, for it you can use the docker compose that exists there. And for run by docker compose run this:

docker-compose up

And for run, as a flask app:

export FLASK_ENV=development && \
export FLASK_APP=partners && \
pip install . && \
flask run

Tests

All tests found here run with testcontainer-python. Why? because I cant found a good option of embedded mongo for unittests and testcontainers are a so good framework

For run tests you need install packages that required to run that:

pip install '.[tests]'
pytest

Build a docker image

for build, run this command:

docker build -t partner-sales-points .

for run that:

docker run -p 5000:5000 partner-sales-points

About

Usage for register, find and search partners based on GeoJson with MongoDB

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published