Skip to content

alexanderGerbik/flask-template-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Flask template app

Just a suite of approaches which I find useful.

Commands

Run database schema migrations:

alembic upgrade head

Generate secret key:

tr -dc 'a-z0-9!@#$%^&*(-_=+)' < /dev/urandom | head -c50

Generate RSA private/public key pair:

openssl genrsa -out private_key_file.pem 4096
openssl rsa -in private_key_file.pem -outform PEM -pubout -out public_key_file.pem

Run unit tests

  1. Install poetry
  2. Install project dependencies (run in the root directory):
    poetry install
  3. Set following environment variables (use .env file):
    export PYTHONPATH=src
    # optional: export TEST_DATABASE_URL=postgresql://postgres:password@localhost:port/test_db_name
  4. Run tests:
    poetry run pytest
    or
    poetry shell
    pytest

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published