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,800 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/confirm.py | dev.breeze.src.airflow_breeze.utils.confirm.Answer | from enum import Enum
class Answer(Enum):
YES = 'y'
NO = 'n'
QUIT = 'q' |
class Answer(Enum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 4 | 0 | 4 | 4 | 3 | 0 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
7,801 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/console.py | dev.breeze.src.airflow_breeze.utils.console.MessageType | from enum import Enum
class MessageType(Enum):
SUCCESS = 'success'
INFO = 'info'
WARNING = 'warning'
ERROR = 'error'
SPECIAL = 'special' |
class MessageType(Enum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 6 | 0 | 6 | 6 | 5 | 0 | 6 | 6 | 5 | 0 | 4 | 0 | 0 |
7,802 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/console.py | dev.breeze.src.airflow_breeze.utils.console.Output | from typing import NamedTuple, TextIO
class Output(NamedTuple):
title: str
file_name: str
@property
def file(self) -> TextIO:
return open(self.file_name, 'a+')
@property
def escaped_title(self) -> str:
return self.title.replace('[', '\\[') |
class Output(NamedTuple):
@property
def file(self) -> TextIO:
pass
@property
def escaped_title(self) -> str:
pass | 5 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 2 | 0 | 0 | 2 | 0 | 2 | 2 | 11 | 2 | 9 | 5 | 4 | 0 | 7 | 3 | 4 | 1 | 1 | 0 | 2 |
7,803 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/custom_param_types.py | dev.breeze.src.airflow_breeze.utils.custom_param_types.AnswerChoice | from airflow_breeze.utils.shared_options import set_dry_run, set_forced_answer, set_verbose
class AnswerChoice(BetterChoice):
"""
Stores forced answer if it has been selected
"""
name = 'AnswerChoice'
def convert(self, value, param, ctx):
set_forced_answer(value)
return super().con... |
class AnswerChoice(BetterChoice):
'''
Stores forced answer if it has been selected
'''
def convert(self, value, param, ctx):
pass | 2 | 1 | 3 | 0 | 3 | 0 | 1 | 0.6 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 3 | 10 | 2 | 5 | 3 | 3 | 3 | 5 | 3 | 3 | 1 | 2 | 0 | 1 |
7,804 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/custom_param_types.py | dev.breeze.src.airflow_breeze.utils.custom_param_types.BackendVersionChoice | from click import Context, Parameter, ParamType
from typing import Any
import os
class BackendVersionChoice(CacheableChoice):
"""
This specialized type of parameter allows to override the value of parameter with the BACKEND_VERSION
environment variable if it is set.
It's used to pass single matrix ele... | null | 2 | 1 | 6 | 0 | 6 | 0 | 3 | 0.88 | 1 | 2 | 0 | 1 | 1 | 0 | 1 | 4 | 18 | 3 | 8 | 4 | 6 | 7 | 8 | 4 | 6 | 3 | 2 | 2 | 3 |
7,805 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/custom_param_types.py | dev.breeze.src.airflow_breeze.utils.custom_param_types.BetterChoice | import click
from collections.abc import Sequence
class BetterChoice(click.Choice):
"""
Nicer formatted choice class for click. We have a lot of parameters sometimes, and formatting
them without spaces causes ugly artifacts as the words are broken. This one adds spaces so
that when the long list of cho... |
class BetterChoice(click.Choice):
'''
Nicer formatted choice class for click. We have a lot of parameters sometimes, and formatting
them without spaces causes ugly artifacts as the words are broken. This one adds spaces so
that when the long list of choices does not wrap on words.
'''
def __in... | 3 | 1 | 8 | 1 | 5 | 2 | 2 | 0.67 | 1 | 3 | 0 | 3 | 2 | 1 | 2 | 2 | 25 | 5 | 12 | 6 | 9 | 8 | 12 | 6 | 9 | 3 | 1 | 1 | 4 |
7,806 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/custom_param_types.py | dev.breeze.src.airflow_breeze.utils.custom_param_types.CacheableChoice | from airflow_breeze.utils.console import get_console
from airflow_breeze.utils.cache import check_if_values_allowed, read_and_validate_value_from_cache, read_from_cache_file, write_to_cache_file
import click
from airflow_breeze.utils.recording import generating_command_images
import os
class CacheableChoice(click.Choi... |
class CacheableChoice(click.Choice):
'''
This class implements caching of values from the last use.
'''
def convert(self, value, param, ctx):
pass
def get_metavar(self, param, ctx=None) -> str:
pass
def __init__(self, choices, case_sensitive: bool=True) -> None:
p... | 4 | 1 | 15 | 1 | 13 | 1 | 5 | 0.15 | 1 | 4 | 1 | 1 | 3 | 0 | 3 | 3 | 51 | 5 | 40 | 11 | 36 | 6 | 30 | 11 | 26 | 7 | 1 | 3 | 14 |
7,807 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/custom_param_types.py | dev.breeze.src.airflow_breeze.utils.custom_param_types.CacheableDefault | from dataclasses import dataclass
from typing import Any
@dataclass
class CacheableDefault:
value: Any
def __repr__(self):
return self.value | @dataclass
class CacheableDefault:
def __repr__(self):
pass | 3 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 5 | 1 | 4 | 2 | 2 | 0 | 4 | 2 | 2 | 1 | 0 | 0 | 1 |
7,808 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/custom_param_types.py | dev.breeze.src.airflow_breeze.utils.custom_param_types.DryRunOption | from airflow_breeze.utils.coertions import coerce_bool_value
from airflow_breeze.utils.shared_options import set_dry_run, set_forced_answer, set_verbose
from click import Context, Parameter, ParamType
class DryRunOption(ParamType):
"""
Stores and allows to retrieve dry_run option
"""
name = 'DryRunOpti... |
class DryRunOption(ParamType):
'''
Stores and allows to retrieve dry_run option
'''
def convert(self, value, param, ctx):
pass | 2 | 1 | 3 | 0 | 3 | 0 | 1 | 0.6 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 10 | 2 | 5 | 3 | 3 | 3 | 5 | 3 | 3 | 1 | 1 | 0 | 1 |
7,809 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/custom_param_types.py | dev.breeze.src.airflow_breeze.utils.custom_param_types.MySQLBackendVersionChoice | from airflow_breeze.utils.console import get_console
from airflow_breeze.utils.cache import check_if_values_allowed, read_and_validate_value_from_cache, read_from_cache_file, write_to_cache_file
class MySQLBackendVersionChoice(BackendVersionChoice):
def convert(self, value, param, ctx):
if isinstance(valu... |
class MySQLBackendVersionChoice(BackendVersionChoice):
def convert(self, value, param, ctx):
pass | 2 | 0 | 19 | 0 | 19 | 0 | 5 | 0 | 1 | 2 | 1 | 0 | 1 | 0 | 1 | 5 | 20 | 0 | 20 | 4 | 18 | 0 | 13 | 4 | 11 | 5 | 3 | 2 | 5 |
7,810 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/custom_param_types.py | dev.breeze.src.airflow_breeze.utils.custom_param_types.NotVerifiedBetterChoice | from click import Context, Parameter, ParamType
from typing import Any
class NotVerifiedBetterChoice(BetterChoice):
"""
This parameter allows to pass parameters that do not pass verification by choice. This is
useful to keep autocomplete working but also to allow some extra parameters that are dynamic,
... |
class NotVerifiedBetterChoice(BetterChoice):
'''
This parameter allows to pass parameters that do not pass verification by choice. This is
useful to keep autocomplete working but also to allow some extra parameters that are dynamic,
for example allowing glob in package names for docs building.
'''
... | 2 | 1 | 22 | 3 | 17 | 2 | 4 | 0.37 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 3 | 31 | 5 | 19 | 5 | 17 | 7 | 14 | 5 | 12 | 4 | 2 | 1 | 4 |
7,811 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/custom_param_types.py | dev.breeze.src.airflow_breeze.utils.custom_param_types.UseAirflowVersionType | import re
from airflow_breeze.global_constants import GITHUB_REPO_BRANCH_PATTERN
class UseAirflowVersionType(BetterChoice):
"""Extends choice with dynamic version number."""
def __init__(self, *args):
super().__init__(*args)
self.all_choices = [*self.choices, '<airflow_version>', '<owner/repo:... |
class UseAirflowVersionType(BetterChoice):
'''Extends choice with dynamic version number.'''
def __init__(self, *args):
pass
def convert(self, value, param, ctx):
pass | 3 | 1 | 5 | 0 | 5 | 0 | 2 | 0.1 | 1 | 1 | 0 | 0 | 2 | 1 | 2 | 4 | 13 | 2 | 10 | 4 | 7 | 1 | 10 | 4 | 7 | 3 | 2 | 1 | 4 |
7,812 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/custom_param_types.py | dev.breeze.src.airflow_breeze.utils.custom_param_types.VerboseOption | from airflow_breeze.utils.shared_options import set_dry_run, set_forced_answer, set_verbose
from airflow_breeze.utils.coertions import coerce_bool_value
from click import Context, Parameter, ParamType
class VerboseOption(ParamType):
"""
Stores and allows to retrieve verbose option
"""
name = 'VerboseOp... |
class VerboseOption(ParamType):
'''
Stores and allows to retrieve verbose option
'''
def convert(self, value, param, ctx):
pass | 2 | 1 | 3 | 0 | 3 | 0 | 1 | 0.6 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 10 | 2 | 5 | 3 | 3 | 3 | 5 | 3 | 3 | 1 | 1 | 0 | 1 |
7,813 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/docs_publisher.py | dev.breeze.src.airflow_breeze.utils.docs_publisher.DocsPublisher | from airflow_breeze.utils.helm_chart_utils import chart_version
from airflow_breeze.utils.publish_docs_helpers import pretty_format_path
from airflow_breeze.global_constants import get_airflow_version, get_airflowctl_version, get_task_sdk_version
import shutil
from airflow_breeze.utils.packages import get_provider_dist... |
class DocsPublisher:
'''Documentation builder for Airflow Docs Publishing.'''
def __init__(self, package_name: str, output: Output | None, verbose: bool):
pass
@property
def is_versioned(self):
'''Is current documentation package versioned?'''
pass
@property
def _build_... | 11 | 3 | 10 | 0 | 9 | 1 | 3 | 0.1 | 0 | 5 | 1 | 0 | 6 | 3 | 6 | 6 | 73 | 6 | 61 | 21 | 50 | 6 | 48 | 16 | 41 | 5 | 0 | 3 | 16 |
7,814 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/host_info_utils.py | dev.breeze.src.airflow_breeze.utils.host_info_utils.Architecture | from enum import Enum
class Architecture(Enum):
X86_64 = 'x86_64'
X86 = 'x86'
PPC = 'ppc'
ARM = 'arm' |
class Architecture(Enum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 5 | 0 | 5 | 5 | 4 | 0 | 5 | 5 | 4 | 0 | 4 | 0 | 0 |
7,815 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/kubernetes_utils.py | dev.breeze.src.airflow_breeze.utils.kubernetes_utils.KubernetesPythonVersion | from typing import Any, NamedTuple
class KubernetesPythonVersion(NamedTuple):
kubernetes_version: str
python_version: str |
class KubernetesPythonVersion(NamedTuple):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0 | 3 | 1 | 2 | 0 | 3 | 1 | 2 | 0 | 1 | 0 | 0 |
7,816 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/packages.py | dev.breeze.src.airflow_breeze.utils.packages.EntityType | from enum import Enum
class EntityType(Enum):
Operators = 'Operators'
Transfers = 'Transfers'
Sensors = 'Sensors'
Hooks = 'Hooks'
Secrets = 'Secrets' |
class EntityType(Enum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 6 | 0 | 6 | 6 | 5 | 0 | 6 | 6 | 5 | 0 | 4 | 0 | 0 |
7,817 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/packages.py | dev.breeze.src.airflow_breeze.utils.packages.PackageSuspendedException | class PackageSuspendedException(Exception):
"""Exception raised when package is suspended.""" | class PackageSuspendedException(Exception):
'''Exception raised when package is suspended.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 3 | 0 | 0 |
7,818 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/packages.py | dev.breeze.src.airflow_breeze.utils.packages.PipRequirements | from typing import Any, NamedTuple
class PipRequirements(NamedTuple):
"""Store details about python packages"""
package: str
version_required: str
@classmethod
def from_requirement(cls, requirement_string: str) -> PipRequirements:
from packaging.requirements import Requirement
req ... |
class PipRequirements(NamedTuple):
'''Store details about python packages'''
@classmethod
def from_requirement(cls, requirement_string: str) -> PipRequirements:
pass | 3 | 1 | 21 | 4 | 12 | 5 | 4 | 0.38 | 1 | 3 | 0 | 0 | 0 | 0 | 1 | 1 | 28 | 6 | 16 | 7 | 12 | 6 | 15 | 6 | 12 | 4 | 1 | 1 | 4 |
7,819 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/packages.py | dev.breeze.src.airflow_breeze.utils.packages.PluginInfo | from typing import Any, NamedTuple
class PluginInfo(NamedTuple):
name: str
package_name: str
class_name: str |
class PluginInfo(NamedTuple):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 4 | 1 | 3 | 0 | 4 | 1 | 3 | 0 | 1 | 0 | 0 |
7,820 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/packages.py | dev.breeze.src.airflow_breeze.utils.packages.ProviderPackageDetails | from pathlib import Path
from typing import Any, NamedTuple
class ProviderPackageDetails(NamedTuple):
provider_id: str
provider_yaml_path: Path
source_date_epoch: int
full_package_name: str
pypi_package_name: str
root_provider_path: Path
base_provider_package_path: Path
documentation_pr... |
class ProviderPackageDetails(NamedTuple):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | 0 | 20 | 1 | 19 | 0 | 20 | 1 | 19 | 0 | 1 | 0 | 0 |
7,821 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/parallel.py | dev.breeze.src.airflow_breeze.utils.parallel.AbstractProgressInfoMatcher | from airflow_breeze.utils.console import MessageType, Output, get_console
from abc import ABCMeta, abstractmethod
class AbstractProgressInfoMatcher(metaclass=ABCMeta):
@abstractmethod
def get_best_matching_lines(self, output: Output) -> list[str] | None:
"""
Return best matching lines of the o... |
class AbstractProgressInfoMatcher(metaclass=ABCMeta):
@abstractmethod
def get_best_matching_lines(self, output: Output) -> list[str] | None:
'''
Return best matching lines of the output.
:return: array of lines to print
'''
pass | 3 | 1 | 5 | 0 | 1 | 4 | 1 | 1.33 | 1 | 3 | 1 | 3 | 1 | 0 | 1 | 21 | 7 | 0 | 3 | 3 | 0 | 4 | 2 | 2 | 0 | 1 | 3 | 0 | 1 |
7,822 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/parallel.py | dev.breeze.src.airflow_breeze.utils.parallel.DockerBuildxProgressMatcher | from airflow_breeze.utils.console import MessageType, Output, get_console
import re
class DockerBuildxProgressMatcher(AbstractProgressInfoMatcher):
DOCKER_BUILDX_PROGRESS_MATCHER = re.compile('\\s*#(\\d*) ')
def __init__(self):
self.last_docker_build_lines: dict[str, str] = {}
def get_best_matchi... |
class DockerBuildxProgressMatcher(AbstractProgressInfoMatcher):
def __init__(self):
pass
def get_best_matching_lines(self, output: Output) -> list[str] | None:
pass | 3 | 0 | 10 | 0 | 10 | 0 | 4 | 0.05 | 1 | 6 | 1 | 0 | 2 | 1 | 2 | 23 | 24 | 2 | 22 | 11 | 19 | 1 | 21 | 11 | 18 | 6 | 4 | 3 | 7 |
7,823 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/parallel.py | dev.breeze.src.airflow_breeze.utils.parallel.GenericRegexpProgressMatcher | from airflow_breeze.utils.console import MessageType, Output, get_console
import re
class GenericRegexpProgressMatcher(AbstractProgressInfoMatcher):
"""
Matches lines from the output based on regular expressions:
:param regexp: regular expression matching lines that should be displayed
:param regexp_f... |
class GenericRegexpProgressMatcher(AbstractProgressInfoMatcher):
'''
Matches lines from the output based on regular expressions:
:param regexp: regular expression matching lines that should be displayed
:param regexp_for_joined_line: optional regular expression for lines that might be shown together wi... | 3 | 1 | 17 | 0 | 17 | 0 | 5 | 0.26 | 1 | 6 | 1 | 0 | 2 | 4 | 2 | 23 | 47 | 4 | 34 | 19 | 26 | 9 | 26 | 14 | 23 | 8 | 4 | 4 | 10 |
7,824 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/parallel.py | dev.breeze.src.airflow_breeze.utils.parallel.ParallelMonitor | import textwrap
import datetime
import time
import os
from pathlib import Path
from airflow_breeze.utils.console import MessageType, Output, get_console
from threading import Thread
class ParallelMonitor(Thread):
def __init__(self, outputs: list[Output], initial_time_in_seconds: int=2, time_in_seconds: int=int(os... |
class ParallelMonitor(Thread):
def __init__(self, outputs: list[Output], initial_time_in_seconds: int=2, time_in_seconds: int=int(os.environ.get('AIRFLOW_MONITOR_DELAY_TIME_IN_SECONDS', '20')), debug_resources:
pass
def print_single_progress(self, output: Output):
pass
def print_summary(... | 5 | 0 | 16 | 0 | 15 | 1 | 5 | 0.05 | 1 | 12 | 2 | 0 | 4 | 6 | 4 | 29 | 68 | 4 | 61 | 30 | 48 | 3 | 52 | 23 | 46 | 8 | 1 | 5 | 18 |
7,825 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/parallel.py | dev.breeze.src.airflow_breeze.utils.parallel.ShowLastLineProgressMatcher | from airflow_breeze.utils.console import MessageType, Output, get_console
class ShowLastLineProgressMatcher(AbstractProgressInfoMatcher):
def get_best_matching_lines(self, output: Output) -> list[str] | None:
last_lines, _ = get_last_lines_of_file(output.file_name, num_lines=1)
return last_lines |
class ShowLastLineProgressMatcher(AbstractProgressInfoMatcher):
def get_best_matching_lines(self, output: Output) -> list[str] | None:
pass | 2 | 0 | 3 | 0 | 3 | 0 | 1 | 0 | 1 | 3 | 1 | 0 | 1 | 0 | 1 | 22 | 4 | 0 | 4 | 3 | 2 | 0 | 4 | 3 | 2 | 1 | 4 | 0 | 1 |
7,826 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/parallel.py | dev.breeze.src.airflow_breeze.utils.parallel.SummarizeAfter | from enum import Enum
class SummarizeAfter(Enum):
NO_SUMMARY = 0
FAILURE = 1
SUCCESS = 2
BOTH = 3 |
class SummarizeAfter(Enum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 5 | 0 | 5 | 5 | 4 | 0 | 5 | 5 | 4 | 0 | 4 | 0 | 0 |
7,827 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/projects_google_spreadsheet.py | dev.breeze.src.airflow_breeze.utils.projects_google_spreadsheet.MetadataFromSpreadsheet | from enum import Enum, auto
class MetadataFromSpreadsheet(Enum):
KNOWN_REPUTABLE_FOUNDATIONS = auto()
KNOWN_STRONG_COMMUNITIES = auto()
KNOWN_COMPANIES = auto()
KNOWN_STABLE_PROJECTS = auto()
KNOWN_LOW_IMPORTANCE_PROJECTS = auto()
KNOWN_MEDIUM_IMPORTANCE_PROJECTS = auto()
KNOWN_HIGH_IMPORTA... |
class MetadataFromSpreadsheet(Enum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 10 | 0 | 10 | 10 | 9 | 0 | 10 | 10 | 9 | 0 | 4 | 0 | 0 |
7,828 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/selective_checks.py | dev.breeze.src.airflow_breeze.utils.selective_checks.AllProvidersSentinel | class AllProvidersSentinel:
pass | class AllProvidersSentinel:
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 0 | 0 | 0 |
7,829 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/selective_checks.py | dev.breeze.src.airflow_breeze.utils.selective_checks.FileGroupForCi | from enum import Enum
class FileGroupForCi(Enum):
ENVIRONMENT_FILES = 'environment_files'
PYTHON_PRODUCTION_FILES = 'python_scans'
JAVASCRIPT_PRODUCTION_FILES = 'javascript_scans'
ALWAYS_TESTS_FILES = 'always_test_files'
API_FILES = 'api_files'
GIT_PROVIDER_FILES = 'git_provider_files'
STAN... |
class FileGroupForCi(Enum):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 25 | 0 | 25 | 25 | 24 | 0 | 25 | 25 | 24 | 0 | 4 | 0 | 0 |
7,830 | apache/airflow | apache_airflow/dev/breeze/src/airflow_breeze/utils/selective_checks.py | dev.breeze.src.airflow_breeze.utils.selective_checks.HashableDict | class HashableDict(dict[T, list[str]]):
def __hash__(self):
return hash(frozenset(self)) | class HashableDict(dict[T, list[str]]):
def __hash__(self):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 28 | 3 | 0 | 3 | 2 | 1 | 0 | 3 | 2 | 1 | 1 | 2 | 0 | 1 |
7,831 | apache/airflow | apache_airflow/dev/send_email.py | dev.send_email.BaseParameters | class BaseParameters:
"""
Base Class to send emails using Apache Creds and for Jinja templating
"""
def __init__(self, name=None, email=None, username=None, password=None, version=None, version_rc=None):
self.name = name
self.email = email
self.username = username
self.p... | null | 3 | 1 | 5 | 0 | 5 | 0 | 1 | 0.27 | 0 | 0 | 0 | 0 | 2 | 7 | 2 | 2 | 16 | 2 | 11 | 10 | 8 | 3 | 11 | 10 | 8 | 1 | 0 | 0 | 2 |
7,832 | apache/airflow | apache_airflow/providers/dingding/src/airflow/providers/dingding/hooks/dingding.py | dingding.hooks.dingding.DingdingHook | import requests
from typing import Any
from airflow.providers.http.hooks.http import HttpHook
import json
from airflow.exceptions import AirflowException
from requests import Session
class DingdingHook(HttpHook):
"""
Send message using a DingTalk Custom Robot API.
.. seealso::
`How to get webhook ... | null | 6 | 5 | 13 | 1 | 11 | 2 | 2 | 0.39 | 1 | 9 | 1 | 0 | 5 | 5 | 5 | 32 | 93 | 12 | 59 | 32 | 44 | 23 | 39 | 23 | 33 | 3 | 3 | 1 | 12 |
7,833 | apache/airflow | apache_airflow/providers/dingding/src/airflow/providers/dingding/operators/dingding.py | dingding.operators.dingding.DingdingOperator | from airflow.providers.dingding.hooks.dingding import DingdingHook
from airflow.providers.dingding.version_compat import BaseOperator
from collections.abc import Sequence
class DingdingOperator(BaseOperator):
"""
This operator allows to send DingTalk message using Custom Robot API.
.. seealso::
Fo... |
class DingdingOperator(BaseOperator):
'''
This operator allows to send DingTalk message using Custom Robot API.
.. seealso::
For more information on how to use this operator, take a look at the guide:
:ref:`howto/operator:DingdingOperator`
:param dingding_conn_id: Dingding connection id... | 3 | 1 | 11 | 0 | 11 | 0 | 1 | 0.6 | 1 | 7 | 2 | 0 | 2 | 5 | 2 | 2 | 44 | 5 | 25 | 20 | 13 | 15 | 14 | 11 | 11 | 1 | 1 | 0 | 2 |
7,834 | apache/airflow | apache_airflow/providers/discord/src/airflow/providers/discord/hooks/discord_webhook.py | discord.hooks.discord_webhook.DiscordWebhookHook | from airflow.exceptions import AirflowException
from typing import Any
import re
import json
from airflow.providers.http.hooks.http import HttpHook
class DiscordWebhookHook(HttpHook):
"""
This hook allows you to post messages to Discord using incoming webhooks.
Takes a Discord connection ID with a default... |
class DiscordWebhookHook(HttpHook):
'''
This hook allows you to post messages to Discord using incoming webhooks.
Takes a Discord connection ID with a default relative webhook endpoint. The
default endpoint can be overridden using the webhook_endpoint parameter
(https://discordapp.com/developers/do... | 7 | 5 | 19 | 2 | 14 | 3 | 2 | 0.42 | 1 | 6 | 1 | 0 | 4 | 7 | 5 | 32 | 131 | 20 | 78 | 39 | 56 | 33 | 47 | 27 | 37 | 4 | 3 | 1 | 12 |
7,835 | apache/airflow | apache_airflow/providers/discord/src/airflow/providers/discord/notifications/discord.py | discord.notifications.discord.DiscordNotifier | from airflow.providers.common.compat.notifier import BaseNotifier
from functools import cached_property
from airflow.providers.discord.hooks.discord_webhook import DiscordWebhookHook
class DiscordNotifier(BaseNotifier):
"""
Discord BaseNotifier.
:param discord_conn_id: Http connection ID with host as "htt... |
class DiscordNotifier(BaseNotifier):
'''
Discord BaseNotifier.
:param discord_conn_id: Http connection ID with host as "https://discord.com/api/" and
default webhook endpoint in the extra field in the form of
{"webhook_endpoint": "webhooks/{webhook.id}/{web... | 5 | 3 | 9 | 1 | 7 | 1 | 1 | 0.6 | 1 | 4 | 1 | 0 | 3 | 5 | 3 | 23 | 47 | 7 | 25 | 18 | 13 | 15 | 17 | 10 | 13 | 1 | 2 | 0 | 3 |
7,836 | apache/airflow | apache_airflow/providers/discord/src/airflow/providers/discord/operators/discord_webhook.py | discord.operators.discord_webhook.DiscordWebhookOperator | from collections.abc import Sequence
from airflow.providers.http.operators.http import HttpOperator
from airflow.providers.discord.hooks.discord_webhook import DiscordWebhookHook
from airflow.exceptions import AirflowException
class DiscordWebhookOperator(HttpOperator):
"""
This operator allows you to post mes... |
class DiscordWebhookOperator(HttpOperator):
'''
This operator allows you to post messages to Discord using incoming webhooks.
Takes a Discord connection ID with a default relative webhook endpoint. The
default endpoint can be overridden using the webhook_endpoint parameter
(https://discordapp.com/d... | 5 | 2 | 13 | 1 | 12 | 0 | 1 | 0.53 | 1 | 6 | 3 | 0 | 3 | 7 | 3 | 14 | 67 | 9 | 38 | 25 | 22 | 20 | 18 | 13 | 14 | 2 | 2 | 1 | 4 |
7,837 | apache/airflow | apache_airflow/providers/docker/src/airflow/providers/docker/decorators/docker.py | docker.decorators.docker._DockerDecoratedOperator | from airflow.providers.common.compat.standard.utils import write_python_script
from airflow.exceptions import AirflowException
from airflow.providers.docker.operators.docker import DockerOperator
from tempfile import TemporaryDirectory
from collections.abc import Callable, Sequence
import os
class _DockerDecoratedOper... |
class _DockerDecoratedOperator(DecoratedOperator, DockerOperator):
'''
Wraps a Python callable and captures args/kwargs when called for execution.
:param python_callable: A reference to an object that is callable
:param python: Python binary name to use
:param expect_airflow: whether to expect airf... | 6 | 1 | 16 | 1 | 14 | 1 | 2 | 0.38 | 2 | 6 | 2 | 0 | 4 | 6 | 4 | 20 | 97 | 13 | 61 | 27 | 49 | 23 | 32 | 16 | 27 | 3 | 2 | 3 | 7 |
7,838 | apache/airflow | apache_airflow/providers/docker/src/airflow/providers/docker/exceptions.py | docker.exceptions.DockerContainerFailedException | from airflow.exceptions import AirflowException, AirflowSkipException
class DockerContainerFailedException(AirflowException):
"""
Raised when a Docker container returns an error.
:param logs: The log output of the failed Docker container
"""
def __init__(self, message: str | None=None, logs: list... |
class DockerContainerFailedException(AirflowException):
'''
Raised when a Docker container returns an error.
:param logs: The log output of the failed Docker container
'''
def __init__(self, message: str | None=None, logs: list[str | bytes] | None=None) -> None:
pass | 2 | 1 | 3 | 0 | 3 | 0 | 1 | 1 | 1 | 4 | 0 | 0 | 1 | 1 | 1 | 12 | 10 | 2 | 4 | 3 | 2 | 4 | 4 | 3 | 2 | 1 | 4 | 0 | 1 |
7,839 | apache/airflow | apache_airflow/providers/docker/src/airflow/providers/docker/exceptions.py | docker.exceptions.DockerContainerFailedSkipException | from airflow.exceptions import AirflowException, AirflowSkipException
class DockerContainerFailedSkipException(AirflowSkipException):
"""
Raised when a Docker container returns an error and task should be skipped.
:param logs: The log output of the failed Docker container
"""
def __init__(self, m... |
class DockerContainerFailedSkipException(AirflowSkipException):
'''
Raised when a Docker container returns an error and task should be skipped.
:param logs: The log output of the failed Docker container
'''
def __init__(self, message: str | None=None, logs: list[str | bytes] | None=None) -> None:
... | 2 | 1 | 3 | 0 | 3 | 0 | 1 | 1 | 1 | 4 | 0 | 0 | 1 | 1 | 1 | 12 | 10 | 2 | 4 | 3 | 2 | 4 | 4 | 3 | 2 | 1 | 5 | 0 | 1 |
7,840 | apache/airflow | apache_airflow/providers/docker/src/airflow/providers/docker/hooks/docker.py | docker.hooks.docker.DockerHook | from typing import TYPE_CHECKING, Any
from docker.constants import DEFAULT_TIMEOUT_SECONDS
from airflow.providers.docker.version_compat import BaseHook
from docker import APIClient, TLSConfig
import warnings
from docker.errors import APIError, DockerException
from functools import cached_property
from airflow.exception... | null | 15 | 7 | 19 | 1 | 16 | 2 | 3 | 0.23 | 1 | 13 | 2 | 0 | 6 | 6 | 9 | 21 | 207 | 22 | 151 | 53 | 117 | 34 | 88 | 33 | 73 | 8 | 2 | 3 | 30 |
7,841 | apache/airflow | apache_airflow/providers/docker/src/airflow/providers/docker/operators/docker.py | docker.operators.docker.DockerOperator | import os
from functools import cached_property
from collections.abc import Container, Iterable, Sequence
from airflow.providers.docker.version_compat import BaseOperator
from docker.types import LogConfig, Mount, Ulimit
from airflow.providers.docker.exceptions import DockerContainerFailedException, DockerContainerFail... |
class DockerOperator(BaseOperator):
'''
Execute a command inside a docker container.
By default, a temporary directory is
created on the host and mounted into a container to allow storing files
that together exceed the default disk size of 10GB in a container.
In this case The path to the mount... | 16 | 6 | 27 | 1 | 24 | 2 | 4 | 0.5 | 1 | 16 | 4 | 2 | 9 | 47 | 11 | 11 | 448 | 30 | 280 | 135 | 214 | 139 | 157 | 78 | 145 | 14 | 1 | 4 | 42 |
7,842 | apache/airflow | apache_airflow/providers/docker/src/airflow/providers/docker/operators/docker_swarm.py | docker.operators.docker_swarm.DockerSwarmOperator | from docker.errors import APIError
from airflow.exceptions import AirflowException
from airflow.providers.docker.operators.docker import DockerOperator
from time import sleep
import shlex
import re
from docker import types
from airflow.utils.strings import get_random_string
from datetime import datetime
from typing imp... |
class DockerSwarmOperator(DockerOperator):
'''
Execute a command as an ephemeral docker swarm service.
Example use-case - Using Docker Swarm orchestration to make one-time
scripts highly available.
A temporary directory is created on the host and
mounted into a container to allow storing files
... | 12 | 3 | 21 | 2 | 18 | 1 | 4 | 0.58 | 1 | 10 | 2 | 0 | 8 | 20 | 9 | 20 | 277 | 29 | 157 | 61 | 130 | 91 | 105 | 39 | 94 | 13 | 2 | 2 | 35 |
7,843 | apache/airflow | apache_airflow/providers/apache/drill/src/airflow/providers/apache/drill/hooks/drill.py | drill.hooks.drill.DrillHook | from typing import TYPE_CHECKING, Any, NoReturn
from sqlalchemy import create_engine
from collections.abc import Iterable
from airflow.providers.common.sql.hooks.sql import DbApiHook
class DrillHook(DbApiHook):
"""
Interact with Apache Drill via sqlalchemy-drill.
You can specify the SQLAlchemy dialect and... |
class DrillHook(DbApiHook):
'''
Interact with Apache Drill via sqlalchemy-drill.
You can specify the SQLAlchemy dialect and driver that sqlalchemy-drill
will employ to communicate with Drill in the extras field of your
connection, e.g. ``{"dialect_driver": "drill+sadrill"}`` for communication
o... | 5 | 3 | 11 | 1 | 10 | 2 | 2 | 0.48 | 1 | 8 | 0 | 1 | 4 | 0 | 4 | 65 | 72 | 9 | 44 | 29 | 29 | 21 | 28 | 19 | 23 | 3 | 3 | 1 | 7 |
7,844 | apache/airflow | apache_airflow/providers/apache/druid/src/airflow/providers/apache/druid/hooks/druid.py | druid.hooks.druid.DruidDbApiHook | from collections.abc import Iterable
from airflow.providers.common.sql.hooks.sql import DbApiHook
from pydruid.db import connect
from typing import TYPE_CHECKING, Any
class DruidDbApiHook(DbApiHook):
"""
Interact with Druid broker.
This hook is purely for users to query druid broker.
For ingestion, pl... |
class DruidDbApiHook(DbApiHook):
'''
Interact with Druid broker.
This hook is purely for users to query druid broker.
For ingestion, please use druidHook.
:param context: Optional query context parameters to pass to the SQL endpoint.
Example: ``{"sqlFinalizeOuterSketches": True}``
S... | 6 | 3 | 8 | 0 | 7 | 1 | 1 | 0.31 | 1 | 9 | 0 | 1 | 5 | 1 | 5 | 66 | 64 | 9 | 42 | 26 | 28 | 13 | 26 | 18 | 20 | 2 | 3 | 1 | 6 |
7,845 | apache/airflow | apache_airflow/providers/apache/druid/src/airflow/providers/apache/druid/hooks/druid.py | druid.hooks.druid.DruidHook | from airflow.exceptions import AirflowException
import time
from functools import cached_property
from airflow.providers.apache.druid.version_compat import BaseHook
import requests
from typing import TYPE_CHECKING, Any
class DruidHook(BaseHook):
"""
Connection to Druid overlord for ingestion.
To connect t... |
class DruidHook(BaseHook):
'''
Connection to Druid overlord for ingestion.
To connect to a Druid cluster that is secured with the druid-basic-security
extension, add the username and password to the druid ingestion connection.
:param druid_ingest_conn_id: The connection id to the Druid overlord mac... | 11 | 5 | 18 | 2 | 14 | 2 | 3 | 0.26 | 1 | 9 | 2 | 2 | 6 | 5 | 6 | 18 | 129 | 22 | 86 | 39 | 70 | 22 | 66 | 30 | 59 | 8 | 2 | 2 | 18 |
7,846 | apache/airflow | apache_airflow/providers/apache/druid/src/airflow/providers/apache/druid/hooks/druid.py | druid.hooks.druid.IngestionType | from enum import Enum
class IngestionType(Enum):
"""
Druid Ingestion Type. Could be Native batch ingestion or SQL-based ingestion.
https://druid.apache.org/docs/latest/ingestion/index.html
"""
BATCH = 1
MSQ = 2 |
class IngestionType(Enum):
'''
Druid Ingestion Type. Could be Native batch ingestion or SQL-based ingestion.
https://druid.apache.org/docs/latest/ingestion/index.html
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1.33 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 49 | 9 | 2 | 3 | 3 | 2 | 4 | 3 | 3 | 2 | 0 | 4 | 0 | 0 |
7,847 | apache/airflow | apache_airflow/providers/apache/druid/src/airflow/providers/apache/druid/operators/druid.py | druid.operators.druid.DruidOperator | from typing import TYPE_CHECKING, Any
from airflow.providers.apache.druid.version_compat import BaseOperator
from airflow.providers.apache.druid.hooks.druid import DruidHook, IngestionType
from collections.abc import Sequence
class DruidOperator(BaseOperator):
"""
Allows to submit a task directly to druid.
... |
class DruidOperator(BaseOperator):
'''
Allows to submit a task directly to druid.
:param json_index_file: The filepath to the druid index specification
:param druid_ingest_conn_id: The connection id of the Druid overlord which
accepts index jobs
:param timeout: The interval (in seconds) bet... | 3 | 1 | 14 | 0 | 14 | 0 | 1 | 0.39 | 1 | 7 | 2 | 0 | 2 | 6 | 2 | 2 | 47 | 4 | 31 | 23 | 18 | 12 | 16 | 13 | 13 | 1 | 1 | 0 | 2 |
7,848 | apache/airflow | apache_airflow/providers/apache/druid/src/airflow/providers/apache/druid/transfers/hive_to_druid.py | druid.transfers.hive_to_druid.HiveToDruidOperator | from airflow.providers.apache.druid.hooks.druid import DruidHook
from airflow.providers.apache.druid.version_compat import BaseOperator
from airflow.providers.apache.hive.hooks.hive import HiveCliHook, HiveMetastoreHook
from collections.abc import Sequence
from typing import TYPE_CHECKING, Any
class HiveToDruidOperato... |
class HiveToDruidOperator(BaseOperator):
'''
Moves data from Hive to Druid.
[del]note that for now the data is loaded into memory before being pushed to
Druid, so this operator should be used for smallish amount of data.[/del]
:param sql: SQL query to execute against the Druid database. (templated)... | 4 | 2 | 52 | 5 | 43 | 4 | 2 | 0.32 | 1 | 10 | 3 | 0 | 3 | 15 | 3 | 3 | 196 | 21 | 133 | 57 | 110 | 43 | 58 | 38 | 54 | 5 | 1 | 2 | 7 |
7,849 | apache/airflow | apache_airflow/providers/elasticsearch/src/airflow/providers/elasticsearch/hooks/elasticsearch.py | elasticsearch.hooks.elasticsearch.ESConnection | from collections.abc import Iterable, Mapping
from elasticsearch import Elasticsearch
from copy import deepcopy
from typing import TYPE_CHECKING, Any, cast
from urllib import parse
class ESConnection:
"""wrapper class for elasticsearch.Elasticsearch."""
def __init__(self, host: str='localhost', port: int=9200... | null | 6 | 1 | 6 | 0 | 6 | 0 | 1 | 0.03 | 0 | 6 | 1 | 0 | 5 | 8 | 5 | 5 | 38 | 5 | 32 | 25 | 16 | 1 | 21 | 15 | 15 | 2 | 0 | 1 | 6 |
7,850 | apache/airflow | apache_airflow/providers/elasticsearch/src/airflow/providers/elasticsearch/hooks/elasticsearch.py | elasticsearch.hooks.elasticsearch.ElasticsearchPythonHook | from airflow.providers.elasticsearch.version_compat import BaseHook
from typing import TYPE_CHECKING, Any, cast
from elasticsearch import Elasticsearch
from functools import cached_property
class ElasticsearchPythonHook(BaseHook):
"""
Interacts with Elasticsearch. This hook uses the official Elasticsearch Pyth... |
class ElasticsearchPythonHook(BaseHook):
'''
Interacts with Elasticsearch. This hook uses the official Elasticsearch Python Client.
:param hosts: list: A list of a single or many Elasticsearch instances. Example: ["http://localhost:9200"]
:param es_conn_args: dict: Additional arguments you might need t... | 6 | 4 | 6 | 1 | 3 | 2 | 1 | 0.93 | 1 | 5 | 0 | 0 | 4 | 2 | 4 | 16 | 37 | 8 | 15 | 11 | 9 | 14 | 14 | 10 | 9 | 1 | 2 | 0 | 4 |
7,851 | apache/airflow | apache_airflow/providers/elasticsearch/src/airflow/providers/elasticsearch/hooks/elasticsearch.py | elasticsearch.hooks.elasticsearch.ElasticsearchSQLCursor | from typing import TYPE_CHECKING, Any, cast
from collections.abc import Iterable, Mapping
from elasticsearch import Elasticsearch
class ElasticsearchSQLCursor:
"""A PEP 249-like Cursor class for Elasticsearch SQL API."""
def __init__(self, es: Elasticsearch, **kwargs):
self.es = es
self.body =... |
class ElasticsearchSQLCursor:
'''A PEP 249-like Cursor class for Elasticsearch SQL API.'''
def __init__(self, es: Elasticsearch, **kwargs):
pass
@property
def response(self) -> ObjectApiResponse:
pass
@response.setter
def response(self) -> ObjectApiResponse:
pass
@p... | 19 | 1 | 4 | 0 | 4 | 0 | 1 | 0.04 | 0 | 8 | 0 | 0 | 12 | 3 | 12 | 12 | 65 | 12 | 52 | 25 | 31 | 2 | 40 | 17 | 27 | 3 | 0 | 1 | 16 |
7,852 | apache/airflow | apache_airflow/providers/elasticsearch/src/airflow/providers/elasticsearch/hooks/elasticsearch.py | elasticsearch.hooks.elasticsearch.ElasticsearchSQLHook | from airflow.providers.common.sql.hooks.sql import DbApiHook
from collections.abc import Iterable, Mapping
from typing import TYPE_CHECKING, Any, cast
class ElasticsearchSQLHook(DbApiHook):
"""
Interact with Elasticsearch through the elasticsearch-dbapi.
This hook uses the Elasticsearch conn_id.
:par... |
class ElasticsearchSQLHook(DbApiHook):
'''
Interact with Elasticsearch through the elasticsearch-dbapi.
This hook uses the Elasticsearch conn_id.
:param elasticsearch_conn_id: The :ref:`ElasticSearch connection id <howto/connection:elasticsearch>`
used for Elasticsearch credentials.
'''
... | 5 | 2 | 15 | 3 | 12 | 0 | 3 | 0.17 | 1 | 4 | 1 | 2 | 3 | 1 | 3 | 64 | 64 | 16 | 41 | 18 | 37 | 7 | 35 | 18 | 31 | 6 | 3 | 2 | 9 |
7,853 | apache/airflow | apache_airflow/providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_json_formatter.py | elasticsearch.log.es_json_formatter.ElasticsearchJSONFormatter | from datetime import datetime
import pendulum
from airflow.utils.log.json_formatter import JSONFormatter
class ElasticsearchJSONFormatter(JSONFormatter):
"""Convert a log record to JSON with ISO 8601 date and time format."""
default_time_format = '%Y-%m-%dT%H:%M:%S'
default_msec_format = '%s.%03d'
defa... |
class ElasticsearchJSONFormatter(JSONFormatter):
'''Convert a log record to JSON with ISO 8601 date and time format.'''
def formatTime(self, record, datefmt=None):
'''Return the creation time of the LogRecord in ISO 8601 date/time format in the local time zone.'''
pass | 2 | 2 | 11 | 0 | 8 | 3 | 3 | 0.33 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 11 | 18 | 2 | 12 | 7 | 10 | 4 | 12 | 7 | 10 | 3 | 3 | 1 | 3 |
7,854 | apache/airflow | apache_airflow/providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_response.py | elasticsearch.log.es_response.ElasticSearchResponse | from collections.abc import Iterator
class ElasticSearchResponse(AttributeDict):
"""
The ElasticSearchResponse class is used to manage and access the response from an Elasticsearch search.
This class can be iterated over directly to access hits in the response. Indexing the class instance
with an inte... |
class ElasticSearchResponse(AttributeDict):
'''
The ElasticSearchResponse class is used to manage and access the response from an Elasticsearch search.
This class can be iterated over directly to access hits in the response. Indexing the class instance
with an integer or slice will also access the hits... | 7 | 5 | 8 | 1 | 5 | 3 | 2 | 0.92 | 1 | 11 | 2 | 0 | 5 | 0 | 5 | 9 | 61 | 13 | 25 | 11 | 18 | 23 | 24 | 9 | 18 | 4 | 1 | 2 | 9 |
7,855 | apache/airflow | apache_airflow/providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_task_handler.py | elasticsearch.log.es_task_handler.ElasticsearchTaskHandler | import pathlib
import logging
import shutil
import sys
from airflow.utils.session import create_session
from urllib.parse import quote, urlparse
from typing import TYPE_CHECKING, Any, Literal, cast
import pendulum
import os
import contextlib
from elasticsearch.exceptions import NotFoundError
from airflow.providers.elas... |
class ElasticsearchTaskHandler(FileTaskHandler, ExternalLoggingMixin, LoggingMixin):
'''
ElasticsearchTaskHandler is a python log handler that reads logs from Elasticsearch.
Note that Airflow by default does not handle the indexing of logs into Elasticsearch. Instead,
Airflow flushes logs into local fi... | 26 | 14 | 24 | 3 | 15 | 6 | 4 | 0.48 | 3 | 25 | 5 | 0 | 18 | 20 | 20 | 67 | 546 | 84 | 317 | 126 | 271 | 152 | 240 | 99 | 217 | 11 | 4 | 3 | 76 |
7,856 | apache/airflow | apache_airflow/providers/exasol/src/airflow/providers/exasol/hooks/exasol.py | exasol.hooks.exasol.ExasolHook | import pyexasol
from collections.abc import Callable, Iterable, Mapping, Sequence
from pyexasol import ExaConnection, ExaStatement
from typing import TYPE_CHECKING, Any, TypeVar, overload
from airflow.providers.common.sql.hooks.handlers import return_single_query_results
from airflow.providers.common.sql.hooks.sql impo... |
class ExasolHook(DbApiHook):
'''
Interact with Exasol.
You can specify the pyexasol ``compression``, ``encryption``, ``json_lib``
and ``client_name`` parameters in the extra field of your connection
as ``{"compression": True, "json_lib": "rapidjson", etc}``.
See `pyexasol reference
<https:... | 26 | 14 | 18 | 1 | 11 | 6 | 2 | 0.54 | 1 | 12 | 0 | 2 | 11 | 2 | 13 | 74 | 269 | 33 | 155 | 82 | 103 | 83 | 87 | 36 | 73 | 11 | 3 | 5 | 28 |
7,857 | apache/airflow | apache_airflow/providers/exasol/src/airflow/providers/exasol/operators/exasol.py | exasol.operators.exasol.ExasolOperator | from airflow.providers.exasol.hooks.exasol import exasol_fetch_all_handler
from collections.abc import Sequence
from typing import ClassVar
from airflow.providers.common.sql.operators.sql import SQLExecuteQueryOperator
class ExasolOperator(SQLExecuteQueryOperator):
"""
Executes sql code in a specific Exasol da... |
class ExasolOperator(SQLExecuteQueryOperator):
'''
Executes sql code in a specific Exasol database.
:param sql: the SQL code to be executed as a single string, or
a list of str (sql statements), or a reference to a template file.
template references are recognized by str ending in '.sql'
... | 2 | 1 | 13 | 0 | 13 | 0 | 2 | 0.68 | 1 | 2 | 0 | 0 | 1 | 1 | 1 | 13 | 34 | 3 | 19 | 16 | 10 | 13 | 12 | 9 | 10 | 2 | 3 | 1 | 2 |
7,858 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/api/auth/backend/kerberos_auth.py | fab.auth_manager.api.auth.backend.kerberos_auth.KerberosService | class KerberosService:
"""Class to keep information about the Kerberos Service initialized."""
def __init__(self):
self.service_name = None | class KerberosService:
'''Class to keep information about the Kerberos Service initialized.'''
def __init__(self):
pass | 2 | 1 | 2 | 0 | 2 | 0 | 1 | 0.33 | 0 | 0 | 0 | 0 | 1 | 1 | 1 | 1 | 5 | 1 | 3 | 3 | 1 | 1 | 3 | 3 | 1 | 1 | 0 | 0 | 1 |
7,859 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/api/auth/backend/kerberos_auth.py | fab.auth_manager.api.auth.backend.kerberos_auth._KerberosAuth | from typing import TYPE_CHECKING, Any, NamedTuple, TypeVar, cast
class _KerberosAuth(NamedTuple):
return_code: int | None
user: str = ''
token: str | None = None |
class _KerberosAuth(NamedTuple):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0 | 4 | 3 | 3 | 0 | 4 | 3 | 3 | 0 | 1 | 0 | 0 |
7,860 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/cli_commands/user_command.py | fab.auth_manager.cli_commands.user_command.UserSchema | from marshmallow import Schema, fields, validate
class UserSchema(Schema):
"""user collection item schema."""
id = fields.Int()
firstname = fields.Str(required=True)
lastname = fields.Str(required=True)
username = fields.Str(required=True)
email = fields.Email(required=True)
roles = fields.... |
class UserSchema(Schema):
'''user collection item schema.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.14 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 1 | 7 | 6 | 6 | 1 | 7 | 6 | 6 | 0 | 1 | 0 | 0 |
7,861 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/fab_auth_manager.py | fab.auth_manager.fab_auth_manager.FabAuthManager | from airflow.models import Connection, DagModel, Pool, Variable
from airflow.api_fastapi.auth.managers.models.resource_details import AccessView, BackfillDetails, ConfigurationDetails, ConnectionDetails, DagAccessEntity, DagDetails, PoolDetails, VariableDetails
from pathlib import Path
from sqlalchemy.orm import Sessio... |
class FabAuthManager(BaseAuthManager[User]):
'''
Flask-AppBuilder auth manager.
This auth manager is responsible for providing a backward compatible user management experience to users.
'''
def init_flask_resources(self) -> None:
pass
@cached_property
def apiserver_endpoint(self) -... | 49 | 19 | 13 | 1 | 9 | 3 | 2 | 0.34 | 1 | 29 | 18 | 0 | 30 | 0 | 34 | 75 | 500 | 80 | 316 | 136 | 223 | 106 | 182 | 77 | 145 | 9 | 2 | 4 | 77 |
7,862 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/models/__init__.py | fab.auth_manager.models.Action | from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Index, Integer, MetaData, String, Table, UniqueConstraint, event, func, select
from flask_appbuilder.models.sqla import Model
class Action(Model):
"""Represents permission actions such as `can_read`."""
__tablename__ = 'ab_permission'
id = Colum... |
class Action(Model):
'''Represents permission actions such as `can_read`.'''
def __repr__(self):
pass | 2 | 1 | 2 | 0 | 2 | 0 | 1 | 0.17 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 9 | 2 | 6 | 4 | 4 | 1 | 6 | 4 | 4 | 1 | 1 | 0 | 1 |
7,863 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/models/__init__.py | fab.auth_manager.models.Permission | from flask_appbuilder.models.sqla import Model
from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Index, Integer, MetaData, String, Table, UniqueConstraint, event, func, select
from sqlalchemy.orm import backref, declared_attr, registry, relationship
class Permission(Model):
"""Permission pair comprised... |
class Permission(Model):
'''Permission pair comprised of an Action + Resource combo.'''
def __repr__(self):
pass | 2 | 1 | 2 | 0 | 2 | 0 | 1 | 0.06 | 1 | 1 | 0 | 0 | 1 | 0 | 1 | 1 | 21 | 2 | 18 | 8 | 16 | 1 | 10 | 8 | 8 | 1 | 1 | 0 | 1 |
7,864 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/models/__init__.py | fab.auth_manager.models.RegisterUser | from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Index, Integer, MetaData, String, Table, UniqueConstraint, event, func, select
import datetime
from flask_appbuilder.models.sqla import Model
class RegisterUser(Model):
"""Represents a user registration."""
__tablename__ = 'ab_register_user'
id ... |
class RegisterUser(Model):
'''Represents a user registration.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.08 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 1 | 12 | 9 | 11 | 1 | 10 | 9 | 9 | 0 | 1 | 0 | 0 |
7,865 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/models/__init__.py | fab.auth_manager.models.Resource | from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Index, Integer, MetaData, String, Table, UniqueConstraint, event, func, select
from flask_appbuilder.models.sqla import Model
class Resource(Model):
"""Represents permission object such as `User` or `Dag`."""
__tablename__ = 'ab_view_menu'
id = ... |
class Resource(Model):
'''Represents permission object such as `User` or `Dag`.'''
def __eq__(self, other):
pass
def __neq__(self, other):
pass
def __repr__(self):
pass | 4 | 1 | 2 | 0 | 2 | 0 | 1 | 0.1 | 1 | 0 | 0 | 0 | 3 | 0 | 3 | 3 | 15 | 4 | 10 | 6 | 6 | 1 | 10 | 6 | 6 | 1 | 1 | 0 | 3 |
7,866 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/models/__init__.py | fab.auth_manager.models.Role | from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Index, Integer, MetaData, String, Table, UniqueConstraint, event, func, select
from sqlalchemy.orm import backref, declared_attr, registry, relationship
from flask_appbuilder.models.sqla import Model
class Role(Model):
"""Represents a user role to which... |
class Role(Model):
'''Represents a user role to which permissions can be assigned.'''
def __repr__(self):
pass | 2 | 1 | 2 | 0 | 2 | 0 | 1 | 0.14 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 1 | 11 | 3 | 7 | 5 | 5 | 1 | 7 | 5 | 5 | 1 | 1 | 0 | 1 |
7,867 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/models/__init__.py | fab.auth_manager.models.User | from flask import current_app, g
from sqlalchemy import Boolean, Column, DateTime, ForeignKey, Index, Integer, MetaData, String, Table, UniqueConstraint, event, func, select
from flask_appbuilder.models.sqla import Model
from airflow.api_fastapi.auth.managers.models.base_user import BaseUser
from sqlalchemy.orm import ... |
class User(Model, BaseUser):
'''Represents an Airflow user which has roles assigned to it.'''
@declared_attr
def created_by_fk(self):
pass
@declared_attr
def changed_by_fk(self):
pass
@classmethod
def get_user_id(cls):
pass
@property
def is_authenticated(self... | 19 | 1 | 4 | 0 | 4 | 0 | 1 | 0.04 | 2 | 4 | 0 | 0 | 10 | 0 | 11 | 13 | 97 | 14 | 80 | 37 | 61 | 3 | 48 | 29 | 36 | 3 | 1 | 2 | 14 |
7,868 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/models/anonymous_user.py | fab.auth_manager.models.anonymous_user.AnonymousUser | from airflow.api_fastapi.auth.managers.models.base_user import BaseUser
from flask import current_app
from flask_login import AnonymousUserMixin
class AnonymousUser(AnonymousUserMixin, BaseUser):
"""User object used when no active user is logged in."""
_roles: set[tuple[str, str]] = set()
_perms: set[tuple... |
class AnonymousUser(AnonymousUserMixin, BaseUser):
'''User object used when no active user is logged in.'''
@property
def roles(self):
pass
@roles.setter
def roles(self):
pass
@property
def groups(self):
pass
@property
def perms(self):
pass
def g... | 10 | 1 | 4 | 0 | 4 | 0 | 2 | 0.04 | 2 | 2 | 0 | 0 | 4 | 0 | 4 | 6 | 31 | 6 | 24 | 14 | 16 | 1 | 19 | 10 | 14 | 3 | 1 | 1 | 7 |
7,869 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/models/db.py | fab.auth_manager.models.db.FABDBManager | from airflow import settings
from airflow.utils.db_manager import BaseDBManager
from airflow.providers.fab.auth_manager.models import metadata
from airflow.exceptions import AirflowException
from airflow.utils.db import _offline_migration, print_happy_cat
class FABDBManager(BaseDBManager):
"""Manages FAB database.... |
class FABDBManager(BaseDBManager):
'''Manages FAB database.'''
def create_db_from_orm(self):
pass
def reset_to_2_x(self):
pass
def upgradedb(self, to_revision=None, from_revision=None, show_sql_only=False):
'''Upgrade the database.'''
pass
def downgrade(self, to_... | 6 | 2 | 32 | 6 | 24 | 3 | 8 | 0.11 | 1 | 4 | 1 | 0 | 2 | 0 | 2 | 20 | 73 | 14 | 54 | 14 | 49 | 6 | 49 | 14 | 44 | 9 | 2 | 2 | 15 |
7,870 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/schemas/role_and_permission_schema.py | fab.auth_manager.schemas.role_and_permission_schema.ActionCollection | from airflow.providers.fab.auth_manager.models import Action, Permission, Resource, Role
from typing import NamedTuple
class ActionCollection(NamedTuple):
"""Action Collection."""
actions: list[Action]
total_entries: int |
class ActionCollection(NamedTuple):
'''Action Collection.'''
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,871 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/schemas/role_and_permission_schema.py | fab.auth_manager.schemas.role_and_permission_schema.ActionCollectionSchema | from marshmallow import Schema, fields
class ActionCollectionSchema(Schema):
"""Permissions list schema."""
actions = fields.List(fields.Nested(ActionSchema))
total_entries = fields.Int() |
class ActionCollectionSchema(Schema):
'''Permissions list schema.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.33 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 1 | 3 | 3 | 2 | 1 | 3 | 3 | 2 | 0 | 1 | 0 | 0 |
7,872 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/schemas/role_and_permission_schema.py | fab.auth_manager.schemas.role_and_permission_schema.RoleCollection | from airflow.providers.fab.auth_manager.models import Action, Permission, Resource, Role
from typing import NamedTuple
class RoleCollection(NamedTuple):
"""List of roles."""
roles: list[Role]
total_entries: int |
class RoleCollection(NamedTuple):
'''List of roles.'''
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,873 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/schemas/role_and_permission_schema.py | fab.auth_manager.schemas.role_and_permission_schema.RoleCollectionSchema | from marshmallow import Schema, fields
class RoleCollectionSchema(Schema):
"""List of roles."""
roles = fields.List(fields.Nested(RoleSchema))
total_entries = fields.Int() |
class RoleCollectionSchema(Schema):
'''List of roles.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.33 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 1 | 3 | 3 | 2 | 1 | 3 | 3 | 2 | 0 | 1 | 0 | 0 |
7,874 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/schemas/user_schema.py | fab.auth_manager.schemas.user_schema.UserCollection | from airflow.providers.fab.auth_manager.models import User
from typing import NamedTuple
class UserCollection(NamedTuple):
"""User collection."""
users: list[User]
total_entries: int |
class UserCollection(NamedTuple):
'''User collection.'''
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,875 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/schemas/user_schema.py | fab.auth_manager.schemas.user_schema.UserCollectionSchema | from marshmallow import Schema, fields
class UserCollectionSchema(Schema):
"""User collection schema."""
users = fields.List(fields.Nested(UserCollectionItemSchema))
total_entries = fields.Int() |
class UserCollectionSchema(Schema):
'''User collection schema.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.33 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | 1 | 3 | 3 | 2 | 1 | 3 | 3 | 2 | 0 | 1 | 0 | 0 |
7,876 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/schemas/user_schema.py | fab.auth_manager.schemas.user_schema.UserSchema | from marshmallow_sqlalchemy import SQLAlchemySchema, auto_field
class UserSchema(UserCollectionItemSchema):
"""User schema."""
password = auto_field(load_only=True) |
class UserSchema(UserCollectionItemSchema):
'''User schema.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 1 | 2 | 2 | 1 | 1 | 2 | 2 | 1 | 0 | 2 | 0 | 0 |
7,877 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/security_manager/override.py | fab.auth_manager.security_manager.override.FabAirflowSecurityManagerOverride | from airflow.exceptions import AirflowException
from flask_appbuilder.models.sqla.interface import SQLAInterface
from airflow.security.permissions import RESOURCE_BACKFILL
from airflow.configuration import conf
from flask_appbuilder.models.sqla import Base
from airflow.providers.fab.www.session import AirflowDatabaseSe... | null | 160 | 93 | 16 | 1 | 11 | 3 | 3 | 0.33 | 1 | 32 | 9 | 4 | 131 | 3 | 139 | 157 | 2,614 | 338 | 1,719 | 479 | 1,489 | 561 | 1,215 | 382 | 1,063 | 31 | 2 | 6 | 401 |
7,878 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/views/permissions.py | fab.auth_manager.views.permissions.ActionModelView | from flask_appbuilder.security.views import PermissionModelView, PermissionViewModelView, ViewMenuModelView
from airflow.providers.fab.www.security import permissions
from flask_babel import lazy_gettext
class ActionModelView(PermissionModelView):
"""Customize permission names for FAB's builtin PermissionModelView... |
class ActionModelView(PermissionModelView):
'''Customize permission names for FAB's builtin PermissionModelView.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.07 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 3 | 14 | 10 | 13 | 1 | 10 | 10 | 9 | 0 | 1 | 0 | 0 |
7,879 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/views/permissions.py | fab.auth_manager.views.permissions.PermissionPairModelView | from airflow.providers.fab.www.security import permissions
from flask_babel import lazy_gettext
from flask_appbuilder.security.views import PermissionModelView, PermissionViewModelView, ViewMenuModelView
class PermissionPairModelView(PermissionViewModelView):
"""Customize permission names for FAB's builtin Permiss... |
class PermissionPairModelView(PermissionViewModelView):
'''Customize permission names for FAB's builtin PermissionViewModelView.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.06 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 3 | 18 | 11 | 17 | 1 | 11 | 11 | 10 | 0 | 1 | 0 | 0 |
7,880 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/views/permissions.py | fab.auth_manager.views.permissions.ResourceModelView | from airflow.providers.fab.www.security import permissions
from flask_babel import lazy_gettext
from flask_appbuilder.security.views import PermissionModelView, PermissionViewModelView, ViewMenuModelView
class ResourceModelView(ViewMenuModelView):
"""Customize permission names for FAB's builtin ViewMenuModelView."... |
class ResourceModelView(ViewMenuModelView):
'''Customize permission names for FAB's builtin ViewMenuModelView.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.07 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 3 | 14 | 10 | 13 | 1 | 10 | 10 | 9 | 0 | 1 | 0 | 0 |
7,881 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/views/roles_list.py | fab.auth_manager.views.roles_list.CustomRoleModelView | from airflow.providers.fab.www.security import permissions
from flask_appbuilder.security.views import RoleModelView
class CustomRoleModelView(RoleModelView):
"""Customize permission names for FAB's builtin RoleModelView."""
class_permission_name = permissions.RESOURCE_ROLE
method_permission_name = {'delet... |
class CustomRoleModelView(RoleModelView):
'''Customize permission names for FAB's builtin RoleModelView.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.06 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 19 | 1 | 17 | 4 | 16 | 1 | 4 | 4 | 3 | 0 | 1 | 0 | 0 |
7,882 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/views/user.py | fab.auth_manager.views.user.CustomUserDBModelView | from flask_appbuilder.security.views import UserDBModelView, UserLDAPModelView, UserOAuthModelView, UserOIDModelView, UserRemoteUserModelView
from airflow.providers.fab.www.security import permissions
class CustomUserDBModelView(MultiResourceUserMixin, UserDBModelView):
"""Customize permission names for FAB's buil... |
class CustomUserDBModelView(MultiResourceUserMixin, UserDBModelView):
'''Customize permission names for FAB's builtin UserDBModelView.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.04 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 31 | 4 | 26 | 5 | 25 | 1 | 5 | 5 | 4 | 0 | 1 | 0 | 0 |
7,883 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/views/user.py | fab.auth_manager.views.user.CustomUserLDAPModelView | from flask_appbuilder.security.views import UserDBModelView, UserLDAPModelView, UserOAuthModelView, UserOIDModelView, UserRemoteUserModelView
from airflow.providers.fab.www.security import permissions
class CustomUserLDAPModelView(MultiResourceUserMixin, UserLDAPModelView):
"""Customize permission names for FAB's ... |
class CustomUserLDAPModelView(MultiResourceUserMixin, UserLDAPModelView):
'''Customize permission names for FAB's builtin UserLDAPModelView.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.05 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 27 | 4 | 22 | 5 | 21 | 1 | 5 | 5 | 4 | 0 | 1 | 0 | 0 |
7,884 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/views/user.py | fab.auth_manager.views.user.CustomUserOAuthModelView | from flask_appbuilder.security.views import UserDBModelView, UserLDAPModelView, UserOAuthModelView, UserOIDModelView, UserRemoteUserModelView
class CustomUserOAuthModelView(MultiResourceUserMixin, UserOAuthModelView):
"""Customize permission names for FAB's builtin UserOAuthModelView.""" |
class CustomUserOAuthModelView(MultiResourceUserMixin, UserOAuthModelView):
'''Customize permission names for FAB's builtin UserOAuthModelView.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 |
7,885 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/views/user.py | fab.auth_manager.views.user.CustomUserOIDModelView | from flask_appbuilder.security.views import UserDBModelView, UserLDAPModelView, UserOAuthModelView, UserOIDModelView, UserRemoteUserModelView
class CustomUserOIDModelView(MultiResourceUserMixin, UserOIDModelView):
"""Customize permission names for FAB's builtin UserOIDModelView.""" |
class CustomUserOIDModelView(MultiResourceUserMixin, UserOIDModelView):
'''Customize permission names for FAB's builtin UserOIDModelView.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 0 | 0 |
7,886 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/views/user.py | fab.auth_manager.views.user.CustomUserRemoteUserModelView | from airflow.providers.fab.www.security import permissions
from flask_appbuilder.security.views import UserDBModelView, UserLDAPModelView, UserOAuthModelView, UserOIDModelView, UserRemoteUserModelView
class CustomUserRemoteUserModelView(MultiResourceUserMixin, UserRemoteUserModelView):
"""Customize permission name... |
class CustomUserRemoteUserModelView(MultiResourceUserMixin, UserRemoteUserModelView):
'''Customize permission names for FAB's builtin UserRemoteUserModelView.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.05 | 2 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 27 | 4 | 22 | 5 | 21 | 1 | 5 | 5 | 4 | 0 | 1 | 0 | 0 |
7,887 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/views/user.py | fab.auth_manager.views.user.MultiResourceUserMixin | from flask_appbuilder import expose
from flask import request
from flask_appbuilder.security.decorators import has_access
from airflow.providers.fab.www.security import permissions
class MultiResourceUserMixin:
"""Remaps UserModelView permissions to new resources and actions."""
_class_permission_name = permis... |
class MultiResourceUserMixin:
'''Remaps UserModelView permissions to new resources and actions.'''
@property
def class_permission_name(self):
'''Returns appropriate permission name depending on request method name.'''
pass
@class_permission_name.setter
def class_permission_name(self... | 8 | 2 | 8 | 0 | 8 | 0 | 2 | 0.04 | 0 | 0 | 0 | 5 | 3 | 2 | 3 | 3 | 56 | 7 | 47 | 16 | 39 | 2 | 22 | 11 | 18 | 4 | 0 | 2 | 6 |
7,888 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/views/user_edit.py | fab.auth_manager.views.user_edit.CustomResetMyPasswordView | from flask_appbuilder.security.views import ResetMyPasswordView, ResetPasswordView, UserInfoEditView
from airflow.providers.fab.www.security import permissions
class CustomResetMyPasswordView(ResetMyPasswordView):
"""Customize permission names for FAB's builtin ResetMyPasswordView."""
class_permission_name = p... |
class CustomResetMyPasswordView(ResetMyPasswordView):
'''Customize permission names for FAB's builtin ResetMyPasswordView.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.14 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 1 | 7 | 4 | 6 | 1 | 4 | 4 | 3 | 0 | 1 | 0 | 0 |
7,889 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/views/user_edit.py | fab.auth_manager.views.user_edit.CustomResetPasswordView | from flask_appbuilder.security.views import ResetMyPasswordView, ResetPasswordView, UserInfoEditView
from airflow.providers.fab.www.security import permissions
class CustomResetPasswordView(ResetPasswordView):
"""Customize permission names for FAB's builtin ResetPasswordView."""
class_permission_name = permiss... |
class CustomResetPasswordView(ResetPasswordView):
'''Customize permission names for FAB's builtin ResetPasswordView.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.14 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 2 | 7 | 4 | 6 | 1 | 4 | 4 | 3 | 0 | 1 | 0 | 0 |
7,890 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/views/user_edit.py | fab.auth_manager.views.user_edit.CustomUserInfoEditView | from airflow.providers.fab.www.security import permissions
from flask_appbuilder.security.views import ResetMyPasswordView, ResetPasswordView, UserInfoEditView
class CustomUserInfoEditView(UserInfoEditView):
"""Customize permission names for FAB's builtin UserInfoEditView."""
class_permission_name = permission... |
class CustomUserInfoEditView(UserInfoEditView):
'''Customize permission names for FAB's builtin UserInfoEditView.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.13 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 1 | 8 | 5 | 7 | 1 | 5 | 5 | 4 | 0 | 1 | 0 | 0 |
7,891 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/auth_manager/views/user_stats.py | fab.auth_manager.views.user_stats.CustomUserStatsChartView | from flask_appbuilder.security.views import UserStatsChartView
from airflow.providers.fab.www.security import permissions
class CustomUserStatsChartView(UserStatsChartView):
"""Customize permission names for FAB's builtin UserStatsChartView."""
class_permission_name = permissions.RESOURCE_USER_STATS_CHART
... |
class CustomUserStatsChartView(UserStatsChartView):
'''Customize permission names for FAB's builtin UserStatsChartView.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0.13 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 1 | 8 | 5 | 7 | 1 | 5 | 5 | 4 | 0 | 1 | 0 | 0 |
7,892 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/www/api_connexion/exceptions.py | fab.www.api_connexion.exceptions.AlreadyExists | class AlreadyExists(Conflict):
"""Raise when the object already exists.""" | class AlreadyExists(Conflict):
'''Raise when the object already exists.'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 1 | 0 | 0 | 2 | 0 | 0 |
7,893 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/www/api_connexion/exceptions.py | fab.www.api_connexion.exceptions.BadRequest | from typing import TYPE_CHECKING, Any
from connexion import FlaskApi, ProblemException, problem
from http import HTTPStatus
class BadRequest(ProblemException):
"""Raise when the server processes a bad request."""
def __init__(self, title: str='Bad Request', detail: str | None=None, headers: dict | None=None, ... |
class BadRequest(ProblemException):
'''Raise when the server processes a bad request.'''
def __init__(self, title: str='Bad Request', detail: str | None=None, headers: dict | None=None, **kwargs: Any) -> None:
pass | 2 | 1 | 15 | 0 | 15 | 0 | 1 | 0.06 | 1 | 5 | 0 | 0 | 1 | 0 | 1 | 1 | 18 | 1 | 16 | 8 | 8 | 1 | 3 | 2 | 1 | 1 | 1 | 0 | 1 |
7,894 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/www/api_connexion/exceptions.py | fab.www.api_connexion.exceptions.Conflict | from connexion import FlaskApi, ProblemException, problem
from typing import TYPE_CHECKING, Any
from http import HTTPStatus
class Conflict(ProblemException):
"""Raise when there is some conflict."""
def __init__(self, title='Conflict', detail: str | None=None, headers: dict | None=None, **kwargs: Any):
... |
class Conflict(ProblemException):
'''Raise when there is some conflict.'''
def __init__(self, title='Conflict', detail: str | None=None, headers: dict | None=None, **kwargs: Any):
pass | 2 | 1 | 15 | 0 | 15 | 0 | 1 | 0.06 | 1 | 5 | 0 | 1 | 1 | 0 | 1 | 1 | 18 | 1 | 16 | 8 | 8 | 1 | 3 | 2 | 1 | 1 | 1 | 0 | 1 |
7,895 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/www/api_connexion/exceptions.py | fab.www.api_connexion.exceptions.NotFound | from connexion import FlaskApi, ProblemException, problem
from typing import TYPE_CHECKING, Any
from http import HTTPStatus
class NotFound(ProblemException):
"""Raise when the object cannot be found."""
def __init__(self, title: str='Not Found', detail: str | None=None, headers: dict | None=None, **kwargs: An... |
class NotFound(ProblemException):
'''Raise when the object cannot be found.'''
def __init__(self, title: str='Not Found', detail: str | None=None, headers: dict | None=None, **kwargs: Any) -> None:
pass | 2 | 1 | 15 | 0 | 15 | 0 | 1 | 0.06 | 1 | 5 | 0 | 0 | 1 | 0 | 1 | 1 | 18 | 1 | 16 | 8 | 8 | 1 | 3 | 2 | 1 | 1 | 1 | 0 | 1 |
7,896 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/www/api_connexion/exceptions.py | fab.www.api_connexion.exceptions.PermissionDenied | from typing import TYPE_CHECKING, Any
from http import HTTPStatus
from connexion import FlaskApi, ProblemException, problem
class PermissionDenied(ProblemException):
"""Raise when the user does not have the required permissions."""
def __init__(self, title: str='Forbidden', detail: str | None=None, headers: d... |
class PermissionDenied(ProblemException):
'''Raise when the user does not have the required permissions.'''
def __init__(self, title: str='Forbidden', detail: str | None=None, headers: dict | None=None, **kwargs: Any) -> None:
pass | 2 | 1 | 15 | 0 | 15 | 0 | 1 | 0.06 | 1 | 5 | 0 | 0 | 1 | 0 | 1 | 1 | 18 | 1 | 16 | 8 | 8 | 1 | 3 | 2 | 1 | 1 | 1 | 0 | 1 |
7,897 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/www/api_connexion/exceptions.py | fab.www.api_connexion.exceptions.Unauthenticated | from http import HTTPStatus
from typing import TYPE_CHECKING, Any
from connexion import FlaskApi, ProblemException, problem
class Unauthenticated(ProblemException):
"""Raise when the user is not authenticated."""
def __init__(self, title: str='Unauthorized', detail: str | None=None, headers: dict | None=None,... |
class Unauthenticated(ProblemException):
'''Raise when the user is not authenticated.'''
def __init__(self, title: str='Unauthorized', detail: str | None=None, headers: dict | None=None, **kwargs: Any):
pass | 2 | 1 | 15 | 0 | 15 | 0 | 1 | 0.06 | 1 | 5 | 0 | 0 | 1 | 0 | 1 | 1 | 18 | 1 | 16 | 8 | 8 | 1 | 3 | 2 | 1 | 1 | 1 | 0 | 1 |
7,898 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/www/api_connexion/exceptions.py | fab.www.api_connexion.exceptions.Unknown | from connexion import FlaskApi, ProblemException, problem
from http import HTTPStatus
from typing import TYPE_CHECKING, Any
class Unknown(ProblemException):
"""Returns a response body and status code for HTTP 500 exception."""
def __init__(self, title: str='Internal Server Error', detail: str | None=None, hea... |
class Unknown(ProblemException):
'''Returns a response body and status code for HTTP 500 exception.'''
def __init__(self, title: str='Internal Server Error', detail: str | None=None, headers: dict | None=None, **kwargs: Any) -> None:
pass | 2 | 1 | 15 | 0 | 15 | 0 | 1 | 0.06 | 1 | 5 | 0 | 0 | 1 | 0 | 1 | 1 | 18 | 1 | 16 | 8 | 8 | 1 | 3 | 2 | 1 | 1 | 1 | 0 | 1 |
7,899 | apache/airflow | apache_airflow/providers/fab/src/airflow/providers/fab/www/extensions/init_appbuilder.py | fab.www.extensions.init_appbuilder.AirflowAppBuilder | from airflow.api_fastapi.app import create_auth_manager, get_auth_manager
from airflow.providers.fab.www.security_manager import AirflowSecurityManagerV2
from airflow.configuration import conf
from flask_appbuilder import __version__
from flask_appbuilder.const import LOGMSG_ERR_FAB_ADD_PERMISSION_MENU, LOGMSG_ERR_FAB_... |
class AirflowAppBuilder:
'''This is the base class for all the framework.'''
def __init__(self, app=None, session: Session | None=None, menu=None, indexview=None, base_template='airflow/main.html', static_folder='static/appbuilder', static_url_path='/appbuilder', enable_plugins: bool=False):
'''
... | 43 | 17 | 15 | 1 | 9 | 6 | 2 | 0.6 | 0 | 5 | 3 | 0 | 29 | 5 | 29 | 29 | 497 | 53 | 277 | 101 | 206 | 167 | 199 | 58 | 168 | 5 | 0 | 4 | 62 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.