Skip to main content

No project description provided

Project description

About The Project

This repository is a collection of sample utils to use with airflow.

Requirements

Python 3.9+
Airflow 2.6+

Features

Proxy database user

Addresses authorization issues in multi-user Airflow environments by allowing multiple users to access the database through a single user (e.g airflowuser) and execute queries via specific child roles with limited set of access rights.

Usage

Proxy sqlalchemy engine

from airflowx.security import ProxyUserEngineWrapper
from airflow.providers.postgres.hooks.postgres import PostgresHook

hook = PostgresHook(postgres_conn_id="some-conn-id")
db_uri = hook.get_uri()
engine = ProxyUserEngineWrapper.proxy_user_engine_from_url(url=db_uri, role="some-role")

Proxy postgres operator

from airflowx.security import ProxyUserPostgresOperator
task_postgres_op = ProxyUserPostgresOperator(task_id="some-postgres-task",
                                             role="some-user",
                                             sql="select 1")

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

airflowx-0.1.0.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

airflowx-0.1.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

Details for the file airflowx-0.1.0.tar.gz.

File metadata

  • Download URL: airflowx-0.1.0.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.8 Linux/6.7.12-1-MANJARO

File hashes

Hashes for airflowx-0.1.0.tar.gz
Algorithm Hash digest
SHA256 86f42a2f2ed0cebc0929f7dac1a88246bf99cccdfa03b07812396e8c73ef435d
MD5 5766f87521cf6ae4947835bb7f34b360
BLAKE2b-256 7fcb3a2fe1fb10f7364b11f722df6bacc1bf8f3cd0b8c3bf2fb25628beaa304f

See more details on using hashes here.

File details

Details for the file airflowx-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: airflowx-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.11.8 Linux/6.7.12-1-MANJARO

File hashes

Hashes for airflowx-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 df3515df9b99c60ab8761b58309a94acc572466d4f6b95ff237c0882e3db702d
MD5 36b15574794bd88c4bce0ab5753c4d2f
BLAKE2b-256 14632fb5e74134b75cc27a5beb7f794cc4696f96ee0b021c4195fdba2b6a53b5

See more details on using hashes here.

Supported by

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