packaging

3 tutorial series · 9 posts

Posts

The State Of Python ‘setuptools’ ‘pyproject.toml’ Packaging In 2024

Pleasantly surprised when revisiting python packaging with setuptools and TOML in 2024.

Working With Git Submodules

Using Git Submodules with your python packages helps stop you from re-inventing the wheel. Make one wheel, and use it in every project. Let me show you how.

Reading & Writing To An SQLite3 Database Inside A Python Package

You might need to store data at the package level, take a look at the following package structure. I am going to show you how to create, read and write to a database at the package level. This means that when a user installs your package, you could store data in the python package. We’re...

Reading & Writing To Datafiles Inside A Package

There may be occasions where you want to store application data and configuration files outside of the reach of your users, and store it directly in the package files themselves.

Python Parsing Command Line Arguments With argparse

The python package ‘argparse’ is a highly versatile and customizable command line parser. I’m going to show you a handful of examples that should cover most of your use cases, if not you can reference the full ‘argparse’ documentation here. Come on – let’s take a look. Prerequisites Although you could apply the examples we...

Python Packages As Callable Console Commands

Wouldn't you like to be able to wrap up all of your cool code in to a package, and then call your code from the command line using a user friendly command name? Sure you do! Come on, let me show you how.

Bumper Python Package Installation Guide

There are a couple of different ways to install python packages. Come on, let's take a look at them.

Python Package Interactive Install / Editable Install With “pyproject.toml”

I've got a good one for you today. What a ride. It seems I have caught "setuptools" at a transitional moment. Installing python packages in editable / development mode with TOML "pyproject.toml" files is now possible - but a little rough around the edges for now. Come on - let's take a look.

Python Packaging – Using “setuptools”, “pyproject.toml”

You need to know how to package your python projects properly. Here I show you how to package, and submit your package to your very own pypi.org repository. I create the package "pkgexample" version 1.0.1 , your package name will vary if you follow along.