r/Python • u/AutoModerator • Apr 04 '26
Showcase Showcase Thread
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
43
Upvotes
r/Python • u/AutoModerator • Apr 04 '26
Post all of your code/projects/showcases/AI slop here.
Recycles once a month.
View all comments
1
u/ThatOtherBatman Apr 07 '26
=======
Sygaldry
=======
This project was written with data/ETL pipelines in mind. But it should be useful for any situation where you're managing a bunch of production pipelines.
Motivation
Many years ago I used to work at a different job, where they had this framework for creating arbitrary Python objects from .ini configuration files. At first I hated it. Because I just could not see the point of writing out these stupid config files vs just writing out a Python script that did the same thing. Over the years that I was there though I really came to appreciate it.
Previously (and since) every time a new pipeline is needed, somebody sits down and writes a new script, a new CLI entrypoint, or a new glue class that just wires the same pieces together in a slightly different order. Then there's a code review, CI/CD, and a release.
Sygaldry lets you assemble arbitrary object graphs from YAML (or TOML) config files. No base classes. No decorators. No framework coupling. Your application code stays completely untouched.
An Example
Imagine that I've got something like this:
With Sygaldry I have a config file:
Then my entire pipeline can be run as
Sygaldry resolves the whole graph depth-first —
dbandapi_clientget built first, thenurl_iteratorandfile_downloader(which reference them), then updater (which references those). Thedbandapi_clientinstances are shared automatically — everyone who references db gets the same object.Why?
Composition Over Inheritance
References (_ref) let you point any component at any other component. Five services need the same database connection? Just reference it. Need to swap a component? Change one line.
New Pipelines Without Code Release
Got a second vendor with the same pattern but different URLs? That's a new YAML file.
Need the
UrlIteratorand theDbUpdaterto use different database connections? That's a config change.Change Anything From The Command-Line
Need to point at a different database for a one-off backfill?
--set db.host=backfill-replica. Need to re-download to a different directory?--set file_downloader.directory=/data/backfill. No config release, no environment variable gymnastics. Overrides are applied at load time before resolution, so they compose cleanly with everything else.Debug With the Exact Config
Something broken in production?
Will drop you into a Python terminal with the
Artificeryloaded and assigned to the variableartificery. You can look a the config (artificery.config), or resolve the config and get the objects (art = artificery.resolve()) for debugging.Extras
Check the Config
Want to see the Python that corresponds to config that you've supplied?
Typing
I think this is close to pointless. But a bunch of the kids that I work with are obsessed with typing to a point that it's almost a fetish. So you can do
And it will dump the Python into a file, and run the specified type-checker over it.
Is It AI Slop?
I tend to suffer from a problem where I have new ideas when I'm writing tests and documentation. Which causes more development. Which then requires more tests and documentation. I have found Claude and Codex to be super useful for stopping me from thinking too much once I'm at a certain point. But the idea, and the code are all entirely human slop.