Poetry is an amazing tool for dependency management and packaging in Python. When used together with other amazing libraries such as flake8, mkdocs and many others, you can create Pro Python Projects everty single time.
This is a bash script that performs simple scaffolding for you and configures all the tools you need based on This Brilliant Article. The only main deviation from the article is that we use mkdocs
and not sphinx
coz i find the tooling simpler and better.
To install on Linux, run the command below:
curl https://raw.githubusercontent.com/mugendi/poetry-project-scaffold/master/install.sh | bash
This simply loads and runs install.sh
Which fetches poetry-project.sh
, saves it in ~/.local/bin
directory.
If you are not running Linux or do not have the ~/.local/bin
directory, then you can try manual installtion.
For non-linux systems, you can attempt the following installation procedure.
-
Clone this repo:
git clone https://github.com/mugendi/poetry-project-scaffold.git
-
Navigate to cloned repo dir:
cd poetry-project-scaffold
-
Copy poetry-project.sh :
cp poetry-project.sh poetry-project
-
Make poetry-project executable:
chmod +x poetry-project
-
Either run poetry-project from this directory
./poetry-project
or move it to a folder that is$PATH
accessible.
Simply run the poetry-project script: bash poetry-project
To help you visualize what kind of poetry project is generated, we created a dummy project repo and deployed the documentation (mkdocs gh-deploy
) without changing anything.
I have documented some of the functions used in this bash script HERE mostly because most took a lot of googling to put together and because I would love to re-use most in other projects with ease.
You can have a look too and see if anything there is of benefit to you!