GoDo
Execute a directory of python code following the definition order.
Given a directory structure that looks like such:
myscripts/
1-init.gd
2-run/
1-stuff-a.gd
2-stuff-b.gd
3-finish.gd
GoDo will traverse through this directory running tasks defined in each file.
Tasks are defined as a function decorated with a @task decorator. Tasks defined in a file will be executed in the order in which they are defined.
Task Files
Any file ending in .gd will be read and evaluated as a Python source file. Any function that is decorated by a the @task decorator will be added to the list of tasks to execute.
Example mytasks.gd:
import os
@task
def first_task():
print "Yay going and doing stuff!"
@task
def second_task(cfg):
print "A config option: %s" % cfg["whee"]
Tasks are executed from the same directory where the file that defines them is located.
Complete task file API:
@task - Decorate a function so that it will be executed.
cd(path) - Used in with statements to change the working directory.
run(cmd) - Run a shell command checking the return code.
sudo(cmd) - Prepends a command with sudo. Probably won’t work if you don’t use passwordless sudo. Obviously, that should be fixed.
Config Files
By default, GoDo will look in the base execution directory for a godo.cfg.py file. (The base execution directory is ./ unless specified on the command line). Alternatively you can specify a path. If a config file is found it is evaluated and passed as a dictionary to any task function that takes an argument.
Metadata
Release files for godo 0.0.10
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 |
|---|---|---|---|---|
| godo-0.0.10.tar.gz | 8.0 kB | Without provenance | Details for godo-0.0.10.tar.gz |
Release files / godo-0.0.10.tar.gz
| Download URL | godo-0.0.10.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8c9075fd6bd5cda7889b4020feb31dfc62c0e1aeb4998fcfe17bf858f21d4c57
|
|
BLAKE2b-256 checksum How to use checksums |
4928d77c3873640b84d2539255a7a71d5b02b48a5dbbbb0cb0f805c448785f27
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for godo 0.0.10
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.