lodepy
lodepy is a Multi-node fully python automation tool. It is agentless and executes tasks over SSH.
The concept
In a nutshell, lodepy serves a pretty simple task: execute ssh commands on servers to set them up.
With this comes a variety of somewhat neccessary functionalities that lodepy implements:
- Execute the commands (obviously) within well defined "Groups" of "Nodes"
- Create a well defined logging system to stream and monitor task execution
- Provide a clean wrapper / execution model to seamlessly run operations and comparisons on multiple results.
Using lodepy
In it's current state the main interaction is going to be with the Group class and its subclasses (namely the GroupReturn).
-
Definining a group is quickly done with the use of
lodepy.import_group_txt(file: str) -> Dict[str, Group]- This is going to be in the format of:
[group1] node1, 1.1.1.1 node2, 1.1.1.2 [group2] node3, 1.1.1.1 node4, 1.1.1.1 [group_name] node_name, ssh_ip - Note, already created groups can be found in the
lodepy.data_store().groups
- This is going to be in the format of:
-
Executing commands
- We can then execute a variety of Group commands. A series of these are listed as functions of Group.py.
- Some commands can be custom created. In this case you simply need to:
- Define the Task
<Group>.execute_task(<Task>(params))
-
Using these resulting GroupReturn
- Filtering
- GroupReturns handle filtering in the such way:
group_return = GroupReturn() double_lt_5 = group_return * 2 < 5 # double_lt_5 is going to be the GroupReturn filtered with only nodes doubled returning a value less than 5.
- Note, this also works with versioning. A command like git_version will be able to handle filtering such as
group_return > 1.0.*
- Note, this also works with versioning. A command like git_version will be able to handle filtering such as
- GroupReturns handle filtering in the such way:
- Executing future commands
- GroupReturns are simply subclasses of a Group. They can exectue commands and function entirely similarly.
- Any operations available to the value class
- Group returns aim to be abtract enough that any of the commands it's value expects to handle, so can the GroupReturn
- Filtering
In total this is the entire functionality loop of lodepy. There is still more to cover (and to implement), but to expect: log handling / streaming results elsewhere, more configurability (error handling, execution tuning, etc.), a variety of builtin Tasks for common usecases and the ability to seamlessly create more Tasks (and recursively handle encapsuled tasks).
Metadata
Release files for lodepy 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| lodepy-0.0.1.tar.gz | 12.9 kB | Without provenance | Details for lodepy-0.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| lodepy-0.0.1-py3-none-any.whl | Python 3 | none | any | Details for lodepy-0.0.1-py3-none-any.whl |
Total release size: 29.5 kB
Release files / lodepy-0.0.1.tar.gz
| Download URL | lodepy-0.0.1.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
142940ee39f37214688a803e9761e274498566ff2c5f47fa5477087aad3f629b
|
|
BLAKE2b-256 checksum How to use checksums |
c629905ea750e76716502847deaa4055aa59d388ea1532df83b09617188d9962
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.12
|
Release files / lodepy-0.0.1-py3-none-any.whl
| Download URL | lodepy-0.0.1-py3-none-any.whl |
|---|---|
| Size | 16.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d5651b47c13389e1111099ef7ff4460af2c448f8c54486f9b3065ef732900832
|
|
BLAKE2b-256 checksum How to use checksums |
6e643eeef966c52f307332fdbb1a022097f286a46f5984128288470ad8d7ddfb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.12
|
Security for lodepy 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.