Benign python Download

apache-airflow-providers-sftp 5.8.2

Paramiko Python SSH libraryAsyncSSH connection call
SHA-25623d88e7d0059f2c87faf6e63c66a47d8b473561b3837692ea760ac83f6f2e487
MaleculeH₂(Cm₃F)

Evidence

Python comment contains a URL sftp.py · lines 1–13
1#
2# Licensed to the Apache Software Foundation (ASF) under one
3# or more contributor license agreements. See the NOTICE file
4# distributed with this work for additional information
5# regarding copyright ownership. The ASF licenses this file
6# to you under the Apache License, Version 2.0 (the
7# "License"); you may not use this file except in compliance
8# with the License. You may obtain a copy of the License at
9#
10# http://www.apache.org/licenses/LICENSE-2.0
11#
12# Unless required by applicable law or agreed to in writing,
13# software distributed under …
imports os sftp.py · lines 15–52
15:55… r the
16# specific language governing permissions and limitations
17# under the License.
18"""This module contains SFTP operator."""
19
20from __future__ import annotations
21
22import errno
23import os
24import socket
25from collections.abc import Sequence
26from pathlib import Path
27from typing import Any
28
29import paramiko
30
31from airflow.providers.common.compat.sdk import AirflowException, BaseOperator
32from airflow.providers.sftp.hooks.sftp import SFTPHook
33
34
35class SFTPOperation:
36 """Operation that can be used with SFTP."""
37
38 PUT = "put"
⋯8 lines
47 This operator uses sftp_hook to open sftp transport channel that serve as basis for file transfer.
48
49 :param ssh_conn_id: :ref:`ssh connection id<howto/connection:ssh>`
50 from airflow Connections.
51 :param sftp_hook: predefined SFTPHook to use
52 …
Python os.path.isdir path test sftp.py · lines 191–194
191:44… ting to transfer file %s", file_msg)
192 if os.path.isdir(_local_filepath):
193 if self.concurrency > 1:
194 self.sftp_hook.store_dire …
Python DNS resolution API reference sftp.py · lines 246–260
246:39… t>:<remote_port>/path.
247 """
248 from airflow.providers.common.compat.openlineage.facet import Dataset
249 from airflow.providers.openlineage.extractors import OperatorLineage
250
251 scheme = "file"
252 local_host = socket.gethostname()
253 try:
254 local_host = socket.gethostbyname(local_host)
255 except Exception as e:
256 self.log.warning(
⋯4 lines
imports asyncssh sftp.py · lines 14–41
14:55… r the
15# specific language governing permissions and limitations
16# under the License.
17from __future__ import annotations
18
19import asyncio
20import os
21from contextlib import asynccontextmanager, suppress
22from dataclasses import dataclass, field
23from threading import Lock
24from typing import TYPE_CHECKING
25from weakref import WeakKeyDictionary
26
27from airflow.providers.sftp.hooks.sftp import SFTPHookAsync
28from airflow.utils.log.logging_mixin import LoggingMixin
29
30if TYPE_CHECKING:
31 import asyncssh
32
33
34@dataclass
35class _LoopState:
36 """Per-event-loop state for SFTP client pool."""
37
38 idle: asyncio.LifoQueue = field(default_factory=asyncio.LifoQueue)
39 in_use: set[tuple[asyncssh.SSHClientConnection, asyncssh.SFTPClient]] = field(default_factory=set)
40 semaphore: asyncio.Semaphore | None = None
41 init_lock: asy …

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.