Top
Best
New

Posted by wowi42 5 days ago

PyInfra 3.8.0(github.com)
306 points | 107 commentspage 2
sureglymop 5 days ago|
What I really want is something like either ansible or this that:

- Doesn't unnecessarily send code over the network.

- Has some sort of "execution optimizer".

Think for example a query planner/optimizer of a db. Or, as a good example, the query planner of the polars framework as opposed to how it works in pandas.

If I do a for loop and each loop iteration copies a file into the same dir, the optimizer should catch that and send over one compressed tar file.

Propolice 4 days ago||
Wanted to try PyInfra for a long while but this is a deal breaker: https://github.com/pyinfra-dev/pyinfra/issues/1242
DandyDev 4 days ago|
Yeah, I understand your frustration. This is an issue with Paramiko which pyinfra relies on. We have been debating moving away from Paramiko, but it will take a while for that to materialize.
hathym 5 days ago||
i tried ansible before and hated it, this idea is genius.
pbronez 5 days ago||
How does this compare to Salt Stack?

“Built on Python, Salt is an event-driven automation tool and framework to deploy, configure, and manage complex IT systems. Use Salt to automate common infrastructure administration tasks and ensure that all the components of your infrastructure are operating in a consistent desired state.”

https://docs.saltproject.io/en/latest/topics/about_salt_proj...

bijowo1676 5 days ago|
salt is heavy: it has client, server, agent. it equires installation, consumes resources, etc.

pyinfra is just python that gets transpiled into ssh commands

eliaspro 1 day ago||
I wouldn't call it heavy, but more complex instead. Salt is astonishingly lightweight (at least before they started vendoring everything and I stopped using it) and extremely fast - due to its execution model it doesn't really matter whether you target 10 or 10000 nodes with a job.
mkobit 5 days ago||
I have started to adapt https://testinfra.readthedocs.io/en/latest/, which looks similar in style to this from the verification side. Having previously used Salt, Ansible, and Chef at other companies, this looks great from a UX perspective compared to those other tools.
benatkin 5 days ago||
The amount of repetition of @override seems unpythonic to me, but maybe that's python being unpythonic.

https://github.com/pyinfra-dev/pyinfra/blob/3.x/src/pyinfra/...

appplication 5 days ago||
The is cool, thank you for sharing. I was just thinking about onboarding to ansible since I’ve just been following a manual checklist of commands for my remote server but based on positive feedback here I’ll probs oh give this a shot. Only downside is I imagine LLMs are probably a little more proficient at ansible just due to volume of training data.
coreylane 5 days ago|
I never depend on a models built-in training when using third-party libraries. Providing tons of additional context to the model like a skill, example repos, or context7 snippets that I manually curate is more effort up-front and takes longer, but the results are worth it.

Stuff I threw into the inputs before working with pyinfra

https://github.com/pyinfra-dev/pyinfra-examples

https://context7.com/websites/pyinfra

bityard 5 days ago||
Is there anything like Ansible Tower or Semaphore for PyInfra? Or some more generic tool that would work similarly?

I could likely vibecode something up if I had to, but I'm interested in a job orchestration system that can run things like upgrades, scheduled backups, ideally with a nice dashboard showing successful/failed jobs.

bestony 5 days ago||
This looks great! pyinfra will integrate better with my other code, and installing it with uv fits my workflow better. Thanks for the post. I'll give it a try. I think some of my Caprover initialization tasks could also be handled by pyinfra.
rumpelstiel 4 days ago|
Thank you for this, im using it in combo with consul to fetch the inventory and labels. So easy to setup and maintain. But im heavily using python anyway, so writing my own classes, connectors was kinda.. free.
More comments...