/Python-basic-template

Basic starter template for python projects

Primary LanguagePythonMIT LicenseMIT

Python Basic Template

Basic template for starting python projects quickly

Table of Contents

How to set up

  1. Install requirements.

    $ pip install -r requirements.txt
  2. Create a .env file.

    This file will hold all of your environment variables such as your passwords or any other sensitive information. Example .env file:

    export JOB_CONFIG=conf.dev_config
    export DB_PASS=pass123
  3. Export .env variables (Skip if you installed the requirements).

    If you installed the requirements for this template, python-dotenv will export any environment variables for you and this step will be done automatically when you run the script.

    If you do not have python-dotenv, you can just run the following to manually export the variables:

    $ source .env

How to run

$ python app.py

Tests

Tests are in the tests directory

Run tests with:

$ pytest tests -v -s