id
int64
0
328k
repository_name
stringlengths
7
58
file_path
stringlengths
9
302
class_name
stringlengths
5
256
human_written_code
stringlengths
16
2.16M
class_skeleton
stringlengths
18
1.49M
⌀
total_program_units
int64
1
1.76k
total_doc_str
int64
0
771
AvgCountLine
float64
0
7.89k
AvgCountLineBlank
float64
0
297
AvgCountLineCode
float64
0
7.89k
AvgCountLineComment
float64
0
7.89k
AvgCyclomatic
float64
0
130
CommentToCodeRatio
float64
0
168
CountClassBase
float64
0
40
CountClassCoupled
float64
0
583
CountClassCoupledModified
float64
0
575
CountClassDerived
float64
0
5.35k
CountDeclInstanceMethod
float64
0
529
CountDeclInstanceVariable
float64
0
296
CountDeclMethod
float64
0
599
CountDeclMethodAll
float64
0
1.12k
CountLine
float64
1
40.4k
CountLineBlank
float64
0
8.16k
CountLineCode
float64
1
25.7k
CountLineCodeDecl
float64
1
8.15k
CountLineCodeExe
float64
0
24.2k
CountLineComment
float64
0
16.5k
CountStmt
float64
1
9.71k
CountStmtDecl
float64
1
8.15k
CountStmtExe
float64
0
9.69k
MaxCyclomatic
float64
0
759
MaxInheritanceTree
float64
0
16
MaxNesting
float64
0
34
SumCyclomatic
float64
0
2.9k
7,900
apache/airflow
apache_airflow/providers/fab/src/airflow/providers/fab/www/extensions/init_views.py
fab.www.extensions.init_views._LazyResolution
from functools import cached_property class _LazyResolution: """ OpenAPI endpoint that lazily resolves the function on first use. This is a stand-in replacement for ``connexion.Resolution`` that implements its public attributes ``function`` and ``operation_id``, but the function is only resolved w...
class _LazyResolution: ''' OpenAPI endpoint that lazily resolves the function on first use. This is a stand-in replacement for ``connexion.Resolution`` that implements its public attributes ``function`` and ``operation_id``, but the function is only resolved when it is first accessed. ''' ...
4
1
3
0
3
0
1
0.86
0
0
0
0
2
2
2
2
16
3
7
6
3
6
6
5
3
1
0
0
2
7,901
apache/airflow
apache_airflow/providers/fab/src/airflow/providers/fab/www/extensions/init_views.py
fab.www.extensions.init_views._LazyResolver
from connexion import Resolver class _LazyResolver(Resolver): """ OpenAPI endpoint resolver that loads lazily on first use. This re-implements ``connexion.Resolver.resolve()`` to not eagerly resolve the endpoint function (and thus avoid importing it in the process), but only return a placeholder t...
class _LazyResolver(Resolver): ''' OpenAPI endpoint resolver that loads lazily on first use. This re-implements ``connexion.Resolver.resolve()`` to not eagerly resolve the endpoint function (and thus avoid importing it in the process), but only return a placeholder that will be actually resolved wh...
2
1
3
0
3
0
1
1.75
1
1
1
0
1
0
1
1
13
2
4
3
2
7
4
3
2
1
1
0
1
7,902
apache/airflow
apache_airflow/providers/fab/src/airflow/providers/fab/www/security/permissions.py
fab.www.security.permissions.ResourceDetails
from typing import TypedDict class ResourceDetails(TypedDict): """Details of a resource (actions and prefix).""" actions: set[str] prefix: str
class ResourceDetails(TypedDict): '''Details of a resource (actions and prefix).''' pass
1
1
0
0
0
0
0
0.33
1
0
0
0
0
0
0
0
5
1
3
1
2
1
3
1
2
0
1
0
0
7,903
apache/airflow
apache_airflow/providers/fab/src/airflow/providers/fab/www/security_manager.py
fab.www.security_manager.AirflowSecurityManagerV2
from collections.abc import Callable from flask_limiter.util import get_remote_address from airflow.api_fastapi.app import get_auth_manager from airflow.providers.fab.www.utils import CustomSQLAInterface, get_method_from_fab_action_map from flask import g from airflow.utils.log.logging_mixin import LoggingMixin from fl...
class AirflowSecurityManagerV2(LoggingMixin): ''' Minimal security manager needed to run a Flask application. This one is used to run the Flask application needed to run Airflow 2 plugins unless Fab auth manager is configured in the environment. In that case, ``FabAirflowSecurityManagerOverride`` is us...
8
3
14
1
11
2
2
0.18
1
14
9
1
11
2
12
18
230
30
170
47
144
30
93
41
73
4
1
3
39
7,904
apache/airflow
apache_airflow/providers/fab/src/airflow/providers/fab/www/session.py
fab.www.session.AirflowDatabaseSessionInterface
from flask_session.sessions import SqlAlchemySessionInterface class AirflowDatabaseSessionInterface(SessionExemptMixin, SqlAlchemySessionInterface): """Session interface that exempts some routes and stores session data in the database."""
class AirflowDatabaseSessionInterface(SessionExemptMixin, SqlAlchemySessionInterface): '''Session interface that exempts some routes and stores session data in the database.''' pass
1
1
0
0
0
0
0
1
2
0
0
0
0
0
0
1
2
0
1
1
0
1
1
1
0
0
1
0
0
7,905
apache/airflow
apache_airflow/providers/fab/src/airflow/providers/fab/www/session.py
fab.www.session.AirflowSecureCookieSessionInterface
from flask.sessions import SecureCookieSessionInterface class AirflowSecureCookieSessionInterface(SessionExemptMixin, SecureCookieSessionInterface): """Session interface that exempts some routes and stores session data in a signed cookie."""
class AirflowSecureCookieSessionInterface(SessionExemptMixin, SecureCookieSessionInterface): '''Session interface that exempts some routes and stores session data in a signed cookie.''' pass
1
1
0
0
0
0
0
1
2
0
0
0
0
0
0
1
2
0
1
1
0
1
1
1
0
0
1
0
0
7,906
apache/airflow
apache_airflow/providers/fab/src/airflow/providers/fab/www/session.py
fab.www.session.SessionExemptMixin
from flask import request class SessionExemptMixin: """Exempt certain blueprints/paths from autogenerated sessions.""" def save_session(self, *args, **kwargs): """Prevent creating session from REST API and health requests.""" if request.blueprint == '/api/v1': return None i...
class SessionExemptMixin: '''Exempt certain blueprints/paths from autogenerated sessions.''' def save_session(self, *args, **kwargs): '''Prevent creating session from REST API and health requests.''' pass
2
2
7
0
6
1
3
0.29
0
1
0
2
1
0
1
1
10
1
7
2
5
2
7
2
5
3
0
1
3
7,907
apache/airflow
apache_airflow/providers/fab/src/airflow/providers/fab/www/utils.py
fab.www.utils.AirflowFilterConverter
from flask_appbuilder.models.sqla import filters as fab_sqlafilters class AirflowFilterConverter(fab_sqlafilters.SQLAFilterConverter): """Retrieve conversion tables for Airflow-specific filters.""" conversion_table = (('is_utcdatetime', [UtcAwareFilterEqual, UtcAwareFilterGreater, UtcAwareFilterSmaller, UtcAwa...
class AirflowFilterConverter(fab_sqlafilters.SQLAFilterConverter): '''Retrieve conversion tables for Airflow-specific filters.''' def __init__(self, datamodel): pass
2
1
8
1
7
0
4
0.13
1
3
2
0
1
0
1
1
30
3
24
4
22
3
9
4
7
4
1
2
4
7,908
apache/airflow
apache_airflow/providers/fab/src/airflow/providers/fab/www/utils.py
fab.www.utils.CustomSQLAInterface
from sqlalchemy.ext.associationproxy import AssociationProxy from flask_appbuilder.models.sqla.interface import SQLAInterface from typing import TYPE_CHECKING, Any from sqlalchemy import types class CustomSQLAInterface(SQLAInterface): """ FAB does not know how to handle columns with leading underscores because...
class CustomSQLAInterface(SQLAInterface): ''' FAB does not know how to handle columns with leading underscores because they are not supported by WTForm. This hack will remove the leading '_' from the key to lookup the column names. ''' def __init__(self, obj, session: Session | None=None): ...
7
4
10
1
9
1
3
0.19
1
5
2
0
5
0
5
5
69
12
48
16
38
9
38
16
28
4
1
3
15
7,909
apache/airflow
apache_airflow/providers/fab/src/airflow/providers/fab/www/utils.py
fab.www.utils.FilterGreaterOrEqual
from flask_appbuilder.models.filters import BaseFilter from flask_babel import lazy_gettext from flask_appbuilder.models.sqla.filters import get_field_setup_query, set_value_to_type class FilterGreaterOrEqual(BaseFilter): """Greater than or Equal filter.""" name = lazy_gettext('Greater than or Equal') arg_...
class FilterGreaterOrEqual(BaseFilter): '''Greater than or Equal filter.''' def apply(self, query, value): pass
2
1
8
2
6
0
2
0.11
1
0
0
1
1
0
1
1
14
4
9
5
7
1
9
5
7
2
1
1
2
7,910
apache/airflow
apache_airflow/providers/fab/src/airflow/providers/fab/www/utils.py
fab.www.utils.FilterIsNotNull
from flask_appbuilder.models.sqla.filters import get_field_setup_query, set_value_to_type from flask_appbuilder.models.filters import BaseFilter from flask_babel import lazy_gettext class FilterIsNotNull(BaseFilter): """Is not null filter.""" name = lazy_gettext('Is not Null') arg_name = 'nemp' def ap...
class FilterIsNotNull(BaseFilter): '''Is not null filter.''' def apply(self, query, value): pass
2
1
4
0
4
0
1
0.14
1
0
0
0
1
0
1
1
10
2
7
5
5
1
7
5
5
1
1
0
1
7,911
apache/airflow
apache_airflow/providers/fab/src/airflow/providers/fab/www/utils.py
fab.www.utils.FilterIsNull
from flask_babel import lazy_gettext from flask_appbuilder.models.filters import BaseFilter from flask_appbuilder.models.sqla.filters import get_field_setup_query, set_value_to_type class FilterIsNull(BaseFilter): """Is null filter.""" name = lazy_gettext('Is Null') arg_name = 'emp' def apply(self, qu...
class FilterIsNull(BaseFilter): '''Is null filter.''' def apply(self, query, value): pass
2
1
4
0
4
0
1
0.14
1
0
0
0
1
0
1
1
10
2
7
5
5
1
7
5
5
1
1
0
1
7,912
apache/airflow
apache_airflow/providers/fab/src/airflow/providers/fab/www/utils.py
fab.www.utils.FilterSmallerOrEqual
from flask_babel import lazy_gettext from flask_appbuilder.models.sqla.filters import get_field_setup_query, set_value_to_type from flask_appbuilder.models.filters import BaseFilter class FilterSmallerOrEqual(BaseFilter): """Smaller than or Equal filter.""" name = lazy_gettext('Smaller than or Equal') arg_...
class FilterSmallerOrEqual(BaseFilter): '''Smaller than or Equal filter.''' def apply(self, query, value): pass
2
1
8
2
6
0
2
0.11
1
0
0
1
1
0
1
1
14
4
9
5
7
1
9
5
7
2
1
1
2
7,913
apache/airflow
apache_airflow/providers/fab/src/airflow/providers/fab/www/utils.py
fab.www.utils.UtcAwareFilterEqual
from flask_appbuilder.models.sqla import filters as fab_sqlafilters class UtcAwareFilterEqual(UtcAwareFilterMixin, fab_sqlafilters.FilterEqual): """Equality filter for UTC time."""
class UtcAwareFilterEqual(UtcAwareFilterMixin, fab_sqlafilters.FilterEqual): '''Equality filter for UTC time.''' pass
1
1
0
0
0
0
0
1
2
0
0
0
0
0
0
1
2
0
1
1
0
1
1
1
0
0
1
0
0
7,914
apache/airflow
apache_airflow/providers/fab/src/airflow/providers/fab/www/utils.py
fab.www.utils.UtcAwareFilterGreater
from flask_appbuilder.models.sqla import filters as fab_sqlafilters class UtcAwareFilterGreater(UtcAwareFilterMixin, fab_sqlafilters.FilterGreater): """Greater Than filter for UTC time."""
class UtcAwareFilterGreater(UtcAwareFilterMixin, fab_sqlafilters.FilterGreater): '''Greater Than filter for UTC time.''' pass
1
1
0
0
0
0
0
1
2
0
0
0
0
0
0
1
2
0
1
1
0
1
1
1
0
0
1
0
0
7,915
apache/airflow
apache_airflow/providers/fab/src/airflow/providers/fab/www/utils.py
fab.www.utils.UtcAwareFilterGreaterOrEqual
class UtcAwareFilterGreaterOrEqual(UtcAwareFilterMixin, FilterGreaterOrEqual): """Greater than or Equal filter for UTC time."""
class UtcAwareFilterGreaterOrEqual(UtcAwareFilterMixin, FilterGreaterOrEqual): '''Greater than or Equal filter for UTC time.''' pass
1
1
0
0
0
0
0
1
2
0
0
0
0
0
0
2
2
0
1
1
0
1
1
1
0
0
2
0
0
7,916
apache/airflow
apache_airflow/providers/fab/src/airflow/providers/fab/www/utils.py
fab.www.utils.UtcAwareFilterMixin
from airflow.utils import timezone class UtcAwareFilterMixin: """Mixin for filter for UTC time.""" def apply(self, query, value): """Apply the filter.""" if isinstance(value, str) and (not value.strip()): value = None else: value = timezone.parse(value, timezone...
class UtcAwareFilterMixin: '''Mixin for filter for UTC time.''' def apply(self, query, value): '''Apply the filter.''' pass
2
2
8
1
6
1
2
0.29
0
2
0
6
1
0
1
1
11
2
7
2
5
2
6
2
4
2
0
1
2
7,917
apache/airflow
apache_airflow/providers/fab/src/airflow/providers/fab/www/utils.py
fab.www.utils.UtcAwareFilterNotEqual
from flask_appbuilder.models.sqla import filters as fab_sqlafilters class UtcAwareFilterNotEqual(UtcAwareFilterMixin, fab_sqlafilters.FilterNotEqual): """Not Equal To filter for UTC time."""
class UtcAwareFilterNotEqual(UtcAwareFilterMixin, fab_sqlafilters.FilterNotEqual): '''Not Equal To filter for UTC time.''' pass
1
1
0
0
0
0
0
1
2
0
0
0
0
0
0
1
2
0
1
1
0
1
1
1
0
0
1
0
0
7,918
apache/airflow
apache_airflow/providers/fab/src/airflow/providers/fab/www/utils.py
fab.www.utils.UtcAwareFilterSmaller
from flask_appbuilder.models.sqla import filters as fab_sqlafilters class UtcAwareFilterSmaller(UtcAwareFilterMixin, fab_sqlafilters.FilterSmaller): """Smaller Than filter for UTC time."""
class UtcAwareFilterSmaller(UtcAwareFilterMixin, fab_sqlafilters.FilterSmaller): '''Smaller Than filter for UTC time.''' pass
1
1
0
0
0
0
0
1
2
0
0
0
0
0
0
1
2
0
1
1
0
1
1
1
0
0
1
0
0
7,919
apache/airflow
apache_airflow/providers/fab/src/airflow/providers/fab/www/utils.py
fab.www.utils.UtcAwareFilterSmallerOrEqual
class UtcAwareFilterSmallerOrEqual(UtcAwareFilterMixin, FilterSmallerOrEqual): """Smaller than or Equal filter for UTC time."""
class UtcAwareFilterSmallerOrEqual(UtcAwareFilterMixin, FilterSmallerOrEqual): '''Smaller than or Equal filter for UTC time.''' pass
1
1
0
0
0
0
0
1
2
0
0
0
0
0
0
2
2
0
1
1
0
1
1
1
0
0
2
0
0
7,920
apache/airflow
apache_airflow/providers/fab/src/airflow/providers/fab/www/views.py
fab.www.views.FabIndexView
from airflow.api_fastapi.auth.managers.base_auth_manager import COOKIE_NAME_JWT_TOKEN from flask import g, make_response, redirect, render_template, request, url_for from airflow.configuration import conf from airflow.api_fastapi.app import get_auth_manager from flask_appbuilder import IndexView, expose class FabIndex...
class FabIndexView(IndexView): ''' A simple view that inherits from FAB index view. The only goal of this view is to redirect the user to the Airflow 3 UI index page if the user is authenticated. It is impossible to redirect the user directly to the Airflow 3 UI index page before redirecting them t...
3
1
6
0
6
0
2
1
1
1
0
0
1
0
1
1
19
3
8
4
5
8
6
3
4
2
1
1
2
7,921
apache/airflow
apache_airflow/providers/facebook/src/airflow/providers/facebook/ads/hooks/ads.py
facebook.ads.hooks.ads.FacebookAdsReportingHook
from typing import TYPE_CHECKING, Any from airflow.providers.facebook.version_compat import BaseHook from airflow.exceptions import AirflowException from facebook_business.adobjects.adreportrun import AdReportRun from facebook_business.adobjects.adaccount import AdAccount import time from functools import cached_proper...
class FacebookAdsReportingHook(BaseHook): ''' Facebook Ads API. .. seealso:: For more information on the Facebook Ads API, take a look at the API docs: https://developers.facebook.com/docs/marketing-apis/ :param facebook_conn_id: Airflow Facebook Ads connection ID :param api_version...
9
6
20
1
13
6
2
0.48
1
9
2
0
6
3
6
18
144
15
87
49
62
42
53
31
46
4
2
2
12
7,922
apache/airflow
apache_airflow/providers/facebook/src/airflow/providers/facebook/ads/hooks/ads.py
facebook.ads.hooks.ads.JobStatus
from enum import Enum class JobStatus(Enum): """Available options for facebook async task status.""" COMPLETED = 'Job Completed' STARTED = 'Job Started' RUNNING = 'Job Running' FAILED = 'Job Failed' SKIPPED = 'Job Skipped'
class JobStatus(Enum): '''Available options for facebook async task status.''' pass
1
1
0
0
0
0
0
0.17
1
0
0
0
0
0
0
49
8
1
6
6
5
1
6
6
5
0
4
0
0
7,923
apache/airflow
apache_airflow/providers/apache/flink/src/airflow/providers/apache/flink/operators/flink_kubernetes.py
flink.operators.flink_kubernetes.FlinkKubernetesOperator
from functools import cached_property from airflow.providers.cncf.kubernetes.hooks.kubernetes import KubernetesHook from collections.abc import Sequence from airflow.providers.apache.flink.version_compat import BaseOperator class FlinkKubernetesOperator(BaseOperator): """ Creates flinkDeployment object in kube...
class FlinkKubernetesOperator(BaseOperator): ''' Creates flinkDeployment object in kubernetes cluster. .. seealso:: For more information on how to use this operator, take a look at the guide: :ref:`howto/operator:FlinkKubernetesOperator` .. seealso:: For more detail about Flink ...
7
1
13
0
13
0
1
0.39
1
4
1
0
4
9
4
4
86
9
56
34
36
22
26
19
21
1
1
0
4
7,924
apache/airflow
apache_airflow/providers/apache/flink/src/airflow/providers/apache/flink/sensors/flink_kubernetes.py
flink.sensors.flink_kubernetes.FlinkKubernetesSensor
from airflow.exceptions import AirflowException from collections.abc import Sequence from airflow.providers.cncf.kubernetes.hooks.kubernetes import KubernetesHook from airflow.providers.apache.flink.version_compat import BaseSensorOperator from kubernetes import client class FlinkKubernetesSensor(BaseSensorOperator): ...
class FlinkKubernetesSensor(BaseSensorOperator): ''' Checks flinkDeployment object in kubernetes cluster. .. seealso:: For more detail about Flink Deployment Object have a look at the reference: https://nightlies.apache.org/flink/flink-kubernetes-operator-docs-main/docs/custom-resource/refe...
4
1
27
1
26
0
5
0.17
1
7
2
0
3
8
3
24
104
9
81
41
66
14
53
29
49
8
3
3
14
7,925
apache/airflow
apache_airflow/providers/ftp/src/airflow/providers/ftp/hooks/ftp.py
ftp.hooks.ftp.FTPHook
from collections.abc import Callable from typing import Any, cast import datetime import ftplib from airflow.providers.ftp.version_compat import BaseHook class FTPHook(BaseHook): """ Interact with FTP. Errors that may occur throughout but should be handled downstream. You can specify mode for data tra...
class FTPHook(BaseHook): ''' Interact with FTP. Errors that may occur throughout but should be handled downstream. You can specify mode for data transfers in the extra field of your connection as ``{"passive": "true"}``. You can also specify encoding for the FTP connection as ``{"encoding": "cp...
17
14
13
2
6
5
2
0.92
1
12
0
1
16
2
16
28
247
52
102
54
77
94
92
45
75
5
2
3
29
7,926
apache/airflow
apache_airflow/providers/ftp/src/airflow/providers/ftp/hooks/ftp.py
ftp.hooks.ftp.FTPSHook
from typing import Any, cast import ftplib class FTPSHook(FTPHook): """Interact with FTPS.""" def get_conn(self) -> ftplib.FTP: """Return an FTPS connection object.""" import ssl if self.conn is None: params = self.get_connection(self.ftp_conn_id) pasv = params....
class FTPSHook(FTPHook): '''Interact with FTPS.''' def get_conn(self) -> ftplib.FTP: '''Return an FTPS connection object.''' pass
2
2
17
4
11
3
3
0.33
1
2
0
0
1
1
1
29
20
5
12
7
9
4
12
7
9
3
3
2
3
7,927
apache/airflow
apache_airflow/providers/ftp/src/airflow/providers/ftp/operators/ftp.py
ftp.operators.ftp.FTPFileTransmitOperator
from pathlib import Path from functools import cached_property from collections.abc import Sequence from ftplib import FTP_PORT from airflow.providers.ftp.hooks.ftp import FTPHook, FTPSHook from airflow.providers.ftp.version_compat import BaseOperator from typing import Any import socket import os class FTPFileTransmi...
class FTPFileTransmitOperator(BaseOperator): ''' FTPFileTransmitOperator for transferring files from remote host to local or vice a versa. This operator uses an FTPHook to open ftp transport channel that serve as basis for file transfer. .. seealso:: For more information on how to use this oper...
7
3
24
3
20
1
3
0.33
1
13
3
1
5
5
5
5
163
25
104
43
86
34
68
32
60
9
1
3
17
7,928
apache/airflow
apache_airflow/providers/ftp/src/airflow/providers/ftp/operators/ftp.py
ftp.operators.ftp.FTPOperation
class FTPOperation: """Operation that can be used with FTP.""" PUT = 'put' GET = 'get'
class FTPOperation: '''Operation that can be used with FTP.''' pass
1
1
0
0
0
0
0
0.33
0
0
0
0
0
0
0
0
5
1
3
3
2
1
3
3
2
0
0
0
0
7,929
apache/airflow
apache_airflow/providers/ftp/src/airflow/providers/ftp/operators/ftp.py
ftp.operators.ftp.FTPSFileTransmitOperator
from airflow.providers.ftp.hooks.ftp import FTPHook, FTPSHook from functools import cached_property class FTPSFileTransmitOperator(FTPFileTransmitOperator): """ FTPSFileTransmitOperator for transferring files from remote host to local or vice a versa. This operator uses an FTPSHook to open ftps transport ...
class FTPSFileTransmitOperator(FTPFileTransmitOperator): ''' FTPSFileTransmitOperator for transferring files from remote host to local or vice a versa. This operator uses an FTPSHook to open ftps transport channel that serve as basis for file transfer. .. seealso:: For more information on how t...
3
2
3
0
2
1
1
2
1
1
1
0
1
0
1
6
15
3
4
3
1
8
3
2
1
1
2
0
1
7,930
apache/airflow
apache_airflow/providers/ftp/src/airflow/providers/ftp/sensors/ftp.py
ftp.sensors.ftp.FTPSSensor
from airflow.providers.ftp.hooks.ftp import FTPHook, FTPSHook class FTPSSensor(FTPSensor): """Waits for a file or directory to be present on FTP over SSL.""" def _create_hook(self) -> FTPHook: """Return connection hook.""" return FTPSHook(ftp_conn_id=self.ftp_conn_id)
class FTPSSensor(FTPSensor): '''Waits for a file or directory to be present on FTP over SSL.''' def _create_hook(self) -> FTPHook: '''Return connection hook.''' pass
2
2
3
0
2
1
1
0.67
1
2
2
0
1
0
1
26
6
1
3
2
1
2
3
2
1
1
4
0
1
7,931
apache/airflow
apache_airflow/providers/ftp/src/airflow/providers/ftp/sensors/ftp.py
ftp.sensors.ftp.FTPSensor
from collections.abc import Sequence import re import ftplib from airflow.providers.ftp.version_compat import BaseSensorOperator from airflow.providers.ftp.hooks.ftp import FTPHook, FTPSHook class FTPSensor(BaseSensorOperator): """ Waits for a file or directory to be present on FTP. :param path: Remote fi...
class FTPSensor(BaseSensorOperator): ''' Waits for a file or directory to be present on FTP. :param path: Remote file or directory path :param fail_on_transient_errors: Fail on all errors, including 4xx transient errors. Default True. :param ftp_conn_id: The :ref:`ftp connection id <howto/c...
5
3
10
1
8
1
2
0.31
1
8
2
1
4
3
4
25
59
12
36
19
29
11
32
15
27
3
3
3
7
7,932
apache/airflow
apache_airflow/dev/stats/get_important_pr_candidates.py
get_important_pr_candidates.PrStat
import math from functools import cached_property class PrStat: PROVIDER_SCORE = 0.8 REGULAR_SCORE = 1.0 REVIEW_INTERACTION_VALUE = 2.0 COMMENT_INTERACTION_VALUE = 1.0 REACTION_INTERACTION_VALUE = 0.5 def __init__(self, pr_data: dict, issue_data: dict | None=None): self.pr_data = pr_da...
class PrStat: def __init__(self, pr_data: dict, issue_data: dict | None=None): pass def calc_comments(self): '''Process review comments.''' pass def calc_conv_comments(self): '''Process conversational comments, check for #protm tag, count reactions.''' pass d...
26
14
10
0
9
2
3
0.16
0
5
0
0
20
15
20
20
244
21
196
76
164
31
140
65
119
7
0
4
52
7,933
apache/airflow
apache_airflow/providers/github/src/airflow/providers/github/hooks/github.py
github.hooks.github.GithubHook
from typing import TYPE_CHECKING from airflow.exceptions import AirflowException from github import Github as GithubClient from airflow.providers.github.version_compat import BaseHook class GithubHook(BaseHook): """ Interact with GitHub. Performs a connection to GitHub and retrieves client. :param gi...
class GithubHook(BaseHook): ''' Interact with GitHub. Performs a connection to GitHub and retrieves client. :param github_conn_id: Reference to :ref:`GitHub connection id <howto/connection:github>`. ''' def __init__(self, github_conn_id: str=default_conn_name, *args, **kwargs) -> None: ...
6
4
11
1
8
2
2
0.29
1
7
1
0
3
2
4
16
60
11
38
16
32
11
32
14
27
4
2
2
9
7,934
apache/airflow
apache_airflow/providers/github/src/airflow/providers/github/operators/github.py
github.operators.github.GithubOperator
from airflow.providers.github.version_compat import BaseOperator from github import GithubException from collections.abc import Callable from airflow.exceptions import AirflowException from airflow.providers.github.hooks.github import GithubHook from typing import TYPE_CHECKING, Any class GithubOperator(BaseOperator):...
class GithubOperator(BaseOperator): ''' Interact and perform actions on GitHub API. This operator is designed to use GitHub's Python SDK: https://github.com/PyGithub/PyGithub .. seealso:: For more information on how to use this operator, take a look at the guide: :ref:`howto/operator:Gi...
3
1
15
2
13
1
3
0.43
1
8
3
0
2
4
2
2
49
9
28
21
17
12
20
11
17
4
1
2
5
7,935
apache/airflow
apache_airflow/providers/github/src/airflow/providers/github/sensors/github.py
github.sensors.github.BaseGithubRepositorySensor
from airflow.exceptions import AirflowException from collections.abc import Callable class BaseGithubRepositorySensor(GithubSensor): """ Base GitHub sensor at Repository level. :param github_conn_id: reference to a pre-defined GitHub Connection :param repository_name: full qualified name of the reposi...
class BaseGithubRepositorySensor(GithubSensor): ''' Base GitHub sensor at Repository level. :param github_conn_id: reference to a pre-defined GitHub Connection :param repository_name: full qualified name of the repository to be monitored, ex. "apache/airflow" ''' def __init__(self, *, github_c...
3
2
9
0
9
1
1
0.33
1
5
2
1
2
0
2
25
27
3
18
10
8
6
5
3
2
1
4
0
2
7,936
apache/airflow
apache_airflow/providers/github/src/airflow/providers/github/sensors/github.py
github.sensors.github.GithubSensor
from airflow.providers.github.hooks.github import GithubHook from airflow.providers.github.version_compat import BaseSensorOperator from collections.abc import Callable class GithubSensor(BaseSensorOperator): """ Base GithubSensor which can monitor for any change. :param github_conn_id: reference to a pre...
class GithubSensor(BaseSensorOperator): ''' Base GithubSensor which can monitor for any change. :param github_conn_id: reference to a pre-defined GitHub Connection :param method_name: method name from PyGithub to be executed :param method_params: parameters for the method method_name :param res...
3
1
12
1
11
0
2
0.3
1
6
2
1
2
4
2
23
35
5
23
17
12
7
15
9
12
2
3
1
4
7,937
apache/airflow
apache_airflow/providers/github/src/airflow/providers/github/sensors/github.py
github.sensors.github.GithubTagSensor
from typing import TYPE_CHECKING, Any from github import GithubException from airflow.exceptions import AirflowException class GithubTagSensor(BaseGithubRepositorySensor): """ Monitor a github tag for its creation. :param github_conn_id: reference to a pre-defined GitHub Connection :param tag_name: na...
class GithubTagSensor(BaseGithubRepositorySensor): ''' Monitor a github tag for its creation. :param github_conn_id: reference to a pre-defined GitHub Connection :param tag_name: name of the tag to be monitored :param repository_name: fully qualified name of the repository to be monitored, ex. "apa...
4
2
12
1
11
1
2
0.22
1
7
2
0
3
2
3
28
50
7
36
18
25
8
23
9
19
5
5
2
7
7,938
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/ads/hooks/ads.py
google.ads.hooks.ads.GoogleAdsHook
from google.auth.exceptions import GoogleAuthError from airflow.exceptions import AirflowException from airflow.providers.google.common.hooks.base_google import get_field from google.ads.googleads.errors import GoogleAdsException from functools import cached_property from typing import IO, TYPE_CHECKING, Any, Literal f...
class GoogleAdsHook(BaseHook): ''' Interact with Google Ads API. This hook offers two flows of authentication. 1. OAuth Service Account Flow (requires two connections) - gcp_conn_id - provides service account details (like any other GCP connection) - google_ads_conn_id - which contains ...
20
13
18
2
11
5
3
0.85
1
10
2
0
12
5
12
24
289
48
131
58
103
111
94
36
81
5
2
4
31
7,939
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/ads/operators/ads.py
google.ads.operators.ads.GoogleAdsListAccountsOperator
from airflow.providers.google.version_compat import BaseOperator from collections.abc import Sequence import csv from tempfile import NamedTemporaryFile from airflow.providers.google.ads.hooks.ads import GoogleAdsHook from airflow.providers.google.cloud.hooks.gcs import GCSHook class GoogleAdsListAccountsOperator(Base...
class GoogleAdsListAccountsOperator(BaseOperator): ''' Saves list of customers on GCS in form of a csv file. The resulting list of customers is based on your OAuth credentials. The request returns a list of all accounts that you are able to act upon directly given your current credentials. This will ...
3
1
22
2
19
1
1
0.64
1
6
2
0
2
7
2
2
84
12
44
28
30
28
23
16
20
1
1
1
2
7,940
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/ads/transfers/ads_to_gcs.py
google.ads.transfers.ads_to_gcs.GoogleAdsToGcsOperator
from tempfile import NamedTemporaryFile from airflow.providers.google.version_compat import BaseOperator from airflow.providers.google.ads.hooks.ads import GoogleAdsHook from airflow.providers.google.cloud.hooks.gcs import GCSHook import csv from collections.abc import Sequence from operator import attrgetter class Go...
class GoogleAdsToGcsOperator(BaseOperator): ''' Fetch daily results from the Google Ads API for 1-n clients. Converts and saves the data as a temporary CSV file Uploads the CSV to Google Cloud Storage. .. seealso:: For more information on the Google Ads API, take a look at the API docs: ...
3
1
34
2
31
1
3
0.44
1
11
3
0
2
11
2
2
113
11
71
38
53
31
34
21
31
3
1
1
5
7,941
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/_internal_client/secret_manager_client.py
google.cloud._internal_client.secret_manager_client._SecretManagerClient
from airflow.providers.google.common.consts import CLIENT_INFO from google.cloud.secretmanager_v1 import SecretManagerServiceClient from google.api_core.exceptions import InvalidArgument, NotFound, PermissionDenied from airflow.utils.log.logging_mixin import LoggingMixin from functools import cached_property import re ...
class _SecretManagerClient(LoggingMixin): ''' Retrieve Secrets object from Google Cloud Secrets Manager. This is a common class reused between SecretsManager and Secrets Hook that provides the shared authentication and verification mechanisms. This class should not be used directly; use SecretsMana...
7
4
12
1
9
3
2
0.46
1
3
0
0
3
1
4
10
65
8
39
15
29
18
24
10
19
4
1
1
7
7,942
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/alloy_db.py
google.cloud.hooks.alloy_db.AlloyDbHook
from airflow.exceptions import AirflowException from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault from collections.abc import Sequence from airflow.providers.google.common.consts import CLIENT_INFO from google.cloud import alloydb_v1 from copy import deepcopy import tenacity from airflow.providers.goo...
class AlloyDbHook(GoogleBaseHook): '''Google Alloy DB Hook.''' def __init__(self, *args, **kwargs): pass def get_alloy_db_admin_client(self) -> alloydb_v1.AlloyDBAdminClient: '''Retrieve AlloyDB client.''' pass def wait_for_operation(self, timeout: float | None, operation: Op...
44
21
44
2
22
20
1
0.85
1
10
1
0
21
1
21
55
976
57
496
283
234
423
78
47
56
3
3
1
28
7,943
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/automl.py
google.cloud.hooks.automl.CloudAutoMLHook
from functools import cached_property from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID, GoogleBaseHook from google.cloud.automl_v1beta1 import AutoMlClient, BatchPredictInputConfig, BatchPredictOutputConfig, Dataset, ExamplePayload, ImageObjectDetectionModelDeploymentMetadata, InputConfi...
@deprecated(planned_removal_date='September 30, 2025', use_instead='airflow.providers.google.cloud.hooks.vertex_ai.auto_ml.AutoMLHook, airflow.providers.google.cloud.hooks.translate.TranslateHook', category=AirflowProviderDeprecationWarning) class CloudAutoMLHook(GoogleBaseHook, OperationHelper): ''' Google Clo...
34
18
30
2
16
13
1
0.78
1
9
1
0
18
1
19
53
613
54
314
203
152
245
85
61
65
2
3
1
21
7,944
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/bigquery.py
google.cloud.hooks.bigquery.BigQueryAsyncHook
from aiohttp import ClientSession as ClientSession from airflow.exceptions import AirflowException, AirflowOptionalProviderFeatureException, AirflowProviderDeprecationWarning from google.cloud.bigquery import DEFAULT_RETRY, Client, CopyJob, ExtractJob, LoadJob, QueryJob, SchemaField, UnknownJob from collections.abc imp...
class BigQueryAsyncHook(GoogleBaseAsyncHook): '''Uses gcloud-aio library to retrieve Job details.''' def __init__(self, gcp_conn_id: str='google_cloud_default', impersonation_chain: str | Sequence[str] | None=None, **kwargs): pass async def get_job_instance(self, project_id: str | None, job_id: s...
16
12
23
2
16
5
3
0.34
1
15
2
1
11
0
13
29
323
38
213
98
157
73
113
51
99
7
3
3
34
7,945
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/bigquery.py
google.cloud.hooks.bigquery.BigQueryBaseCursor
from typing import TYPE_CHECKING, Any, Literal, NoReturn, cast, overload from airflow.utils.log.logging_mixin import LoggingMixin class BigQueryBaseCursor(LoggingMixin): """ BigQuery cursor. The BigQuery base cursor contains helper methods to execute queries against BigQuery. The methods can be used d...
class BigQueryBaseCursor(LoggingMixin): ''' BigQuery cursor. The BigQuery base cursor contains helper methods to execute queries against BigQuery. The methods can be used directly by operators, in cases where a PEP 249 cursor isn't needed. ''' def __init__(self, service: Any, project_id: s...
2
1
23
0
23
0
2
0.25
1
7
1
1
1
9
1
7
32
2
24
21
12
6
14
11
12
2
1
1
2
7,946
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/bigquery.py
google.cloud.hooks.bigquery.BigQueryConnection
from typing import TYPE_CHECKING, Any, Literal, NoReturn, cast, overload class BigQueryConnection: """ BigQuery connection. BigQuery does not have a notion of a persistent connection. Thus, these objects are small stateless factories for cursors, which do all the real work. """ def __init...
class BigQueryConnection: ''' BigQuery connection. BigQuery does not have a notion of a persistent connection. Thus, these objects are small stateless factories for cursors, which do all the real work. ''' def __init__(self, *args, **kwargs) -> None: pass def close(self) -> No...
6
5
3
0
2
1
1
1
0
2
1
0
5
2
5
5
26
6
10
8
4
10
10
8
4
1
0
0
5
7,947
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/bigquery.py
google.cloud.hooks.bigquery.BigQueryCursor
from copy import deepcopy from typing import TYPE_CHECKING, Any, Literal, NoReturn, cast, overload from collections.abc import Iterable, Mapping, Sequence from airflow.providers.google.cloud.utils.bigquery import bq_cast class BigQueryCursor(BigQueryBaseCursor): """ A very basic BigQuery PEP 249 cursor impleme...
class BigQueryCursor(BigQueryBaseCursor): ''' A very basic BigQuery PEP 249 cursor implementation. The PyHive PEP 249 implementation was used as a reference: https://github.com/dropbox/PyHive/blob/master/pyhive/presto.py https://github.com/dropbox/PyHive/blob/master/pyhive/common.py ''' de...
23
18
18
2
12
3
3
0.3
1
17
1
0
19
8
19
26
368
68
233
87
178
69
137
50
117
20
2
4
51
7,948
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/bigquery.py
google.cloud.hooks.bigquery.BigQueryHook
from airflow.providers.google.common.deprecated import deprecated from airflow.providers.google.common.consts import CLIENT_INFO from airflow.providers.google.cloud.utils.credentials_provider import _get_scopes from google.cloud.bigquery import DEFAULT_RETRY, Client, CopyJob, ExtractJob, LoadJob, QueryJob, SchemaField,...
class BigQueryHook(GoogleBaseHook, DbApiHook): ''' Interact with BigQuery. This hook uses the Google Cloud connection. :param gcp_conn_id: The Airflow connection used for GCP credentials. :param use_legacy_sql: This specifies whether to use legacy SQL dialect. :param location: The location of t...
77
32
32
3
19
10
3
0.55
2
23
3
1
33
9
37
120
1,322
163
749
330
507
412
362
132
316
12
3
3
111
7,949
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/bigquery.py
google.cloud.hooks.bigquery.BigQueryTableAsyncHook
from aiohttp import ClientSession as ClientSession from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID, GoogleBaseAsyncHook, GoogleBaseHook, get_field from gcloud.aio.bigquery import Job, Table as Table_async from typing import TYPE_CHECKING, Any, Literal, NoReturn, cast, overload from coll...
class BigQueryTableAsyncHook(GoogleBaseAsyncHook): '''Async hook for BigQuery Table.''' def __init__(self, gcp_conn_id: str='google_cloud_default', impersonation_chain: str | Sequence[str] | None=None, **kwargs): pass async def get_table_client(self, dataset: str, table_id: str, project_id: str, ...
3
2
16
1
11
5
1
0.42
1
4
0
0
2
0
2
18
38
4
24
12
14
10
7
5
4
1
3
0
2
7,950
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/bigquery_dts.py
google.cloud.hooks.bigquery_dts.AsyncBiqQueryDataTransferServiceHook
from airflow.providers.google.common.consts import CLIENT_INFO from collections.abc import Sequence from google.cloud.bigquery_datatransfer_v1 import DataTransferServiceAsyncClient, DataTransferServiceClient from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault from airflow.providers.google.common.hooks.b...
class AsyncBiqQueryDataTransferServiceHook(GoogleBaseAsyncHook): '''Hook of the BigQuery service to be used with async client of the Google library.''' def __init__(self, gcp_conn_id: str='google_cloud_default', location: str | None=None, impersonation_chain: str | Sequence[str] | None=None, **kwargs): ...
6
2
13
0
10
3
1
0.33
1
5
0
0
5
1
5
21
76
8
51
29
30
17
26
14
20
2
3
1
7
7,951
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/bigquery_dts.py
google.cloud.hooks.bigquery_dts.BiqQueryDataTransferServiceHook
from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID, GoogleBaseAsyncHook, GoogleBaseHook from collections.abc import Sequence from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault from google.cloud.bigquery_datatransfer_v1.types import StartManualTransferRunsResponse, Transfer...
class BiqQueryDataTransferServiceHook(GoogleBaseHook): ''' Hook for Google Bigquery Transfer API. All the methods in the hook where ``project_id`` is used must be called with keyword arguments rather than positional. ''' def __init__(self, gcp_conn_id: str='google_cloud_default', location: str...
13
7
29
2
16
11
2
0.72
1
6
0
0
6
1
7
41
225
22
118
67
67
85
46
24
38
4
3
2
15
7,952
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/bigtable.py
google.cloud.hooks.bigtable.BigtableHook
from google.cloud.bigtable.table import ClusterState, Table from google.cloud.bigtable import Client, enums from airflow.providers.google.common.consts import CLIENT_INFO from google.cloud.bigtable.cluster import Cluster from collections.abc import Sequence from airflow.providers.google.common.hooks.base_google import ...
class BigtableHook(GoogleBaseHook): ''' Hook for Google Cloud Bigtable APIs. All the methods in the hook where project_id is used must be called with keyword arguments rather than positional. ''' def __init__(self, gcp_conn_id: str='google_cloud_default', impersonation_chain: str | Sequence[st...
21
10
21
2
11
9
2
0.73
1
9
0
0
7
1
11
45
261
29
135
68
83
99
60
28
48
5
3
3
21
7,953
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/cloud_batch.py
google.cloud.hooks.cloud_batch.CloudBatchAsyncHook
from collections.abc import Iterable, Sequence from google.cloud.batch_v1 import BatchServiceAsyncClient, BatchServiceClient, CreateJobRequest, Job, JobStatus, Task from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID, GoogleBaseHook from airflow.providers.google.common.consts import CLIENT_...
class CloudBatchAsyncHook(GoogleBaseHook): ''' Async hook for the Google Cloud Batch service. :param gcp_conn_id: The connection ID to use when fetching connection info. :param impersonation_chain: Optional service account to impersonate using short-term credentials, or chained list of accounts...
4
1
7
0
7
0
1
0.57
1
3
0
0
3
1
3
37
38
5
21
14
9
12
11
6
7
2
3
1
4
7,954
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/cloud_batch.py
google.cloud.hooks.cloud_batch.CloudBatchHook
import itertools from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID, GoogleBaseHook import json from google.cloud.batch_v1 import BatchServiceAsyncClient, BatchServiceClient, CreateJobRequest, Job, JobStatus, Task from airflow.exceptions import AirflowException import time from collections...
class CloudBatchHook(GoogleBaseHook): ''' Hook for the Google Cloud Batch service. :param gcp_conn_id: The connection ID to use when fetching connection info. :param impersonation_chain: Optional service account to impersonate using short-term credentials, or chained list of accounts required t...
13
2
13
1
11
1
2
0.17
1
11
1
0
8
1
8
42
130
20
94
49
56
16
51
19
42
7
3
3
18
7,955
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/cloud_build.py
google.cloud.hooks.cloud_build.CloudBuildAsyncHook
from google.cloud.devtools.cloudbuild_v1 import CloudBuildAsyncClient, CloudBuildClient, GetBuildRequest from airflow.providers.google.common.consts import CLIENT_INFO from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID, GoogleBaseHook from airflow.exceptions import AirflowException from go...
class CloudBuildAsyncHook(GoogleBaseHook): '''Asynchronous Hook for the Google Cloud Build Service.''' @GoogleBaseHook.fallback_to_default_project_id async def get_cloud_build(self, id_: str, project_id: str=PROVIDE_PROJECT_ID, retry: AsyncRetry | _MethodDefault=DEFAULT, timeout: float | None=None, metadat...
3
2
31
2
28
1
3
0.07
1
5
1
0
1
0
1
35
35
3
30
15
19
2
11
6
9
3
3
1
3
7,956
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/cloud_build.py
google.cloud.hooks.cloud_build.CloudBuildHook
from google.api_core.exceptions import AlreadyExists from google.cloud.devtools.cloudbuild_v1 import CloudBuildAsyncClient, CloudBuildClient, GetBuildRequest from airflow.exceptions import AirflowException from collections.abc import Sequence from airflow.providers.google.common.consts import CLIENT_INFO from google.ap...
class CloudBuildHook(GoogleBaseHook, OperationHelper): ''' Hook for the Google Cloud Build Service. :param gcp_conn_id: The connection ID to use when fetching connection info. :param impersonation_chain: Optional service account to impersonate using short-term credentials, or chained list of ac...
26
14
34
5
18
11
2
0.58
1
11
1
0
16
1
16
50
583
90
313
167
171
180
113
47
96
3
3
2
24
7,957
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/cloud_composer.py
google.cloud.hooks.cloud_composer.CloudComposerAsyncHook
import asyncio from google.cloud.orchestration.airflow.service_v1 import EnvironmentsAsyncClient, EnvironmentsClient, ImageVersionsClient, PollAirflowCommandResponse from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault from google.api_core.client_options import ClientOptions from airflow.exceptions impor...
class CloudComposerAsyncHook(GoogleBaseAsyncHook): '''Hook for Google Cloud Composer async APIs.''' async def get_environment_client(self) -> EnvironmentsAsyncClient: '''Retrieve client library object that allow access Environments service.''' pass def get_environment_name(self, project_id, regio...
16
7
22
1
15
6
1
0.42
1
9
1
0
10
0
10
44
239
22
153
86
78
64
39
21
28
4
3
2
13
7,958
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/cloud_composer.py
google.cloud.hooks.cloud_composer.CloudComposerHook
from collections.abc import MutableSequence, Sequence from google.cloud.orchestration.airflow.service_v1 import EnvironmentsAsyncClient, EnvironmentsClient, ImageVersionsClient, PollAirflowCommandResponse from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault from google.auth.transport.requests import Auth...
class CloudComposerHook(GoogleBaseHook, OperationHelper): '''Hook for Google Cloud Composer APIs.''' def get_environment_client(self) -> EnvironmentsClient: '''Retrieve client library object that allow access Environments service.''' pass def get_image_versions_client(self) -> ImageVersio...
25
13
22
1
15
6
1
0.42
1
10
1
0
15
0
15
49
360
28
234
133
124
98
64
38
48
4
3
2
19
7,959
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/cloud_memorystore.py
google.cloud.hooks.cloud_memorystore.CloudMemorystoreHook
from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID, GoogleBaseHook from collections.abc import Sequence from airflow import version from google.api_core.exceptions import NotFound from airflow.exceptions import AirflowException from google.api_core.gapic_v1.method import DEFAULT, _MethodDe...
class CloudMemorystoreHook(GoogleBaseHook): ''' Hook for Google Cloud Memorystore APIs. All the methods in the hook where project_id is used must be called with keyword arguments rather than positional. :param gcp_conn_id: The connection ID to use when fetching connection info. :param impersona...
21
11
36
3
20
13
2
0.71
1
8
1
0
10
1
11
45
432
44
227
123
131
161
88
39
76
4
3
1
19
7,960
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/cloud_memorystore.py
google.cloud.hooks.cloud_memorystore.CloudMemorystoreMemcachedHook
from google.cloud.memcache_v1beta2.types import cloud_memcache from google.api_core.exceptions import NotFound from airflow import version from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID, GoogleBaseHook from airflow.exceptions import AirflowException from google.api_core.gapic_v1.method...
class CloudMemorystoreMemcachedHook(GoogleBaseHook): ''' Hook for Google Cloud Memorystore for Memcached service APIs. All the methods in the hook where project_id is used must be called with keyword arguments rather than positional. :param gcp_conn_id: The connection ID to use when fetching connec...
19
10
37
3
21
13
2
0.64
1
8
1
0
9
1
10
44
403
40
221
110
135
142
90
35
79
4
3
1
20
7,961
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/cloud_run.py
google.cloud.hooks.cloud_run.CloudRunAsyncHook
from collections.abc import Iterable, Sequence from google.longrunning import operations_pb2 from google.cloud.run_v2 import CreateJobRequest, CreateServiceRequest, DeleteJobRequest, DeleteServiceRequest, GetJobRequest, GetServiceRequest, Job, JobsAsyncClient, JobsClient, ListJobsRequest, RunJobRequest, Service, Servic...
class CloudRunAsyncHook(GoogleBaseAsyncHook): ''' Async hook for the Google Cloud Run service. :param gcp_conn_id: The connection ID to use when fetching connection info. :param impersonation_chain: Optional service account to impersonate using short-term credentials, or chained list of account...
4
1
6
0
5
0
1
0.71
1
3
0
0
3
1
3
37
34
5
17
10
8
12
10
5
6
2
3
1
4
7,962
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/cloud_run.py
google.cloud.hooks.cloud_run.CloudRunHook
from google.cloud.run_v2 import CreateJobRequest, CreateServiceRequest, DeleteJobRequest, DeleteServiceRequest, GetJobRequest, GetServiceRequest, Job, JobsAsyncClient, JobsClient, ListJobsRequest, RunJobRequest, Service, ServicesAsyncClient, ServicesClient, UpdateJobRequest from collections.abc import Iterable, Sequenc...
class CloudRunHook(GoogleBaseHook): ''' Hook for the Google Cloud Run service. :param gcp_conn_id: The connection ID to use when fetching connection info. :param impersonation_chain: Optional service account to impersonate using short-term credentials, or chained list of accounts required to ge...
15
2
10
1
8
1
2
0.22
1
11
1
0
8
1
8
42
107
17
74
48
38
16
43
21
34
2
3
1
12
7,963
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/cloud_run.py
google.cloud.hooks.cloud_run.CloudRunServiceAsyncHook
from collections.abc import Iterable, Sequence from airflow.providers.google.common.consts import CLIENT_INFO from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID, GoogleBaseAsyncHook, GoogleBaseHook from google.cloud.run_v2 import CreateJobRequest, CreateServiceRequest, DeleteJobRequest, De...
class CloudRunServiceAsyncHook(GoogleBaseAsyncHook): ''' Async hook for the Google Cloud Run services. :param gcp_conn_id: The connection ID to use when fetching connection info. :param impersonation_chain: Optional service account to impersonate using short-term credentials, or chained list of...
7
1
9
1
8
0
2
0.36
1
4
0
0
4
1
4
38
54
9
33
19
17
12
16
8
11
2
3
1
6
7,964
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/cloud_run.py
google.cloud.hooks.cloud_run.CloudRunServiceHook
from google.cloud.run_v2 import CreateJobRequest, CreateServiceRequest, DeleteJobRequest, DeleteServiceRequest, GetJobRequest, GetServiceRequest, Job, JobsAsyncClient, JobsClient, ListJobsRequest, RunJobRequest, Service, ServicesAsyncClient, ServicesClient, UpdateJobRequest from airflow.providers.google.common.hooks.ba...
class CloudRunServiceHook(GoogleBaseHook): ''' Hook for the Google Cloud Run services. :param gcp_conn_id: The connection ID to use when fetching connection info. :param impersonation_chain: Optional service account to impersonate using short-term credentials, or chained list of accounts requir...
9
1
8
1
7
0
1
0.31
1
4
0
0
5
1
5
39
61
10
39
22
23
12
21
12
15
2
3
1
7
7,965
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/cloud_sql.py
google.cloud.hooks.cloud_sql.CloudSQLAsyncHook
from aiohttp import ClientSession from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID, GoogleBaseAsyncHook, GoogleBaseHook, get_field from gcloud.aio.auth import AioSession, Token class CloudSQLAsyncHook(GoogleBaseAsyncHook): """Class to get asynchronous hook for Google Cloud SQL.""" ...
class CloudSQLAsyncHook(GoogleBaseAsyncHook): '''Class to get asynchronous hook for Google Cloud SQL.''' async def _get_conn(self, session: Session, url: str): pass async def get_operation_name(self, project_id: str, operation_name: str, session): pass async def get_operation_name(self, proj...
4
1
8
0
8
0
1
0.04
1
3
0
0
3
0
3
19
31
5
25
12
21
1
16
10
12
1
3
1
3
7,966
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/cloud_sql.py
google.cloud.hooks.cloud_sql.CloudSQLDatabaseHook
import json import subprocess from pathlib import Path from typing import TYPE_CHECKING, Any, cast from urllib.parse import quote_plus import shlex import random from airflow.providers.google.cloud.hooks.secret_manager import GoogleCloudSecretManagerHook from airflow.exceptions import AirflowException from airflow.mode...
class CloudSQLDatabaseHook(BaseHook): ''' Serves DB connection configuration for Google Cloud SQL (Connections of *gcpcloudsqldb://* type). The hook is a "meta" one. It does not perform an actual connection. It is there to retrieve all the parameters configured in gcpcloudsql:// connection, start/s...
33
13
15
1
12
2
3
0.35
1
18
7
0
21
30
25
37
480
57
313
117
263
110
227
94
198
21
2
3
86
7,967
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/cloud_sql.py
google.cloud.hooks.cloud_sql.CloudSQLHook
import time from googleapiclient.discovery import Resource, build from collections.abc import Sequence from googleapiclient.errors import HttpError from airflow.exceptions import AirflowException from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID, GoogleBaseAsyncHook, GoogleBaseHook, get_f...
class CloudSQLHook(GoogleBaseHook): ''' Hook for Google Cloud SQL APIs. All the methods in the hook where project_id is used must be called with keyword arguments rather than positional. :param api_version: This is the version of the api. :param gcp_conn_id: The Airflow connection used for GCP ...
35
15
20
1
10
9
1
0.77
1
7
2
0
15
2
15
49
350
34
179
76
130
137
76
47
60
4
3
3
21
7,968
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/cloud_sql.py
google.cloud.hooks.cloud_sql.CloudSqlOperationStatus
class CloudSqlOperationStatus: """Helper class with operation statuses.""" PENDING = 'PENDING' RUNNING = 'RUNNING' DONE = 'DONE' UNKNOWN = 'UNKNOWN'
class CloudSqlOperationStatus: '''Helper class with operation statuses.''' pass
1
1
0
0
0
0
0
0.2
0
0
0
0
0
0
0
0
7
1
5
5
4
1
5
5
4
0
0
0
0
7,969
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/cloud_sql.py
google.cloud.hooks.cloud_sql.CloudSqlProxyRunner
import errno import json from pathlib import Path import platform import shutil from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID, GoogleBaseAsyncHook, GoogleBaseHook, get_field import os from inspect import signature from subprocess import PIPE, Popen from airflow.utils.log.logging_mixin...
class CloudSqlProxyRunner(LoggingMixin): ''' Downloads and runs cloud-sql-proxy as subprocess of the Python process. The cloud-sql-proxy needs to be downloaded and started before we can connect to the Google Cloud SQL instance via database connection. It establishes secure tunnel connection to the ...
12
5
20
1
17
2
4
0.28
1
11
2
0
9
12
10
16
237
19
172
53
152
48
130
41
119
8
1
3
37
7,970
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/cloud_storage_transfer_service.py
google.cloud.hooks.cloud_storage_transfer_service.CloudDataTransferServiceAsyncHook
from copy import deepcopy from google.cloud.storage_transfer_v1 import ListTransferJobsRequest, StorageTransferServiceAsyncClient, TransferJob, TransferOperation from airflow.providers.google.common.consts import CLIENT_INFO from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID, GoogleBaseAsy...
class CloudDataTransferServiceAsyncHook(GoogleBaseAsyncHook): '''Asynchronous hook for Google Storage Transfer Service.''' def __init__(self, project_id: str=PROVIDE_PROJECT_ID, **kwargs: Any) -> None: pass async def get_conn(self) -> StorageTransferServiceAsyncClient: ''' Return ...
9
6
21
2
14
5
3
0.36
1
12
2
0
6
2
7
23
160
24
100
31
85
36
56
24
48
6
3
3
19
7,971
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/cloud_storage_transfer_service.py
google.cloud.hooks.cloud_storage_transfer_service.CloudDataTransferServiceHook
from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning from googleapiclient.errors import HttpError import warnings from copy import deepcopy from datetime import timedelta import time from googleapiclient.discovery import Resource, build from airflow.providers.google.common.hooks.base_googl...
class CloudDataTransferServiceHook(GoogleBaseHook): ''' Google Storage Transfer Service functionalities. All methods in the hook with *project_id* in the signature must be called with keyword arguments rather than positional. ''' def __init__(self, api_version: str='v1', gcp_conn_id: str='goog...
23
16
22
2
13
7
2
0.55
1
17
4
0
16
2
17
51
398
58
219
56
183
121
111
37
93
7
3
3
42
7,972
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/cloud_storage_transfer_service.py
google.cloud.hooks.cloud_storage_transfer_service.GcpTransferJobsStatus
class GcpTransferJobsStatus: """Google Cloud Transfer job status.""" ENABLED = 'ENABLED' DISABLED = 'DISABLED' DELETED = 'DELETED'
class GcpTransferJobsStatus: '''Google Cloud Transfer job status.''' pass
1
1
0
0
0
0
0
0.25
0
0
0
0
0
0
0
0
6
1
4
4
3
1
4
4
3
0
0
0
0
7,973
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/cloud_storage_transfer_service.py
google.cloud.hooks.cloud_storage_transfer_service.GcpTransferOperationStatus
class GcpTransferOperationStatus: """Google Cloud Transfer operation status.""" IN_PROGRESS = 'IN_PROGRESS' PAUSED = 'PAUSED' SUCCESS = 'SUCCESS' FAILED = 'FAILED' ABORTED = 'ABORTED'
class GcpTransferOperationStatus: '''Google Cloud Transfer operation status.''' pass
1
1
0
0
0
0
0
0.17
0
0
0
0
0
0
0
0
8
1
6
6
5
1
6
6
5
0
0
0
0
7,974
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/compute.py
google.cloud.hooks.compute.ComputeEngineHook
from google.cloud.compute_v1.services.instances import InstancesClient from googleapiclient.discovery import build import time from collections.abc import Sequence from airflow.exceptions import AirflowException from google.cloud.compute_v1.services.instance_templates import InstanceTemplatesClient from airflow.provide...
class ComputeEngineHook(GoogleBaseHook): ''' Hook for Google Compute Engine APIs. All the methods in the hook where project_id is used must be called with keyword arguments rather than positional. ''' def __init__(self, api_version: str='v1', gcp_conn_id: str='google_cloud_default', impersonat...
44
22
30
1
14
15
1
0.99
1
12
2
0
23
1
25
59
805
60
375
183
232
370
117
66
91
5
3
3
36
7,975
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/compute.py
google.cloud.hooks.compute.GceOperationStatus
class GceOperationStatus: """Class with GCE operations statuses.""" PENDING = 'PENDING' RUNNING = 'RUNNING' DONE = 'DONE'
class GceOperationStatus: '''Class with GCE operations statuses.''' pass
1
1
0
0
0
0
0
0.25
0
0
0
0
0
0
0
0
6
1
4
4
3
1
4
4
3
0
0
0
0
7,976
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/compute_ssh.py
google.cloud.hooks.compute_ssh.ComputeEngineSSHHook
import paramiko from airflow.providers.google.cloud.hooks.compute import ComputeEngineHook from airflow.providers.google.cloud.hooks.os_login import OSLoginHook from airflow.utils.types import NOTSET, ArgNotSet from paramiko.ssh_exception import SSHException from functools import cached_property from googleapiclient.er...
class ComputeEngineSSHHook(SSHHook): ''' Hook to connect to a remote instance in compute engine. :param instance_name: The name of the Compute Engine instance :param zone: The zone of the Compute Engine instance :param user: The name of the user on which the login attempt will be made :param pr...
16
2
22
1
21
1
4
0.12
1
13
4
0
9
14
10
30
284
22
235
83
203
28
155
62
142
13
3
4
46
7,977
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/compute_ssh.py
google.cloud.hooks.compute_ssh._GCloudAuthorizedSSHClient
import paramiko class _GCloudAuthorizedSSHClient(paramiko.SSHClient): """SSH Client that maintains the context for gcloud authorization during the connection.""" def __init__(self, google_hook, *args, **kwargs): super().__init__(*args, **kwargs) self.ssh_client = paramiko.SSHClient() s...
class _GCloudAuthorizedSSHClient(paramiko.SSHClient): '''SSH Client that maintains the context for gcloud authorization during the connection.''' def __init__(self, google_hook, *args, **kwargs): pass def connect(self, *args, **kwargs): pass def close(self): pass def __e...
5
1
5
0
5
0
2
0.05
1
1
0
0
4
3
4
4
25
4
20
8
15
1
20
8
15
2
1
1
6
7,978
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/datacatalog.py
google.cloud.hooks.datacatalog.CloudDataCatalogHook
from collections.abc import Sequence from google.cloud import datacatalog from airflow.providers.google.common.consts import CLIENT_INFO from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning from google.cloud.datacatalog im...
@deprecated(planned_removal_date='January 30, 2026', use_instead='airflow.providers.google.cloud.hooks.dataplex.DataplexHook', reason='The Data Catalog will be discontinued on January 30, 2026 in favor of Dataplex Universal Catalog.', category=AirflowProviderDeprecationWarning) class CloudDataCatalogHook(GoogleBaseHook...
46
24
44
4
24
16
2
0.66
1
9
1
0
24
1
24
58
1,120
128
596
326
334
396
198
89
173
7
3
2
53
7,979
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/dataflow.py
google.cloud.hooks.dataflow.AsyncDataflowHook
from google.cloud.dataflow_v1beta3.types.jobs import ListJobsRequest from google.cloud.dataflow_v1beta3 import GetJobRequest, Job, JobState, JobsV1Beta3AsyncClient, JobView, ListJobMessagesRequest, MessagesV1Beta3AsyncClient, MetricsV1Beta3AsyncClient from airflow.providers.google.common.hooks.base_google import PROVID...
class AsyncDataflowHook(GoogleBaseAsyncHook, DataflowJobTerminalStateHelper): '''Async hook class for dataflow service.''' async def initialize_client(self, client_class): ''' Initialize object of the given class. Method is used to initialize asynchronous client. Because of the big amo...
8
7
28
2
16
10
1
0.65
1
2
0
0
7
0
7
23
208
22
113
60
70
73
36
25
28
1
3
0
7
7,980
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/dataflow.py
google.cloud.hooks.dataflow.DataflowHook
from airflow.providers.apache.beam.hooks.beam import BeamHook, BeamRunnerType, beam_options_to_args from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID, GoogleBaseAsyncHook, GoogleBaseHook import shlex import warnings from typing import TYPE_CHECKING, Any, TypeVar, cast import uuid from air...
class DataflowHook(GoogleBaseHook): ''' Hook for Google Dataflow. All the methods in the hook where project_id is used must be called with keyword arguments rather than positional. ''' def __init__(self, gcp_conn_id: str='google_cloud_default', poll_sleep: int=10, impersonation_chain: str | Se...
54
22
30
2
20
8
2
0.38
1
15
5
0
27
8
30
64
1,011
100
662
284
424
249
204
104
172
4
3
2
51
7,981
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/dataflow.py
google.cloud.hooks.dataflow.DataflowJobStatus
class DataflowJobStatus: """ Helper class with Dataflow job statuses. Reference: https://cloud.google.com/dataflow/docs/reference/rest/v1b3/projects.jobs#Job.JobState """ JOB_STATE_DONE = 'JOB_STATE_DONE' JOB_STATE_UNKNOWN = 'JOB_STATE_UNKNOWN' JOB_STATE_STOPPED = 'JOB_STATE_STOPPED' JO...
class DataflowJobStatus: ''' Helper class with Dataflow job statuses. Reference: https://cloud.google.com/dataflow/docs/reference/rest/v1b3/projects.jobs#Job.JobState ''' pass
1
1
0
0
0
0
0
0.17
0
0
0
0
0
0
0
0
30
2
24
17
23
4
17
17
16
0
0
0
0
7,982
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/dataflow.py
google.cloud.hooks.dataflow.DataflowJobType
class DataflowJobType: """Helper class with Dataflow job types.""" JOB_TYPE_UNKNOWN = 'JOB_TYPE_UNKNOWN' JOB_TYPE_BATCH = 'JOB_TYPE_BATCH' JOB_TYPE_STREAMING = 'JOB_TYPE_STREAMING'
class DataflowJobType: '''Helper class with Dataflow job types.''' pass
1
1
0
0
0
0
0
0.25
0
0
0
0
0
0
0
0
6
1
4
4
3
1
4
4
3
0
0
0
0
7,983
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/dataflow.py
google.cloud.hooks.dataflow._DataflowJobsController
import time from airflow.providers.google.version_compat import timeout from typing import TYPE_CHECKING, Any, TypeVar, cast from airflow.exceptions import AirflowException, AirflowProviderDeprecationWarning from collections.abc import Callable, Generator, Sequence class _DataflowJobsController(DataflowJobTerminalStat...
class _DataflowJobsController(DataflowJobTerminalStateHelper): ''' Interface for communication with Google Cloud Dataflow API. Does not use Apache Beam API. :param dataflow: Discovery resource :param project_number: The Google Cloud Project ID. :param location: Job location. :param poll_sle...
17
14
20
1
15
3
3
0.31
1
13
3
0
16
13
16
22
357
42
240
70
209
75
135
56
118
9
1
3
47
7,984
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/dataform.py
google.cloud.hooks.dataform.DataformHook
from collections.abc import Sequence from airflow.providers.google.common.hooks.base_google import GoogleBaseHook from airflow.exceptions import AirflowException from google.cloud.dataform_v1beta1.types import CompilationResult, InstallNpmPackagesResponse, Repository, WorkflowInvocation, Workspace, WriteFileResponse im...
class DataformHook(GoogleBaseHook): '''Hook for Google Cloud DataForm APIs.''' def get_dataform_client(self) -> DataformClient: '''Retrieve client library object that allow access to Cloud Dataform service.''' pass @GoogleBaseHook.fallback_to_default_project_id def wait_for_workflow_in...
34
18
36
2
24
10
1
0.39
1
11
1
0
17
0
17
51
647
51
428
242
238
168
103
68
85
7
3
2
25
7,985
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/datafusion.py
google.cloud.hooks.datafusion.ConflictException
from airflow.exceptions import AirflowException, AirflowNotFoundException class ConflictException(AirflowException): """Exception to catch 409 error.""" pass
class ConflictException(AirflowException): '''Exception to catch 409 error.''' pass
1
1
0
0
0
0
0
0.5
1
0
0
0
0
0
0
11
4
1
2
1
1
1
2
1
1
0
4
0
0
7,986
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/datafusion.py
google.cloud.hooks.datafusion.DataFusionAsyncHook
from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID, GoogleBaseAsyncHook, GoogleBaseHook from urllib.parse import quote, urlencode, urljoin from airflow.exceptions import AirflowException, AirflowNotFoundException from aiohttp import ClientSession import asyncio from gcloud.aio.auth import ...
class DataFusionAsyncHook(GoogleBaseAsyncHook): '''Class to get asynchronous hook for DataFusion.''' @staticmethod def _base_url(instance_url: str, namespace: str) -> str: pass async def _get_link(self, url: str, session): pass async def get_pipeline(self, instance_url: str, names...
6
2
22
1
18
3
3
0.19
1
7
2
0
3
0
4
20
96
7
75
39
53
14
43
18
38
5
3
4
12
7,987
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/datafusion.py
google.cloud.hooks.datafusion.DataFusionHook
import google.auth from collections.abc import Sequence import time from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID, GoogleBaseAsyncHook, GoogleBaseHook from googleapiclient.discovery import Resource, build import json from airflow.exceptions import AirflowException, AirflowNotFoundExce...
class DataFusionHook(GoogleBaseHook): '''Hook for Google DataFusion.''' def __init__(self, api_version: str='v1beta1', gcp_conn_id: str='google_cloud_default', impersonation_chain: str | Sequence[str] | None=None, **kwargs) -> None: pass def wait_for_operation(self, operation: dict[str, Any]) -> ...
35
16
19
1
14
4
2
0.32
1
11
4
0
17
1
23
57
476
43
330
140
230
104
132
63
108
5
3
3
43
7,988
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/datafusion.py
google.cloud.hooks.datafusion.PipelineStates
class PipelineStates: """Data Fusion pipeline states.""" PENDING = 'PENDING' STARTING = 'STARTING' RUNNING = 'RUNNING' SUSPENDED = 'SUSPENDED' RESUMING = 'RESUMING' COMPLETED = 'COMPLETED' FAILED = 'FAILED' KILLED = 'KILLED' REJECTED = 'REJECTED'
class PipelineStates: '''Data Fusion pipeline states.''' pass
1
1
0
0
0
0
0
0.1
0
0
0
0
0
0
0
0
12
1
10
10
9
1
10
10
9
0
0
0
0
7,989
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/dataplex.py
google.cloud.hooks.dataplex.AirflowDataQualityScanException
from airflow.exceptions import AirflowException class AirflowDataQualityScanException(AirflowException): """Raised when data quality scan rules fail."""
class AirflowDataQualityScanException(AirflowException): '''Raised when data quality scan rules fail.''' pass
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
11
2
0
1
1
0
1
1
1
0
0
4
0
0
7,990
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/dataplex.py
google.cloud.hooks.dataplex.AirflowDataQualityScanResultTimeoutException
from airflow.exceptions import AirflowException class AirflowDataQualityScanResultTimeoutException(AirflowException): """Raised when no result found after specified amount of seconds."""
class AirflowDataQualityScanResultTimeoutException(AirflowException): '''Raised when no result found after specified amount of seconds.''' pass
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
11
2
0
1
1
0
1
1
1
0
0
4
0
0
7,991
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/dataplex.py
google.cloud.hooks.dataplex.DataplexAsyncHook
from google.cloud.dataplex_v1 import DataplexServiceClient, DataScanServiceAsyncClient, DataScanServiceClient from airflow.providers.google.common.consts import CLIENT_INFO from airflow.providers.google.common.hooks.base_google import PROVIDE_PROJECT_ID, GoogleBaseAsyncHook, GoogleBaseHook from collections.abc import M...
class DataplexAsyncHook(GoogleBaseAsyncHook): ''' Asynchronous Hook for Google Cloud Dataplex APIs. All the methods in the hook where project_id is used must be called with keyword arguments rather than positional. ''' def __init__(self, gcp_conn_id: str='google_cloud_default', impersonation_c...
5
3
17
1
11
5
1
0.53
1
6
0
0
3
0
3
19
64
9
36
24
17
19
12
9
8
1
3
0
3
7,992
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/dataplex.py
google.cloud.hooks.dataplex.DataplexHook
from copy import deepcopy from airflow.providers.google.common.consts import CLIENT_INFO from airflow.providers.google.common.hooks.operation_helpers import OperationHelper from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault from typing import TYPE_CHECKING, Any from google.cloud.dataplex_v1.types impor...
class DataplexHook(GoogleBaseHook, OperationHelper): ''' Hook for Google Dataplex. :param api_version: The version of the api that will be requested for example 'v3'. :param gcp_conn_id: The connection ID to use when fetching connection info. :param impersonation_chain: Optional service account to ...
87
46
33
1
21
11
1
0.54
1
14
2
0
39
2
39
73
1,392
96
843
482
444
453
182
122
142
5
3
2
53
7,993
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/dataprep.py
google.cloud.hooks.dataprep.GoogleDataprepHook
import requests from airflow.providers.google.version_compat import BaseHook from tenacity import retry, stop_after_attempt, wait_exponential from typing import Any from urllib.parse import urljoin from requests import HTTPError import json class GoogleDataprepHook(BaseHook): """ Hook for connection with Datap...
class GoogleDataprepHook(BaseHook): ''' Hook for connection with Dataprep API. To get connection Dataprep with Airflow you need Dataprep token. https://clouddataprep.com/documentation/api#section/Authentication It should be added to the Connection in Airflow in JSON format. ''' def __init_...
31
14
12
1
7
4
1
0.62
1
8
1
0
16
4
16
28
236
37
123
85
90
76
100
69
83
2
2
1
17
7,994
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/dataprep.py
google.cloud.hooks.dataprep.JobGroupStatuses
from enum import Enum class JobGroupStatuses(str, Enum): """Types of job group run statuses.""" CREATED = 'Created' UNDEFINED = 'undefined' IN_PROGRESS = 'InProgress' COMPLETE = 'Complete' FAILED = 'Failed' CANCELED = 'Canceled'
class JobGroupStatuses(str, Enum): '''Types of job group run statuses.''' pass
1
1
0
0
0
0
0
0.14
2
0
0
0
0
0
0
115
9
1
7
7
6
1
7
7
6
0
4
0
0
7,995
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/dataproc.py
google.cloud.hooks.dataproc.DataProcJobBuilder
from airflow.version import version as airflow_version from typing import TYPE_CHECKING, Any import uuid class DataProcJobBuilder: """A helper class for building Dataproc job.""" def __init__(self, project_id: str, task_id: str, cluster_name: str, job_type: str, properties: dict[str, str] | None=None) -> None...
class DataProcJobBuilder: '''A helper class for building Dataproc job.''' def __init__(self, project_id: str, task_id: str, cluster_name: str, job_type: str, properties: dict[str, str] | None=None) -> None: pass def add_labels(self, labels: dict | None=None) -> None: ''' Set label...
15
14
9
1
5
4
2
0.88
0
5
0
0
14
2
14
14
148
28
64
27
42
56
48
20
33
3
0
1
26
7,996
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/dataproc.py
google.cloud.hooks.dataproc.DataprocAsyncHook
from airflow.providers.google.common.consts import CLIENT_INFO from google.api_core.gapic_v1.method import DEFAULT, _MethodDefault from google.api_core.client_options import ClientOptions from airflow.version import version as airflow_version from collections.abc import MutableSequence, Sequence from airflow.providers....
class DataprocAsyncHook(GoogleBaseAsyncHook): ''' Asynchronous interaction with Google Cloud Dataproc APIs. All the methods in the hook where project_id is used must be called with keyword arguments rather than positional. ''' def __init__(self, gcp_conn_id: str='google_cloud_default', imperso...
40
22
32
2
18
13
2
0.71
1
9
0
0
23
1
23
57
786
60
427
240
229
302
121
66
97
3
3
2
36
7,997
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/dataproc.py
google.cloud.hooks.dataproc.DataprocHook
from google.cloud.dataproc_v1 import Batch, BatchControllerAsyncClient, BatchControllerClient, Cluster, ClusterControllerAsyncClient, ClusterControllerClient, Job, JobControllerAsyncClient, JobControllerClient, JobStatus, WorkflowTemplate, WorkflowTemplateServiceAsyncClient, WorkflowTemplateServiceClient from collectio...
class DataprocHook(GoogleBaseHook): ''' Google Cloud Dataproc APIs. All the methods in the hook where project_id is used must be called with keyword arguments rather than positional. ''' def get_cluster_client(self, region: str | None=None) -> ClusterControllerClient: '''Create a Clust...
51
30
33
2
19
12
2
0.62
1
15
2
0
30
0
30
64
1,052
81
601
314
356
373
202
98
171
7
3
3
61
7,998
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/dataproc.py
google.cloud.hooks.dataproc.DataprocResourceIsNotReadyError
from airflow.exceptions import AirflowException class DataprocResourceIsNotReadyError(AirflowException): """Raise when resource is not ready for create Dataproc cluster."""
class DataprocResourceIsNotReadyError(AirflowException): '''Raise when resource is not ready for create Dataproc cluster.''' pass
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
11
2
0
1
1
0
1
1
1
0
0
4
0
0
7,999
apache/airflow
apache_airflow/providers/google/src/airflow/providers/google/cloud/hooks/dataproc_metastore.py
google.cloud.hooks.dataproc_metastore.DataprocMetastoreHook
from collections.abc import Sequence from typing import TYPE_CHECKING, Any from airflow.providers.google.common.hooks.base_google import GoogleBaseHook from airflow.providers.google.common.consts import CLIENT_INFO from google.api_core.client_options import ClientOptions from airflow.exceptions import AirflowException ...
class DataprocMetastoreHook(GoogleBaseHook): '''Hook for Google Cloud Dataproc Metastore APIs.''' def get_dataproc_metastore_client(self) -> DataprocMetastoreClient: '''Return DataprocMetastoreClient.''' pass def get_dataproc_metastore_client_v1beta(self): '''Return DataprocMetast...
28
16
43
3
22
17
1
0.73
1
10
1
0
15
0
15
49
670
66
349
198
197
255
94
61
77
4
3
1
19