Sign in

Bart Dorlandt

@dreamnetworking.nl
311 followers 247 following 75 posts

(Network) automation above all

PostsRepliesMedia
Bart Dorlandt @dreamnetworking.nl · 24/08/2026
The next #NLNAM event will be on Sept 9th in Utrecht. If you are in the #networkautomation space come check it out. net-auto.nl/events/20260...
net-auto.nl
NLNAM Meetup 3 @ One Zero IT
Network automation meetup hosted by One Zero IT in Utrecht on 9 September 2026. Free to attend: talks, pizza and networking.
000
Bart Dorlandt @dreamnetworking.nl · 21/07/2025
I'll continue with the posts and content on LinkedIn. There just in't enough characters to do it all here... Follow me on buff.ly/v7MR0oS
000
Bart Dorlandt @dreamnetworking.nl · 21/07/2025
A print on 'user' and 'user.name' shows: "id=1 name='John Doe' email='some@email.com'" and "John Doe"
100
Bart Dorlandt @dreamnetworking.nl · 21/07/2025
As a first in the pydantic series, let's start with the basics. The goal of the whole series is to be able to validate the model as well as being able to generate the same json as the input, to verify we didn't miss anything.
100
Bart Dorlandt @dreamnetworking.nl · 18/07/2025
Did you ever ran into a tricky json, with a lot of dicts, where the dict in the dicts were inconsistent with variables key names?
100
Bart Dorlandt @dreamnetworking.nl · 18/07/2025
You mean just the instruction to load the json in the model. True. But defining the whole model takes a few more lines 😂 Especially if the json is tricky...
100
Bart Dorlandt @dreamnetworking.nl · 18/07/2025
I've working on parsing a json structure into a pydantic model. I'm planning to write a couple of posts on this. Is this something you've been playing with? Anything specific you ran into? Perhaps I could write about something specific if you have certain interests. Please let me know.
110
Bart Dorlandt @dreamnetworking.nl · 07/07/2025
Sounds solid. I'd prefer task over just. I had written a comparison here github.com/bartdorlandt...
github.com
GitHub - bartdorlandt/Beyond_the_Makefile: Choices choices, which is the one?
Choices choices, which is the one? Contribute to bartdorlandt/Beyond_the_Makefile development by creating an account on GitHub.
010
Bart Dorlandt @dreamnetworking.nl · 18/06/2025
Dealing with #Ansible & #docker compose on #synology systems and an alternative #taskfile option Let's dive in: buff.ly/xoSjQ1A The alternative with taskfile: buff.ly/bMcd7SG
buff.ly
Managing dockers using ansible on Synology NAS - Dream networking and automation
How I use ansible to manage docker compose on my Synology NAS
010
Bart Dorlandt @dreamnetworking.nl · 16/06/2025
Using #Taskfile to deal with docker-compose vs docker compose on different systems buff.ly/bMcd7SG
000
Bart Dorlandt @dreamnetworking.nl · 30/05/2025
#pyrefly found at pyrefly.org is a new one written in rust and is created by #meta open source. #ty found at buff.ly/rJg94P5 is created by astral-sh (creators of #ruff and #uv) and is also written in rust. Note: this isn't ready for production yet. Have you tried any of the new kids on the block?
pyrefly.org
Pyrefly: A Static Type Checker for Python | Pyrefly
Your Docusaurus site did not load properly.
000
Bart Dorlandt @dreamnetworking.nl · 30/05/2025
Most of us already got used to annotate our #python code with typehints. If I had to guess, I would say that most people are using #mypy for checking the types. Did you know that other checkers have emerged these days?
110
Bart Dorlandt @dreamnetworking.nl · 28/05/2025
I hope this project will help you in your migrations and make them smooth and quick. In case you run into challenges, don't hesitate to reach out.
000
Bart Dorlandt @dreamnetworking.nl · 28/05/2025
The `-n` flag will do a dry run and creates a new file instead of moving the old one out of the way, allowing you to verify its contents. To do the actual migration, just `uvx convert-poetry2uv pyproject.toml`. (Your original file will be backed up)
100
Bart Dorlandt @dreamnetworking.nl · 28/05/2025
I looked for existing ones, but didn't find any that met my requirements or desires. So, nothing to do than creating my own. And so it was born. buff.ly/zmp2ptg to make it really easy to use, when you already have uv installed is just calling it directly: `uvx convert-poetry2uv -n pyproject.toml`
buff.ly
GitHub - bartdorlandt/convert_poetry2uv: A solution to convert existing poetry based python projects pyproject.toml to be consumed with `uv` instead
A solution to convert existing poetry based python projects pyproject.toml to be consumed with `uv` instead - GitHub - bartdorlandt/convert_poetry2uv: A solution to convert existing poetry based p...
100
Bart Dorlandt @dreamnetworking.nl · 28/05/2025
Doing it by hand is just plain annoying and it will be easy to sneak in some errors. After I did that once, and imaging other would be in the same pickle. I thought it would be useful to have a migration script to convert the existing #poetry `pyproject.toml` to one that can be consumed by #uv.
buff.ly
GitHub - bartdorlandt/convert_poetry2uv: A solution to convert existing poetry based python projects pyproject.toml to be consumed with `uv` instead
A solution to convert existing poetry based python projects pyproject.toml to be consumed with `uv` instead - GitHub - bartdorlandt/convert_poetry2uv: A solution to convert existing poetry based p...
100
Bart Dorlandt @dreamnetworking.nl · 28/05/2025
`uv add --dev $library` to make it part of the development group. Even loading libraries from your requirements file is easy, `uv add -r requirements.txt`. Now, you might want to migrate other repositories to have some consistency. How to migrate your existing repo's to uv.
buff.ly
GitHub - bartdorlandt/convert_poetry2uv: A solution to convert existing poetry based python projects pyproject.toml to be consumed with `uv` instead
A solution to convert existing poetry based python projects pyproject.toml to be consumed with `uv` instead - GitHub - bartdorlandt/convert_poetry2uv: A solution to convert existing poetry based p...
100
Bart Dorlandt @dreamnetworking.nl · 28/05/2025
Creating a uv repo is easy, just run `uv init $project` and you are off to the races. Using it for new projects is easy if you are already used to poetry. The commands are quite similar. Just add a few libraries with `uv add $library` or
buff.ly
GitHub - bartdorlandt/convert_poetry2uv: A solution to convert existing poetry based python projects pyproject.toml to be consumed with `uv` instead
A solution to convert existing poetry based python projects pyproject.toml to be consumed with `uv` instead - GitHub - bartdorlandt/convert_poetry2uv: A solution to convert existing poetry based p...
100
Bart Dorlandt @dreamnetworking.nl · 28/05/2025
When I encountered #uv I fell for it right away. I was already using ruff for a while and started looking into rye, which was the intermediate step before it became uv.
120
Bart Dorlandt @dreamnetworking.nl · 12/03/2025
With this in place, the uv run is part of the script and calling it directly from the CLI is now possible. Have a read on my complete article buff.ly/KQ8kqVN
buff.ly
Improved shebang for your python standalone script - Dream networking and automation
Set up the shebang for your script using uv run
000
Bart Dorlandt @dreamnetworking.nl · 12/03/2025
This provides the dependency of still writing `uv run` for the command, and it doesn't allow you to have that script as part of your PATH and just be able to call it. So, let's improve that by changing the shebang. `#!/usr/bin/env -S uv run --script`
buff.ly
Improved shebang for your python standalone script - Dream networking and automation
Set up the shebang for your script using uv run
120
Bart Dorlandt @dreamnetworking.nl · 12/03/2025
Previously I share a post on how you can use `uv run -s script.py` to run that script and have `uv` handle the dependencies. The original script is showing the shebang is pointing to a python3 executable.
110
Bart Dorlandt @dreamnetworking.nl · 10/03/2025
When we combine that with uv, buff.ly/cWc4fBv we can easily run the script without having to activate a virtualenv or specify the python interpreter. And it will just take care of it. Assume the script has the name `script.py` we would call it with `uv run -s script.py`. Are you already using this?
buff.ly
Running scripts | uv
A guide to using uv to run Python scripts, including support for inline dependency metadata, reproducible scripts, and more.
000
Bart Dorlandt @dreamnetworking.nl · 10/03/2025
Ever wanted to run a python script, without having to specify a virtualenv? Given buff.ly/cVEXJle we can build scripts as we would normally, though now add a few comments to it to specify the dependencies.
120
Bart Dorlandt @dreamnetworking.nl · 13/01/2025
Yeah indeed. I always had that setting enabled for poetry. It was the default for me.
010
Bart Dorlandt @dreamnetworking.nl · 13/01/2025
Shell can be done by a plugin indeed. Though it is nothing more than enabling the venv. I just have an alias called `venv`: `source ./.venv/bin/activate` and vscode picks it up automatically Still want to migrate, use a conversion tool, like pypi.org/project/conv...
pypi.org
convert-poetry2uv
Poetry to uv tool. To migrate from a poetry managed repo to uv.
120
Bart Dorlandt @dreamnetworking.nl · 13/01/2025
Consider this done. Find more details on the role on github: buff.ly/3BVaf4R Are you using poetry, or have you switched to uv? Or perhaps using something else?
buff.ly
GitHub - bartdorlandt/ansible-role-poetry
Contribute to bartdorlandt/ansible-role-poetry development by creating an account on GitHub.
010
Bart Dorlandt @dreamnetworking.nl · 13/01/2025
Poetry had a new release recently, version 2.0. Given the number, this means stuff broke ;) E.g. the poetry shell command is no more. The pyproject.toml is updated and now supporting the project header. (PEP 621) This also meant I had to update my ansible role for poetry (bartdorlandt.poetry).
220
Bart Dorlandt @dreamnetworking.nl · 03/01/2025
I've written an article on linkedIn on my tool to migration from poetry to uv. Having uv is awesome, though the migration of each repo isn't... This tool will make your life a bit easier. Have fun 😞 buff.ly/3BPX5WI
031
Bart Dorlandt @dreamnetworking.nl · 01/01/2025
PS. For those who are using #shortcat (shortcat.app), this unfortunately doesn't work to active the toggle.
shortcat.app
Shortcat: Universal command palette for your Mac | Shortcat
Shortcat is a Mac command palette app that lets you click, activate menus, switch windows, and more, with just your keyboard! macOS wide command palette utility app.
010
Bart Dorlandt @dreamnetworking.nl · 01/01/2025
I found it to be very powerful for several other things as well and I've replaced spotlight with it. No more annoyances for me, at least not regarding the notch 🫠 I hope it'll work for you as well. Or have you find another solution?
shortcat.app
Shortcat: Universal command palette for your Mac | Shortcat
Shortcat is a Mac command palette app that lets you click, activate menus, switch windows, and more, with just your keyboard! macOS wide command palette utility app.
100
Bart Dorlandt @dreamnetworking.nl · 01/01/2025
This led me to another tool called #raycast (buff.ly/3pURXHk). Quote: A collection of powerful productivity tools all within an extendable launcher. Fast, ergonomic and reliable. It has an extension for znotch, allowing you to create a shortcut for it (like option+n).
buff.ly
Raycast - Your shortcut to everything
A collection of powerful productivity tools all within an extendable launcher.
100
Bart Dorlandt @dreamnetworking.nl · 01/01/2025
I found #znotch (buff.ly/3PdB7jg). Which allows you to toggle the notch (by moving down the bar below the notch). This works great! The only thing is, you need a mouse to toggle it (yes... on the menu bar which already had the ton of icons...) and there is no shortcut to it.
buff.ly
GitHub - zkondor/znotch: zNotch is for toggling (hide/show) your M1/M2 Macbook's notch
zNotch is for toggling (hide/show) your M1/M2 Macbook's notch - zkondor/znotch
100
Bart Dorlandt @dreamnetworking.nl · 01/01/2025
I was already using a tool called `hiddenbar`, which worked most of the time by only showing the interesting icons. (Hint: you can move icons by using the command key) Though occasionally I would run into needing that specific program, that was unreachable anyways.
buff.ly
GitHub - zkondor/znotch: zNotch is for toggling (hide/show) your M1/M2 Macbook's notch
zNotch is for toggling (hide/show) your M1/M2 Macbook's notch - zkondor/znotch
100
Bart Dorlandt @dreamnetworking.nl · 01/01/2025
Wouldn't it be great if Apple had a decent fix for the #notch on the Macs... Every time I have the Mac disconnected from the external monitor I'm annoyed by it. This time it was enough and I started looking into "fixing" it.
100
Bart Dorlandt @dreamnetworking.nl · 30/12/2024
A few things to consider: ❗ The base of execution is the main taskfile, unless the `dir` keyword is provided. ❗ By including the taskfile it becomes mandatory, unless `optional` is provided. There are some other useful options, make sure to check out the docs. buff.ly/49YRIAV
buff.ly
Usage | Task
Getting started
000
Bart Dorlandt @dreamnetworking.nl · 30/12/2024
Another beautiful feature of #task is to include other taskfiles. Especially to have them OS specific where desired. Just include the desired #taskfile. Use `{{OS}}` to make it dynamic, allowing variables or tasks to be OS dependent. Useful for developing on Mac and running on Linux (or pipelines)
120
Reposted by Bart Dorlandt
Bala @bala.bsky.social · 28/12/2024
051
Bart Dorlandt @dreamnetworking.nl · 27/12/2024
Depending on the pipeline system you're using, you might need to specify the commands to be executed yourself (jenkins, gitlab, ...) Hang on... You just created that beautiful #taskfile to make your life easier... Why not make your pipeline easier, by just executing your tasks...
020
Bart Dorlandt @dreamnetworking.nl · 25/12/2024
Using parallelisation without thinking! That is what you can achieve with the `deps` keyword in #task. See the example on how to run your #python lint, scan and test in parallel by just running `task check`. No complications, just actions!
011
Bart Dorlandt @dreamnetworking.nl · 23/12/2024
You are expanding your #taskfile and realise that there a couple of tasks with dependencies on a build process. Though you don't want to rebuild it, if nothing changed. #Task got you covered! Using sources and generates to monitor the source files and if the generated file exists.
011
Bart Dorlandt @dreamnetworking.nl · 20/12/2024
I've been playing with this (raycast), while the kids entertain themselves at monkeytown. It actually is quite powerful and feature rich. I like it. I replaced spotlight with this.
000
Bart Dorlandt @dreamnetworking.nl · 20/12/2024
I just found `znotch`. Which seem to do the trick. Though now I need to bind it to a shortcut... Unfortunately it doesn't have a toggle in the menu, else `shortcat` would've worked. Perhaps I should give `raycast` a try.
100
Bart Dorlandt @dreamnetworking.nl · 20/12/2024
Does anyone know if there is an app to have a dropdown tool for the #Mac #menubar? To have a workaround for the notch in combination with too many icons? Something like `hiddenbar`, but even better...
100
Bart Dorlandt @dreamnetworking.nl · 20/12/2024
How to deal with #task when needing a dynamic variable or one that is stored in a file or from the output of another command... Variables can be assigned using the 'sh' key when assigned a variable. Allowing you to assign the output of any shell command. Lovely
000
Bart Dorlandt @dreamnetworking.nl · 18/12/2024
As mentioned in my previous post, occasionally you'll need to execute a command in multiple directory or differently said, need to execute a #task multiple times. Which may involve directories, files or any action essentially. A for loop is what we need 😀
000
Bart Dorlandt @dreamnetworking.nl · 16/12/2024
That together with cli completion ❤️
100
Bart Dorlandt @dreamnetworking.nl · 16/12/2024
Just simplifying things that had to be done manually previously.
100
Bart Dorlandt @dreamnetworking.nl · 16/12/2024
I'm not saying there aren't solutions, though having the solutions part of the tool can be very nice. Taskfile will support a hierarchy of taskfiles as well, or specific ones per OS (still need to write about that feature). Or even a global Taskfile support.
100
Bart Dorlandt @dreamnetworking.nl · 16/12/2024
That is a lot of magic. It seems someone went all out on the spaces :) I've worked a bunch with Makefiles as well. That is also the reason I got enthusiastic about Taskfile.
000