Azkaban
Lightweight command line interface (CLI) for Azkaban:
Define jobs from a single python file
Build projects and upload to Azkaban from the command line
Integration is meant to be as transparent as possible:
No additional folders and files
No imposed project structure
Installation
Using pip:
$ pip install azkaban
Quickstart
We first create a file to define our project. Let’s call it jobs.py,
although any name would work.
In this example, we add a single job and file:
from azkaban import Job, Project
project = Project('foo')
project.add_job('bar', Job({'type': 'command', 'command': 'echo "Hello!"'}))
project.add_file('bax.jar')
if __name__ == '__main__':
project.main()
From the command line we can now run python jobs.py --help to view the
list of all available options (build, upload, etc.). E.g. the
following command will create the archive foo.zip containing all the
project’s jobs and dependency files:
$ python jobs.py build foo.zip
More
Aliases
To avoid having to enter the server’s URL on every upload (or hard-coding it
into our project’s configuration file, ugh), we can define aliases in
~/.azkabanrc:
[foo]
url = http://url.to.foo.server:port
[bar]
url = http://url.to.bar.server:port
We can now upload directly to each of these URLs with the shorthand:
$ python jobs.py upload -a foo
This has the added benefit that we won’t have to authenticate on every upload. The session ID is cached and reused for later connections.
Pig jobs
A PigJob class is provided, which automatically sets the job type and
adds the corresponding script file to the project.
from azkaban import PigJob
project.add_job('baz', PigJob('/.../baz.pig', {'dependencies': 'bar'}))
Customization
Any valid python code can go inside the jobs configuration file. This includes
using loops to add jobs, subclassing the base Job class to better suit
a project’s needs…
Metadata
Release files for azkaban 0.1.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 |
|---|---|---|---|---|
| azkaban-0.1.1.tar.gz | 5.7 kB | Without provenance | Details for azkaban-0.1.1.tar.gz |
Release files / azkaban-0.1.1.tar.gz
| Download URL | azkaban-0.1.1.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
025462856d88e1cf5a448667a0075a4bffe2fef78d189b3b66882483c1aafd60
|
|
BLAKE2b-256 checksum How to use checksums |
8cb4eebab66c8ad08794e8982b3491ab8e5ea9daf760a26bd649a485b9dc4505
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for azkaban 0.1.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.