Lean python boilerplate template for creating new projects.
By default make will use Python 3.9
as defualt python version. You can change
it โPYTHON_VERSION
, in Makefile, or define in os environment
or in .env.
In to order setup the repo run below command. This will install virtualenv
,
requirements
and pre-commit
.
$ make setup
Config comes from logging.ini file. Example usage:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import logging
from logging.config import fileConfig
fileConfig('logging.ini')
logger = logging.getLogger(__name__)
name = "YourName"
logger.info(f"Hello {name}")
logger.debug('This message should go to the log file')
logger.info('So should this')
logger.warning('And this, too')
For more info about logging look at this article: Python Logging Config.