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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file apache-airflow-client-2.6.0rc2.tar.gz
.
File metadata
- Download URL: apache-airflow-client-2.6.0rc2.tar.gz
- Upload date:
- Size: 199.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba34b227a4d6b8704ca09cbd69b5cc3a1a9dfb45d8cc139a74d6169923b09e16 |
|
MD5 | a923bf61d69bb660a9414272f5bc1aba |
|
BLAKE2b-256 | 18cd372607d0d27f90fac7590a7c2b8016272e2a09f67859c914bfad4714ec44 |
File details
Details for the file apache_airflow_client-2.6.0rc2-py3-none-any.whl
.
File metadata
- Download URL: apache_airflow_client-2.6.0rc2-py3-none-any.whl
- Upload date:
- Size: 1.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b18e7f7d4c3b44752f8fab315c86b5982de46f6b9466b0a96d313358b5cde358 |
|
MD5 | 1456c20608b3d059cc514f6c361f5ef0 |
|
BLAKE2b-256 | ab9cbaf1ce48c7a126f08de45c1d2904dfee60a93dd882684fed7741d5aad86b |