Skip to main content

airflow-stubs

PyPI - Version


Table of Contents

Installation

pip install airflow-stubs

Introduction

This is not meant to improve the type hints of Airflow. Instead it's meant to offer some basic type hints when Airflow is not installed.

Lots of stuff is broken. Use at your own risk.

Motivation

Airflow has lots of dependencies. I want to be able to run it via Docker Compose as in simple-airflow without installing it in my project. I do however want to define DAGs in my project that use @task.docker. Installing the stubs alleviates some of the errors from not having Airflow installed in my environment.

Notes on regenerating

rm -rf dist
docker run -it --name generate-airflow-stubs -v "$(pwd)/generate-stubs-in-container.sh:/generate-stubs-in-container.sh:ro" apache/airflow bash /generate-stubs-in-container.sh
docker cp generate-airflow-stubs:/home/airflow/out/airflow .
docker rm generate-airflow-stubs
rm -rf airflow-stubs
mv airflow airflow-stubs
python -m build .

In order to render airflow.models.dag I had to patch get_members in mypy in order to retry on RuntimeError: dictionary changed size during iteration. (I used try: ... except RuntimeError: return self.get_members(obj).)

Publishing to PyPI is manual for now: twine upload dist/*.

License

airflow-stubs is distributed under the terms of the MIT license.

Metadata

Release files for airflow-stubs 0.0.2

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

Source distribution (sdist)

Source distribution for airflow-stubs 0.0.2
File Size Uploaded
airflow_stubs-0.0.2.tar.gz 155.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for airflow-stubs 0.0.2
File Interpreter ABI Platform
airflow_stubs-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 566.4 kB

Release files / airflow_stubs-0.0.2.tar.gz

Download URL airflow_stubs-0.0.2.tar.gz
Size 155.5 kB
Tags Source
SHA-256 checksum
How to use checksums
3aa6ee705c84d0bd0f94111438fc5eb4ed46605d20269b96eed925639bc0c9da
BLAKE2b-256 checksum
How to use checksums
c0a5e995f01fa01e3d21bc4d083bf0ad9a5803ae31543758b132fffebc3dbea0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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 Apr 10, 2025.

Transparency log

Release files / airflow_stubs-0.0.2-py3-none-any.whl

Download URL airflow_stubs-0.0.2-py3-none-any.whl
Size 410.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1119ff0e717f400ffcf181d4d1dee9736d75ebfae551fec71d50d830f4f67f39
BLAKE2b-256 checksum
How to use checksums
a70a7be9510d433308497b39943d12f1e53fd2e655c02ee08dc8551c3c984be2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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 Apr 10, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

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