Skip to content

smartlab-br/datahub-api

Repository files navigation

SmartLab Flask

QA Quality Gate Status

Flask for SmartLab developers

==> Environment for development in Flask in MPT

 > Run app with pure Flask
   docker run -p 8080:5000 -d -v /path/app:/app smartlab/flask

 > Run app with uWSGI
   docker run -p 8080:5000 -d -v /path/app:/app smartlab/flask uwsgi

 > Run app in debug mode
   docker run -p 8080:5000 -d -v /path/app:/app smartlab/flask debug

 > Run tools to test code quality
   docker run -p 8080:5000 -d -v /path/app:/app smartlab/flask test

 > Run terminal to inspect container
   docker run -p 8080:5000 -it -v /path/app:/app smartlab/flask terminal

Note: the main file must be named as main.py

Running with docker-compose

Before you start

Install Kerberos dependencies

  • Ubuntu: sudo apt get install krb5-user
  • MacOS: brew install kerb5

Dependencies

Make sure you have the following files in place:

  • An .env.local with at least the values as shown in .env.template
  • Valid cacert.pem
  • A conf_repo.yaml with the content that should fill the CONF_REPO env variable
  • Kerberos resources: krb5.conf, krb5.keytab, krb5_tgt

Run

source local_compose_start.sh <YOUR_USERNAME>

You will be prompted for password.

Third-party components used in our platform

Flask
Copyright © 2010 by the Pallets team - BSD 3-Clause License

Flask-RESTful
Copyright © 2018, Kevin Burke, Kyle Conroy, Ryan Horn, Frank Stratton, Guillaume Binet - BSD License

Flask-CORS
Copyright © 2013, Cory Dolphin - MIT License

Flask-RESTful-Swagger
Copyright © 2016, Sobolev Nikita - MIT License

Pandas
Copyright © 2008-2012, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team - BSD 3-Clause License

Pylint
Copyright © 1989, 1991 Free Software Foundation, Inc. - GNU General Public License v2.0

Nose2
Copyright © 2012, Jason Pellerin - BSD 3-Clause License

NumPy
Copyright © 2019 NumPy developers - BSD 3-Clause License

Impyla
Copyright © Impyla developers - Apache 2.0 License

Kazoo
Copyright © 2011-2014, Kazoo team - Apache 2.0 License

Babel
Copyright © 2018, The Babel Team - BSD 3-Clause License

Ansi Colors
Copyright © 2012 Giorgos Verigakis - ISC License

Requests
Copyright © 2018 Kenneth Reitz - Apache 2.0 License

PyYAML
Copyright © 2017-2019 Ingy döt Net, Copyright © 2006-2016 Kirill Simonov - MIT License

About

Flask REST-API to expose public data present in Smartlab's datalake.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 5

Languages