The work on PySnooper [1] by cool-RR [2].
Never use print for debugging again
References:
[1]: https://github.com/cool-RR/PySnooper
[2]: https://github.com/cool-RR
Archive
All published posts
2507 posts
latest post 2026-05-29
Publishing rhythm
I just shared some ssh keys with myself and ran into this error telling me that
I did not set the correct permissions on my key.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0750 for '/home/waylon/.ssh/id_*******' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "/home/waylon/.ssh/id_*******": bad Permissions
repo: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I changed them with the following commands.
chmod 644 ~/.ssh/id_*******.pub
chmod 600 ~/.ssh/id_*******
Mr-Destructive [1] has done a fantastic job with djankata [2]. Highly recommend taking a look.
Django + Markata blog starter
References:
[1]: https://github.com/Mr-Destructive
[2]: https://github.com/Mr-Destructive/djankata
Check out nvim [1] by Allaman [2]. It’s a well-crafted project with great potential.
Minimal, blazingly fast, and pure Lua based Neovim configuration for my work as DevOps/Cloud Engineer with batteries included for Python, Golang, and, of course, YAML
References:
[1]: https://github.com/Allaman/nvim
[2]: https://github.com/Allaman
Looking for inspiration? dotfiles [1] by jessarcher [2].
$HOME sweet $HOME
References:
[1]: https://github.com/jessarcher/dotfiles
[2]: https://github.com/jessarcher
With the latest release of version of nvim 0.8.0 we get access to a new winbar
feature. One thing I have long wanted somewhere in my nvim is navigation for
pairing partners or anyone watching can keep track of where I am. As the
driver it’s easy to keep track of the file/function you are in. But when you
make big jumps in a few keystrokes it can be quite disorienting to anyone
watching, and having this feedback to look at is very helpful.
[1]
winbar # [2]
nvim exposes the winbar api in lua, and you can send any text to the winbar as follows.
vim.o.winbar = "here"
You can try it for yourself right from the nvim command line.
:lua vim.o.winbar = "here"
Now you will notice one line above your file with the word here at the very
beginning.
Clearing the winbar # [3]
If you want to clear it out, you can just set it to an empty string or nil.
:lua vim.o.winbar = ""
:lua vim.o.winbar = nil
Setting up nvim-navic # [4]
You will need to install nvim-navic if you want to use it. I added it to my
plugins using Plug as follows.
call plug#begin('~/.local/share/nvim/plugged')
Plug 'SmiteshP/nvim-navic'
call plug#end()
Note! nvim-navic does require the use of the nvim lsp, so if you ...
Just starred nvim-navic [1] by SmiteshP [2]. It’s an exciting project with a lot to offer.
Simple winbar/statusline plugin that shows your current code context
References:
[1]: https://github.com/SmiteshP/nvim-navic
[2]: https://github.com/SmiteshP
I came across winbar.nvim [1] from fgheng [2], and it’s packed with great features and ideas.
winbar config for neovim
References:
[1]: https://github.com/fgheng/winbar.nvim
[2]: https://github.com/fgheng
Looking for inspiration? nvim-scrollbar [1] by petertriho [2].
Extensible Neovim Scrollbar
References:
[1]: https://github.com/petertriho/nvim-scrollbar
[2]: https://github.com/petertriho
Looking for inspiration? nvim-hlslens [1] by kevinhwang91 [2].
Hlsearch Lens for Neovim
References:
[1]: https://github.com/kevinhwang91/nvim-hlslens
[2]: https://github.com/kevinhwang91
I came across pre-commit [1] from pre-commit [2], and it’s packed with great features and ideas.
A framework for managing and maintaining multi-language pre-commit hooks.
References:
[1]: https://github.com/pre-commit/pre-commit
[2]: https://github.com/pre-commit
I really like having global cli command installed with pipx. Since textual
0.2.x (the css release) is out I want to be able to pop into textual devtools
easily from anywhere.
[1]
Pipx Install # [2]
You can pipx install textual.
pipx install textual
But if you try to run any textual cli commands you will run into a
ModuleNotFoundError, because you need to install the optional dev
dependencies.
Traceback (most recent call last):
File "/home/u_walkews/.local/bin/textual", line 5, in <module>
from textual.cli.cli import run
File "/home/u_walkews/.local/pipx/venvs/textual/lib/python3.10/site-packages/textual/cli/cli.py", line 4, in <module>
import click
ModuleNotFoundError: No module named 'click'
Pipx Inject # [3]
In order to install optional dependencies with pipx you need to first install
the library, then inject in the optional dependencies using the square bracket
syntax.
pipx install textual
pipx inject textual 'textual[dev]'
References:
[1]: https://stable-diffusion.waylonwalker.com/000359.2404332231.webp
[2]: #pipx-install
[3]: #pipx-inject
I am working through the textual tutorial, and I want to put it in a proper cli
that I can pip install and run the command without textual run --dev app.py.
This is a fine pattern, but I also want this to work when I don’t have a file
to run.
[1]
pyproject.toml entrypoints # [2]
I set up a new project running hatch new, and added the following entrypoint,
giving me a tutorial cli command to run.
...
[project.scripts]
tutorial = 'textual_tutorial.tui:tui'
https://waylonwalker.com/hatch-new-cli/
setup.py entrypoints # [3]
If you are using setup.py, you can set up entrypoints in the setup command.
from setuptools import setup
setup(
...
entry_points={
"console_scripts": ["tutorial = textual_tutorial.tui:tui"],
},
...
)
https://waylonwalker.com/minimal-python-package/
tui.py # [4]
adding features
Now to get devtools through a cli without running through textual run --dev.
I pulled open the textual cli source code, and this is what it does at the time
of writing.
Note: I used sys.argv as a way to implement a --dev quickly tutorial. For a
real project, I’d setup argparse, click, or typer. typer is my go to these
days, unless I am really trying to limit dependencies,...
I like AnH0ang’s [1] project kedro-aim [2].
A kedro plugin that enables logging to the ml experiment tracker aim
References:
[1]: https://github.com/AnH0ang
[2]: https://github.com/AnH0ang/kedro-aim
The work on PrismLauncher [1] by PrismLauncher [2].
A custom launcher for Minecraft that allows you to easily manage multiple installations of Minecraft at once (Fork of MultiMC)
References:
[1]: https://github.com/PrismLauncher/PrismLauncher
[2]: https://github.com/PrismLauncher
I’m really excited about learn-cloudformation [1], an amazing project by widdix [2]. It’s worth exploring!
Learn how to use Infrastructure as Code on AWS with the help of CloudFormation.
References:
[1]: https://github.com/widdix/learn-cloudformation
[2]: https://github.com/widdix
For far too long I have had to fidget with v4l2oloopback after reboot. I’ve
had this happen on ubuntu 18.04, 22.04, and arch.
After a reboot the start virtual camera button won’t work, It appears and is
clickable, but never turns on. Until I run this command.
sudo modprobe v4l2loopback video_nr=10 card_label="OBS Video Source" exclusive_caps=1
[1]
Today I learned that you can turn on kernel modules through some files in /etc/modules...
This is what I did to my arch system to get it to work right after boot.
echo "v4l2loopback" | sudo tee /etc/modules-load.d/v4l2loopback.conf
echo "options v4l2loopback video_nr=10 card_label=\"OBS Video Source\" exclusive_caps=1" | sudo tee /etc/modprobe.d/v4l2loopback.conf
References:
[1]: https://stable-diffusion.waylonwalker.com/000378.373882614.webp
I ran into an issue where I was unable to ask localstack for its status. I
would run the command and it would tell me that it didn’t have permission to
read files from my own home directory. Let’s fix it
The issue # [1]
I would run this to ask for the status.
localstack status
And get this error
PermissionError: [Errno 13] Permission denied: '/home/waylon/.cache/localstack/image_metadata'
What happened # [2]
It dawned on me that the first time I ran localstack was straight docker, not
the python cli. When docker runs it typically runs as root unless the
Dockerfile sets up a user and group for it.
[3]
How to fix it # [4]
If you have sudo access to the machine you are on you can recursively change
ownership to your user and group. I chose to just give myself ownership of my
whole ~/.cache directory you could choose a deeper directory if you want. I
feel pretty safe giving myself ownership to my own cache directory on my own
machine.
whoami
# waylon
chown -R waylon:waylon ~/.cache
Now it’s working # [5]
Running localstack status now gives me a nice status message rather than an
error.
❯ localstack status
┌─────────────────┬──────────────────────────────────────────────...
Markata now allows you to create jinja extensions that will be loaded right in
with nothing more than a pip install.
From the Changelog # [1]
The entry for 0.5.0.dev2 from markata’s changelog [2]
- Created entrypoint hook allowing for users to extend marka with jinja
exensions #60 0.5.0.dev2
[3]
markata-gh # [4]
The first example that you can use right now is markata-gh. It will render
repos by GitHub topic and user using the gh cli, which is available in github
actions!
Get it with a pip install
pip install markata-gh
Use it with some jinja in your markdown.
## Markata plugins
It uses the logged in uer by default.
{% gh_repo_list_topic "markata" %}
You can more explicitly grab your username, and a topic.
{% gh_repo_list_topic "waylonwalker", "personal-website" %}
How is this achieved # [5]
The jinja extension details are for another post, but this is how markata-gh
exposes itslef as a jinja extension.
class GhRepoListTopic(Extension):
tags = {"gh_repo_list_topic"}
def __init__(self, environment):
super().__init__(environment)
def parse(self, parser):
line_number = next(parser.stream).lineno
try:
args = parser.parse_tuple().items
except AttributeError:
...
In my adventure to learn django, I want to be able to setup REST api’s to feed
into dynamic front end sites. Potentially sites running react under the hood.
[1]
Install # [2]
To get started lets open up a todo app that I created with django-admin startproject todo.
pip install djangorestframework
Install APP # [3]
Now we need to declare rest_framwork as an INSTALLED_APP.
INSTALLED_APPS = [
...
"rest_framework",
...
]
create the api app # [4]
Next I will create all the files that I need to get the api running.
mkdir api
touch api/__init__.py api/serializers.py api/urls.py api/views.py
[5]
base/models.py # [6]
I already have the following model from last time I was playing with django. It
will suffice as it is not the focus of what I am learning for now.
Note the name of the model class is singular, this is becuase django will
automatically pluralize it in places like the admin panel, and you would end
up with Itemss.
from django.db import models
# Create your models here.
class Item(models.Model):
name = models.CharField(max_length=200)
created = models.DateTimeField(auto_now_add=True)
def __str__(self):
return f"{self.priority} {self.name}"
Next I will m...
I like openai’s [1] project whisper [2].
Robust Speech Recognition via Large-Scale Weak Supervision
References:
[1]: https://github.com/openai
[2]: https://github.com/openai/whisper
Markata now uses hatch as its build backend, and version bumping tool.
setup.py, and setup.cfg are completely gone.
[1]
0.5.0 is big # [2]
Markata 0.5.0 is now out, and it’s huge. Even though it’s the backend of this
blog I don’t actually have that many posts directly about it. I’ve used it a
bit for blog fuel in generic ways, like talking about pluggy and diskcache, but
very little have I even mentioned it.
Over the last month I made a big push to get 0.5.0 out, which adds a whole
bunch of new configurability to markata.
Here’s the changelog [3] entry.
- Moved to PEP 517 build #59 0.5.0.dev1
My Personal Simple CI/CD # [4]
Before cutting all of my personal projects over to hatch. The first thing I
did was to setup a solid github action,
hatch-action [5]that I can resue.
It automatically bumps versions, using pre-releases on all branches other than
main, with special branches for bumping major, minor, patch, dev, alha, beta,
and dev.
hatch new –init # [6]
To convert the project over to hatch, and get rid of setup.py/setup.cfg, I ran
hatch new --init. This automatically grabs all the metadata for the project
and makes a pyproject.toml that has most of what I need.
hat...
lkwq007 [1] has done a fantastic job with stablediffusion-infinity [2]. Highly recommend taking a look.
Outpainting with Stable Diffusion on an infinite canvas
References:
[1]: https://github.com/lkwq007
[2]: https://github.com/lkwq007/stablediffusion-infinity
Check out toumorokoshi [1] and their project deepmerge [2].
A deep merging tool for Python core data structures
References:
[1]: https://github.com/toumorokoshi
[2]: https://github.com/toumorokoshi/deepmerge
My next step into django made me realize that I do not have access to the admin panel, turns out that I need to create a cuper user first.
[1]
Run Migrations # [2]
Right away when trying to setup the superuser I ran into this issue
django.db.utils.OperationalError: no such table: auth_user
Back to the tutorial [3]
tells me that I need to run migrations to setup some tables for the
INSTALLED_APPS, django.contrib.admin being one of them.
python manage.py migrate
[4]
yes I am still running remote on from my chromebook.
python manage.py createsuperuser
[5]
The super user has been created.
[6]
CSRF FAILURE # [7]
My next issue trying to run off of a separate domain was a cross site request
forgery error.
Since this is a valid domain that we are hosting the app from we need to tell
Django that this is safe. We can do this again in the settings.py, but this
time the variable we need is not there out of the box and we need to add it.
CSRF_TRUSTED_ORIGINS = ['https://localhost.waylonwalker.com']
I made it!! # [8]
And we are in, and welcomed for the first time with this django admin panel.
[9]
Remote Hosting # [10]
You might find these settings helpful as well if yo...
I am continuing my journey into django, but today I am not at my workstation. I
am ssh’d in remotely from a chromebook. I am fully outside of my network, so I
can’t access it by localhost, or it’s ip. I do have cloudflared tunnel
installed and dns setup to a localhost.waylonwalker.com.
Settings # [1]
I found this in settings.py and yolo, it worked first try. I am in from my
remote location, and even have auth taken care of thanks to cloudflare. I am
really hoping to learn how to setup my own auth with django as this is one of
the things that I could really use in my toolbelt.
ALLOWED_HOSTS = ['localhost.waylonwalker.com']
[2]
References:
[1]: #settings
[2]: https://stable-diffusion.waylonwalker.com/000321.3422093952.webp
I have no experience in django, and in my exploration to become a better python
developer I am dipping my toe into one of the most polished and widely used web
frameworks Django to so that I can better understand it and become a better
python developer.
If you found this at all helpful make sure you check out the django tutorial [1]
[2]
install django # [3]
The first thing I need to do is render out a template to start the project.
For this I need the django-admin cli. To get this I am going the route of
pipx it will be installed globally on my system in it’s own virtual
environment that I don’t have to manage. This will be useful only for using
startproject as far as I know.
pipx install django
django-admin startproject try_django
cd try_django
[4]
Make a venv # [5]
Once I have the project I need a venv for all of django and all of my
dependencies I might need for the project. I have really been diggin hatch
lately, and it has a one line “make a virtual environment [6] and manage it for
me” command.
hatch shell
[7]
If hatch is a bit bleeding edge for you, or it has died out by the time you
read this. The ol trusty venv will likely stand the test of time, this is w...
While updating my site to use Markata’s new configurable head I ran into some
escaping issues. Things like single quotes would cause jinja to fail as it was
closing quotes that it shouldnt have.
[1]
Jinja Escaping Strings # [2]
Jinja comes with a handy utility for escaping strings. I definitly tried to
over-complicate this before realizing. You can just pipe your variables into
e to escape them. This has worked pretty flawless at solving some jinja
issues for me.
<p>
{{ title|e }}
</p>
Creating meta tags in Markata # [3]
The issue I ran into was when trying to setup meta tags with the new
configurable head, some of my titles have single quotes in them. This is what
I put in my markata.toml to create some meta tags.
[[markata.head.meta]]
name = "og:title"
content = "{{ title }}"
Using my article titles like this ended up causing this syntax error when not
escaped.
SyntaxError: invalid syntax. Perhaps you forgot a comma?
Exception ignored in: <function Forward.__del__ at 0x7fa9807192d0>
Traceback (most recent call last):
...
TypeError: 'NoneType' object is not callable
jinja2 escape # [4]
After making a complicated system of using html.escape I realized that jinja
includ...
When I am developing python code I often have a repl open alongside of it
running snippets ofcode as I go. Ipython is my repl of choice, and I hace
tricked it out the best I can and I really like it. The problem I recently
discovered is that I have way overcomplicated it.
[1]
What Have I done?? # [2]
So in the past the way I have setup a few extensions for myself is to add
something like this to my ~/.ipython/profile_default/startup directory. It
sets up some things like rich highlighting or in this example automatic
imports. I even went as far as installing some of these in the case I didn’t have them installed.
import subprocess
from IPython import get_ipython
from IPython.core.error import UsageError
ipython = get_ipython()
try:
ipython.run_line_magic("load_ext pyflyby", "inline")
except UsageError:
print("installing pyflyby")
subprocess.Popen(
["pip", "install", "pyflyby"],
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
).wait()
ipython.run_line_magic("load_ext pyflyby", "inline")
print("installing isort")
subprocess.Popen(
["pip", "install", "isort"],
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
)
[3]
What I missed? # [4]
I missed t...
I like pypeaday’s [1] project stable-diffusion-pype-dev [2].
No description available.
References:
[1]: https://github.com/pypeaday
[2]: https://github.com/pypeaday/stable-diffusion-pype-dev
Check out gradio-app [1] and their project gradio [2].
Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!
References:
[1]: https://github.com/gradio-app
[2]: https://github.com/gradio-app/gradio
Just starred stable-diffusion-webui [1] by AUTOMATIC1111 [2]. It’s an exciting project with a lot to offer.
Stable Diffusion web UI
References:
[1]: https://github.com/AUTOMATIC1111/stable-diffusion-webui
[2]: https://github.com/AUTOMATIC1111
kedro-plugins [1] by kedro-org [2] is a game-changer in its space. Excited to see how it evolves.
First-party plugins maintained by the Kedro team.
References:
[1]: https://github.com/kedro-org/kedro-plugins
[2]: https://github.com/kedro-org
If you’re into interesting projects, don’t miss out on knossos [1], created by modrinth [2].
[Archived] Former repo of the Modrinth frontend
References:
[1]: https://github.com/modrinth/knossos
[2]: https://github.com/modrinth
I like CaffeineMC’s [1] project sodium [2].
A Minecraft mod designed to improve frame rates and reduce micro-stutter
References:
[1]: https://github.com/CaffeineMC
[2]: https://github.com/CaffeineMC/sodium
Just starred markata-todoui [1] by WaylonWalker [2]. It’s an exciting project with a lot to offer.
A todo plugin for markata. It is a tui (text user interface) that runs in the terminal using textual. It gives me a trello-board feel from the terminal. I can create, update, delete, move, and fully manage my todo items from the terminal with it.
References:
[1]: https://github.com/WaylonWalker/markata-todoui
[2]: https://github.com/WaylonWalker
Check out giscus [1] and their project giscus [2].
A comment system powered by GitHub Discussions. :octocat: 💬 💎
References:
[1]: https://github.com/giscus
[2]: https://github.com/giscus/giscus
I recently discovered cmp-nvim-lsp-signature-help [1] by hrsh7th [2], and it’s truly impressive.
cmp-nvim-lsp-signature-help
References:
[1]: https://github.com/hrsh7th/cmp-nvim-lsp-signature-help
[2]: https://github.com/hrsh7th
[1]
A long needed feature of markata has been the ability to really configure out
templates with configuration rather. It’s been long that you needed that if
you really want to change the style, meta tags, or anything in the head you
needed to write a plugin or eject out of the template and use your own.
Adding some Head # [2]
Now you can add some extra style to your site with the existing built-in
template.
[[markata.head]]
text = """
<style>
img {
width: 100%;
height: auto;
}
ul {
display: flex;
flex-wrap: wrap;
}
</style>
"""
You can have more than one Head # [3]
Each text entry in markata.head just gets appended raw into the head.
[[markata.head]]
text = """
<style>
img {
width: 100%;
height: auto;
}
ul {
display: flex;
flex-wrap: wrap;
}
</style>
"""
[[markata.head]]
text = """
<script>
console.log('hey there')
</script
"""
Still need more? # [4]
If this does not take you far enough yet, you can still eject out and use your
own template pretty easy. If you are going for a full custom site it’s likely
that this will be the workflow for awhile. Markata should only get better and
make this required less often as it matures.
[markata]
post_template = "pages/tem...
I recently discovered stable-diffusion-videos [1] by nateraw [2], and it’s truly impressive.
Create 🔥 videos with Stable Diffusion by exploring the latent space and morphing between text prompts
References:
[1]: https://github.com/nateraw/stable-diffusion-videos
[2]: https://github.com/nateraw
gitleaks [1] by gitleaks [2] is a game-changer in its space. Excited to see how it evolves.
Find secrets with Gitleaks 🔑
References:
[1]: https://github.com/gitleaks/gitleaks
[2]: https://github.com/gitleaks
If you’re into interesting projects, don’t miss out on termcharts [1], created by Abdur-rahmaanJ [2].
Terminal charts
References:
[1]: https://github.com/Abdur-rahmaanJ/termcharts
[2]: https://github.com/Abdur-rahmaanJ
Looking for inspiration? markata-slides [1] by WaylonWalker [2].
A slides plugin for markata that allows you to create presentations in markdown from the comfort of your favorite editor. Each new h2 tag (## in markdown) becomes a new slide. This plugin leverages the built-in feeds plugin for navigation, and adds in some hotkeys (j/k) to go the the previous and next slides.
References:
[1]: https://github.com/WaylonWalker/markata-slides
[2]: https://github.com/WaylonWalker
I’m really excited about small-group-notes [1], an amazing project by pypeaday [2]. It’s worth exploring!
Landing zone for small group notes - plan is to make this a nicer website for all things small group related
References:
[1]: https://github.com/pypeaday/small-group-notes
[2]: https://github.com/pypeaday
Looking for inspiration? techstructive-blog [1] by Mr-Destructive [2].
Blogging Platform powered by Django.
References:
[1]: https://github.com/Mr-Destructive/techstructive-blog
[2]: https://github.com/Mr-Destructive
I’m really excited about meetgor.com [1], an amazing project by Mr-Destructive [2]. It’s worth exploring!
My Personal Blog and Portfolio made with Markata SSG and Python
References:
[1]: https://github.com/Mr-Destructive/meetgor.com
[2]: https://github.com/Mr-Destructive
The work on jinja2-fragments [1] by sponsfreixes [2].
Render Jinja2 template block as HTML [3] page fragments on Python web frameworks.
References:
[1]: https://github.com/sponsfreixes/jinja2-fragments
[2]: https://github.com/sponsfreixes
[3]: /html/
Looking for inspiration? ansible-language-server [1] by ansible [2].
🚧 Ansible Language Server codebase is now included in vscode-ansible repository
References:
[1]: https://github.com/ansible/ansible-language-server
[2]: https://github.com/ansible
I’m really getting into using hatch as my go to build system, and I am really
liking it so far. I am slowly finding new things that just work really well.
hatch new is one of those things that I didn’t realize I needed until I had
it.
[1]
creating new versions created by myself with stable diffusion
[2]
❯ pipx run hatch new --help
Usage: hatch new [OPTIONS] [NAME] [LOCATION]
Create or initialize a project.
Options:
-i, --interactive Interactively choose details about the project
--cli Give the project a command line interface
--init Initialize an existing project
-h, --help Show this message and exit.
Note! I am running all of these commands with pipx. I like to use pipx for
all of my system level cli applications. To emphasis this point in the
article I am going to use pipx run hatch, but you can pipx install hatch
then just run hatch from there.
Interacively create a new project # [3]
Running hatch new -i will ask let you interactivly choose details about the
project, such as the project’s name.
pipx run hatch new -i
After running and naming the project Hatch New we end up with the following
filetree.
❯ tree .
.
├── hatch_new
│ ├── __about__.py
│ └── __in...
Hatch has an amazing versioning cli for python packages that just works. It
takes very little config to get going and you can start bumping versions
without worry.
[1]
creating new versions created by myself with stable diffusion
project layout # [2]
For trying out the hatch version cli let’s make a simple project with the
terrible name pkg.
❯ tree .
.
├── pkg
│ ├── __about__.py
│ └── __init__.py
├── pyproject.toml
└── README.md
1 directory, 4 files
pyproject.toml # [3]
The main hero of this post is the pyproject.toml. This is what defines all
of our PEP 517 [4] style project setup.
[project]
name = "pkg"
description = "Show how to version packages with hatch"
readme = "README.md"
dynamic = [
"version",
]
[build-system]
requires = [
"hatchling>=1.4.1",
]
build-backend = "hatchling.build"
[tool.hatch.version]
path = "pkg/__about__.py"
statically versioning # [5]
project.version
It is possible to set the version number inside the pyproject.toml
statically. This is fine if you just want to version your package manually,
and not through the hatch cli.
[project]
name = "pkg"
version = "0.0.0"
# ...
Statically versioning in pyproject.toml will not work with hatch ...