Publish a package on PyPi using Poetry

First thing first, you need Poetry if you don’t have it already.

Poetry is the new standard for creating and managing virtual environment for your Python project. It is also a Python dependency management tool that is working differently as pip. It uses the new standard pyproject.toml decided by the Python Packaging Authority with PEP-518. This file merges all the previous config files that were necessary before,, requirements.txt, setup.cfg, et Pipfile, in one unique file to rule them all ! Ok, enough of Lord of the Ring.

I advise you to follow along with the documentation of poetry open.

4 minute read…

Using environment variables in a Flask + Heroku project

Using environment variables is fundamental in a project. This is how you tell your app if you are running in production or locally for example. This is where you also store more sensible information like SECRET_KEY or API credentials. Storing those directly in your web app code can be easy at first, but it is not safe when you will push your code in production, so taking good habits from the beginning is a good idea.

Before jumping in the topic of configuring environment variables, I will first make you set up and deploy a basic app.

5 minute read…