Skip to main content

Apache Airflow API (Stable)

Project description

Apache Airflow Python Client

NOTE: The Apache Airflow Client is still under active development and some methods or APIs might be broken. Please raise an issue in github if you encounter any such issues.

Requirements.

Python >= 3.6

Installation & Usage

pip install

You can install directly using pip:

pip install apache-airflow-client

Setuptools

Or install via Setuptools.

git clone git@github.com:apache/airflow-client-python.git
cd airflow-client-python
python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import airflow_client.client

Getting Started

Please follow the installation procedure and then run the following:

import airflow_client.client
from pprint import pprint
from airflow_client.client.api import config_api

#
# In case of the basic authentication below. Make sure:
#  - Airflow is configured with the basic_auth as backend:
#     auth_backend = airflow.api.auth.backend.basic_auth
#  - Make sure that the client has been generated with securitySchema Basic.

# Configure HTTP basic authorization: Basic
configuration = airflow_client.client.Configuration(
    host="http://localhost/api/v1",
    username='admin',
    password='admin'
)


# Enter a context with an instance of the API client
with airflow_client.client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = config_api.ConfigApi(api_client)

    try:
        # Get current configuration
        api_response = api_instance.get_config()
        pprint(api_response)
    except airflow_client.client.ApiException as e:
        print("Exception when calling ConfigApi->get_config: %s\n" % e)

See README for full client API documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

apache-airflow-client-2.5.1rc1.tar.gz (192.5 kB view details)

Uploaded Source

Built Distribution

apache_airflow_client-2.5.1rc1-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

Details for the file apache-airflow-client-2.5.1rc1.tar.gz.

File metadata

File hashes

Hashes for apache-airflow-client-2.5.1rc1.tar.gz
Algorithm Hash digest
SHA256 f3e9c592573c6ef32fd9cf66c557269a7f8752ece798c561040d7ecb12642501
MD5 4d7ad60d37cec68ad4f24267cac4f67c
BLAKE2b-256 3273c0b833e5caa78cb744dad139604acb0de5622e76d50ecaa66ea674e2fbab

See more details on using hashes here.

File details

Details for the file apache_airflow_client-2.5.1rc1-py3-none-any.whl.

File metadata

File hashes

Hashes for apache_airflow_client-2.5.1rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 652b0b77d7d15e3950106250fb6f88f6cc3b98c90b379829ea78a451eb51a696
MD5 8d0ad42f29ef60b354730abc8425c835
BLAKE2b-256 cea01aac24bcb1930af40b728d8f000912f090cda3e9336981bf5e99e866df45

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page