Skip to main content

AWS Glue Toolkit

A streamlined CLI utility designed to simplify the AWS Glue development lifecycle.

Disclaimer: This is an independent, community-maintained project. It is not affiliated with, endorsed by, or sponsored by Amazon Web Services (AWS). AWS, AWS Glue, and related marks are trademarks of Amazon.com, Inc. or its affiliates.

Installation

Requires Python 3.11+ and Docker for check, run, test, and gtk build --mode container (assumed installed, never installed by gtk). Default gtk build (--mode host) does not need Docker. Installing the package adds the gtk command and a compatible pip release.

pip install aws-glue-toolkit

Example

A Glue job is a directory with a pyproject.toml and a source tree. Given this layout:

my-glue-job/
  pyproject.toml
  src/
    __main__.py
  tests/
    test_example.py

configure the job in pyproject.toml:

[project]
name = "my-glue-job"
version = "0.1.0"
dependencies = ["pandas>=2"]

[tool.aws-glue-toolkit]
glue_version = "5.1"
source = "src"
script = "__main__.py"
tests = "tests"

then run:

cd my-glue-job
gtk check .
gtk build .
gtk run .
gtk test .

Configuration

Each job is a directory containing pyproject.toml. Unknown keys are ignored. The source directory and entry script must exist before gtk runs.

Field Required Default Description
project.name yes — Job name; used in artifact file names
project.version no 0.0.0 Job version; used in artifact file names
project.dependencies no [] Direct dependencies as PEP 508 strings (PyPI, file: path, or git/VCS)
tool.aws-glue-toolkit.glue_version yes — Glue release; bundled pins for 5.0 and 5.1
tool.aws-glue-toolkit.source yes — Source directory, relative to the job root
tool.aws-glue-toolkit.script yes — Entry script, relative to source
tool.aws-glue-toolkit.tests no tests Test directory, relative to the job root

Pip configuration

For container pip (check, build --mode container, and dep install on run / test), gtk snapshots the host’s effective pip configuration (files + PIP_*, env wins) into a temporary pip.conf, mounts it, and sets PIP_CONFIG_FILE. Host-local keys (cache-dir, cert, target, and similar) are omitted. With gtk build (default --mode host), host pip config applies directly.

# ~/.config/pip/pip.conf  or:
export PIP_EXTRA_INDEX_URL="https://my.company/simple"
gtk check .

Commands

[JOB-DIR] is the job directory path, passed as a positional argument or with --job-dir [JOB-DIR] (default: .). Docker must be available for check, run, test, and gtk build --mode container (Glue image pulled on first use). Default gtk build (--mode host) does not need Docker. gtk never installs Docker.

Command Usage
check gtk check [JOB-DIR]
build gtk build [JOB-DIR] [--mode host|container]
run gtk run [JOB-DIR] [args...]
test gtk test [JOB-DIR] [pytest args...]

For run / test: job dir mounted at /home/hadoop/workspace; non-empty project.dependencies install into an ephemeral PYTHONPATH target (Glue pins as constraints); stdio pass through; exit code is the container command’s (or pip’s if install fails). Same dependency forms as check / build.

check

Resolves project.dependencies in the Glue image for glue_version against bundled pins. Does not write files.

build

Writes a dependencies zip (host: .py under source) and a gluewheels zip.

  • --mode host (default): host packaging (no Docker). Path/VCS via pip wheel --no-deps; other packages via pip download --platform --only-binary=:all:, or sdist→wheel on the host when no compatible wheel exists. Wheels must be any or the Glue pip_platform (use --mode container for compiled packages that need a worker-arch build). VCS needs network and git on the host.
  • --mode container: pip wheel in the Glue image (linux/amd64). On ARM hosts this needs QEMU (or similar) unless you use --mode host for portable wheels.

Path deps must be installable packages (pyproject.toml or setup.py); loose job modules belong under source. Both zips are always written; gluewheels omits packages already pinned on the image at the same version.

File Glue parameter Contents
{name}-{version}.dependencies.zip --extra-py-files .py files under source, except the entry script
{name}-{version}.gluewheels.zip --additional-python-modules (Glue 5.0+) wheels/requirements.txt and *.whl per AWS Glue Appendix A

Dependency forms

Form Example Notes
PyPI pydantic==2.13.4 Version pins or ranges
Path (in job) my-lib @ file:./libs/my-lib Built into a wheel at build time
Path (monorepo) shared @ file:../packages/shared Container mode: mounted into the image; host mode: host path
Git (HTTPS) tool @ git+https://github.com/org/tool.git@v1 Needs network + git

Editable installs (-e) are rejected.

run

spark-submit on the entry script. Passes --JOB_NAME from project.name unless overridden. Extra --key value tokens after [JOB-DIR] go to getResolvedOptions (pass an explicit [JOB-DIR] when using .). Shuts down the Spark driver so the container returns.

test

python3 -m pytest. PYTHONPATH includes source (and the install target when deps are present). Default target is the configured tests dir; if the first forwarded token starts with -, that dir is still passed first (gtk test . -v); if it is a path, only those tokens go to pytest.

Exit codes

Code Meaning
65 Dependencies unsatisfiable with Glue runtime pins
66 pyproject.toml missing or unreadable
69 Docker not available or could not be started
70 Build pipeline failed
78 Invalid pyproject.toml, job layout, unsupported Glue version, or invalid dependency

Success is 0; unhandled errors are 1. For run / test, a successful Docker launch returns the container command’s exit code (not limited to the table above).

Architecture

Two-layer module layout (core and shell) is documented in docs/architecture.md.

Contributing

Contributions are welcome. See CONTRIBUTING.md for setup and workflow. Participants are expected to follow the Code of Conduct. Report security vulnerabilities privately via SECURITY.md.

License

This project is licensed under the MIT License — see the LICENSE file for details.

Release files for aws-glue-toolkit 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aws-glue-toolkit 0.3.0
File Size Uploaded
aws_glue_toolkit-0.3.0.tar.gz 25.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aws-glue-toolkit 0.3.0
File Interpreter ABI Platform
aws_glue_toolkit-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 59.0 kB

Release files / aws_glue_toolkit-0.3.0.tar.gz

Download URL aws_glue_toolkit-0.3.0.tar.gz
Size 25.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2958e29c856d755abcde8d437f8c981ef34e1c42ed8a716477b562dfb4a0d31c
BLAKE2b-256 checksum
How to use checksums
46ae91a3ad9f03dbb6a4e48a3b2bc766d9f1203f8b94a9d82afeb09a93c2127d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log

Release files / aws_glue_toolkit-0.3.0-py3-none-any.whl

Download URL aws_glue_toolkit-0.3.0-py3-none-any.whl
Size 33.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
669656a69b52bbab23a498ba9cd18f06b0c722fe7489f30ee95d07b2225fdda1
BLAKE2b-256 checksum
How to use checksums
35ad5e4c450779da34a58bda5a475f4d01420535e6307a0e3b13b27f23a67793
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 1, 2026.

Transparency log

Release history Release notifications | RSS feed

0.4.0

2 release files

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page