đŸ““ programming/python/best-practices.md by @karlicoss ☆

Table of Contents

testing [[testing]]

nose is abandoned

pytest is the best apparently [[pytest]]

logging

simple

import logging
logging.basicConfig(level=logging.INFO) # apparently callin basicconfig at least one is important
logging.exception('Caught an error' + str(e))

use logzero for nice colored logs

json [[json]]

json.dump(jobj, stdout, indent=4, sort_keys=True, ensure_ascii=False)

asyncio

[2020-02-12] Guido van Rossum on Twitter: "@jonasrk You missed mypy. Simpler docs use markdown, not ReST (Sphinx). Black is overrated unless your team argues over style a lot. You don’t need Pylint if you’re using flake8. Never heard of poetry or dependabot. And you should use a CI solution, e.g. Travis-CI, to run your tests." / Twitter <https://twitter.com/gvanrossum/status/1227126706089021440 >

You don't need Pylint if you're using flake8

hmm

[2018-05-08] configuration via class variables – not great while testing since configuration has to be reloaded…

write about setting up elaborate python project + circleci? maybe demonstrate on grasp? [[ci]]