garf-executors 0.0.8__py3-none-any.whl → 0.0.9__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of garf-executors might be problematic. Click here for more details.
- garf_executors/__init__.py +10 -4
- garf_executors/api_executor.py +4 -1
- garf_executors/bq_executor.py +1 -1
- garf_executors/entrypoints/cli.py +2 -1
- garf_executors/entrypoints/server.py +1 -1
- garf_executors/entrypoints/utils.py +1 -2
- garf_executors/execution_context.py +0 -1
- garf_executors/sql_executor.py +1 -1
- {garf_executors-0.0.8.dist-info → garf_executors-0.0.9.dist-info}/METADATA +1 -1
- garf_executors-0.0.9.dist-info/RECORD +17 -0
- garf_executors-0.0.8.dist-info/RECORD +0 -17
- {garf_executors-0.0.8.dist-info → garf_executors-0.0.9.dist-info}/WHEEL +0 -0
- {garf_executors-0.0.8.dist-info → garf_executors-0.0.9.dist-info}/entry_points.txt +0 -0
- {garf_executors-0.0.8.dist-info → garf_executors-0.0.9.dist-info}/top_level.txt +0 -0
garf_executors/__init__.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Copyright
|
|
1
|
+
# Copyright 2025 Google LLC
|
|
2
2
|
#
|
|
3
3
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
4
|
# you may not use this file except in compliance with the License.
|
|
@@ -15,15 +15,21 @@
|
|
|
15
15
|
|
|
16
16
|
from __future__ import annotations
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
import importlib
|
|
19
|
+
|
|
20
|
+
from garf_executors import executor, fetchers
|
|
19
21
|
from garf_executors.api_executor import ApiExecutionContext, ApiQueryExecutor
|
|
20
22
|
|
|
21
23
|
|
|
22
|
-
def setup_executor(
|
|
24
|
+
def setup_executor(
|
|
25
|
+
source: str, fetcher_parameters: dict[str, str]
|
|
26
|
+
) -> type[executor.Executor]:
|
|
23
27
|
"""Initializes executors based on a source and parameters."""
|
|
24
28
|
if source == 'bq':
|
|
29
|
+
bq_executor = importlib.import_module('garf_executors.bq_executor')
|
|
25
30
|
query_executor = bq_executor.BigQueryExecutor(**fetcher_parameters)
|
|
26
31
|
elif source == 'sqldb':
|
|
32
|
+
sql_executor = importlib.import_module('garf_executors.sql_executor')
|
|
27
33
|
query_executor = (
|
|
28
34
|
sql_executor.SqlAlchemyQueryExecutor.from_connection_string(
|
|
29
35
|
fetcher_parameters.get('connection_string')
|
|
@@ -42,4 +48,4 @@ __all__ = [
|
|
|
42
48
|
'ApiExecutionContext',
|
|
43
49
|
]
|
|
44
50
|
|
|
45
|
-
__version__ = '0.0.
|
|
51
|
+
__version__ = '0.0.9'
|
garf_executors/api_executor.py
CHANGED
|
@@ -23,6 +23,7 @@ from __future__ import annotations
|
|
|
23
23
|
import logging
|
|
24
24
|
|
|
25
25
|
from garf_core import report_fetcher
|
|
26
|
+
|
|
26
27
|
from garf_executors import exceptions, execution_context, executor, fetchers
|
|
27
28
|
|
|
28
29
|
logger = logging.getLogger(__name__)
|
|
@@ -51,8 +52,10 @@ class ApiQueryExecutor(executor.Executor):
|
|
|
51
52
|
|
|
52
53
|
@classmethod
|
|
53
54
|
def from_fetcher_alias(
|
|
54
|
-
cls, source: str, fetcher_parameters: dict[str, str]
|
|
55
|
+
cls, source: str, fetcher_parameters: dict[str, str] | None = None
|
|
55
56
|
) -> ApiQueryExecutor:
|
|
57
|
+
if not fetcher_parameters:
|
|
58
|
+
fetcher_parameters = {}
|
|
56
59
|
concrete_api_fetcher = fetchers.get_report_fetcher(source)
|
|
57
60
|
return ApiQueryExecutor(concrete_api_fetcher(**fetcher_parameters))
|
|
58
61
|
|
garf_executors/bq_executor.py
CHANGED
|
@@ -27,9 +27,9 @@ except ImportError as e:
|
|
|
27
27
|
|
|
28
28
|
import logging
|
|
29
29
|
|
|
30
|
+
from garf_core import query_editor, report
|
|
30
31
|
from google.cloud import exceptions as google_cloud_exceptions
|
|
31
32
|
|
|
32
|
-
from garf_core import query_editor, report
|
|
33
33
|
from garf_executors import exceptions, execution_context, executor
|
|
34
34
|
|
|
35
35
|
logger = logging.getLogger(__name__)
|
|
@@ -22,10 +22,11 @@ from __future__ import annotations
|
|
|
22
22
|
import argparse
|
|
23
23
|
import sys
|
|
24
24
|
|
|
25
|
+
from garf_io import reader
|
|
26
|
+
|
|
25
27
|
import garf_executors
|
|
26
28
|
from garf_executors import exceptions
|
|
27
29
|
from garf_executors.entrypoints import utils
|
|
28
|
-
from garf_io import reader
|
|
29
30
|
|
|
30
31
|
|
|
31
32
|
def main():
|
|
@@ -26,9 +26,8 @@ from typing import Any, TypedDict
|
|
|
26
26
|
import smart_open
|
|
27
27
|
import yaml
|
|
28
28
|
from dateutil import relativedelta
|
|
29
|
-
from rich import logging as rich_logging
|
|
30
|
-
|
|
31
29
|
from garf_core import query_editor
|
|
30
|
+
from rich import logging as rich_logging
|
|
32
31
|
|
|
33
32
|
|
|
34
33
|
class GarfQueryParameters(TypedDict):
|
garf_executors/sql_executor.py
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: garf-executors
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.9
|
|
4
4
|
Summary: Executes queries against API and writes data to local/remote storage.
|
|
5
5
|
Author-email: "Google Inc. (gTech gPS CSE team)" <no-reply@google.com>, Andrei Markin <andrey.markin.ppc@gmail.com>
|
|
6
6
|
License: Apache 2.0
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
garf_executors/__init__.py,sha256=bydTJJBI8B4Xm9JMWwFqPWEXBUXSWEoal578Ur_QrcE,1686
|
|
2
|
+
garf_executors/api_executor.py,sha256=gifws1Kv-k_v3TtRQGn-WJiRQ1yWSyAdOJk38ab-nms,3573
|
|
3
|
+
garf_executors/bq_executor.py,sha256=yEEKajUs8sVfJUyVKc0j2TDEj9GN_lAWVGaWRk0QSpY,4802
|
|
4
|
+
garf_executors/exceptions.py,sha256=U_7Q2ZMOUf89gzZd2pw7y3g7i1NeByPPKfpZ3q7p3ZU,662
|
|
5
|
+
garf_executors/execution_context.py,sha256=maSg_lVd6HzVFhT2e0gsc1W8K_iarRupUfMGfuEcMvg,1965
|
|
6
|
+
garf_executors/executor.py,sha256=bGTGlWZT5B7I_WIjhuQ0CkL7Dij_ijFCBxuC1jGVkng,1626
|
|
7
|
+
garf_executors/fetchers.py,sha256=m2feJ6ByYq-oJXuQ3tmaNMx7soMcGsVC2hY4kOsPaNQ,1833
|
|
8
|
+
garf_executors/sql_executor.py,sha256=OGUN1AaSi6jC1v4YW0ZmcYXPE5EYfNbBRXrpdf4QTk4,3699
|
|
9
|
+
garf_executors/entrypoints/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
+
garf_executors/entrypoints/cli.py,sha256=rEjSFdRXu4-SUC8jZfOSaTW_WXYWiShtmrsnz-6I7do,3456
|
|
11
|
+
garf_executors/entrypoints/server.py,sha256=1Te4x2kVlVrBjYGruCk3Qq8B_QKXePXjK7qMg4jJms0,2821
|
|
12
|
+
garf_executors/entrypoints/utils.py,sha256=LjngjMs7Yj8wjwS8T-njq7xazku86FS24FsprwT6i1E,15056
|
|
13
|
+
garf_executors-0.0.9.dist-info/METADATA,sha256=ydgsjxE4Fc4ytNe-B6ZtRgwYzC4ac69oMmMc09AcKG0,2648
|
|
14
|
+
garf_executors-0.0.9.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
15
|
+
garf_executors-0.0.9.dist-info/entry_points.txt,sha256=LskWNFIw8j0WJuI18-32OZrlASXAMg1XtrRYwsKBz2E,61
|
|
16
|
+
garf_executors-0.0.9.dist-info/top_level.txt,sha256=sP4dCXOENPn1hDFAunjMV8Js4NND_KGeO_gQWuaT0EY,15
|
|
17
|
+
garf_executors-0.0.9.dist-info/RECORD,,
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
garf_executors/__init__.py,sha256=MYFPN_XcBsgaW9jzoM9UHFKerUzhIjmFGgGyaBscWGE,1508
|
|
2
|
-
garf_executors/api_executor.py,sha256=zSLyUGZIav2t0E6uXdaZX9Ps-mE_Q2YLeTjH4s3i028,3497
|
|
3
|
-
garf_executors/bq_executor.py,sha256=XRik48P7aQkoLpABzWzEX2t3ktQVPrXp2v7Zdu8qWVI,4802
|
|
4
|
-
garf_executors/exceptions.py,sha256=U_7Q2ZMOUf89gzZd2pw7y3g7i1NeByPPKfpZ3q7p3ZU,662
|
|
5
|
-
garf_executors/execution_context.py,sha256=0PYYnwkwBJ2B1HpNN5MrANZkIbuzyxH7EzEjUPf0GGA,1966
|
|
6
|
-
garf_executors/executor.py,sha256=bGTGlWZT5B7I_WIjhuQ0CkL7Dij_ijFCBxuC1jGVkng,1626
|
|
7
|
-
garf_executors/fetchers.py,sha256=m2feJ6ByYq-oJXuQ3tmaNMx7soMcGsVC2hY4kOsPaNQ,1833
|
|
8
|
-
garf_executors/sql_executor.py,sha256=vG3-FM4C1O0rVwFMPIw85xoErsnTBYoVhMTgt9jP3QM,3699
|
|
9
|
-
garf_executors/entrypoints/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
-
garf_executors/entrypoints/cli.py,sha256=ZGwDQ2V6hYMjaVVcNDrAyvagrAET8X1kXFfD2gSG4BI,3455
|
|
11
|
-
garf_executors/entrypoints/server.py,sha256=MEEPxcIfy_PeDuz8oJ7wIZVUcz0q54mW0y89x5I_VgM,2821
|
|
12
|
-
garf_executors/entrypoints/utils.py,sha256=p483h5RY_kfwOhNq2RqwMnunOoTGXGA59nCyHY_Lvgg,15057
|
|
13
|
-
garf_executors-0.0.8.dist-info/METADATA,sha256=Z8A7U3jBsL14uEpv6-mHpjKNSrF480_QpAvUVC9V4fI,2648
|
|
14
|
-
garf_executors-0.0.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
15
|
-
garf_executors-0.0.8.dist-info/entry_points.txt,sha256=LskWNFIw8j0WJuI18-32OZrlASXAMg1XtrRYwsKBz2E,61
|
|
16
|
-
garf_executors-0.0.8.dist-info/top_level.txt,sha256=sP4dCXOENPn1hDFAunjMV8Js4NND_KGeO_gQWuaT0EY,15
|
|
17
|
-
garf_executors-0.0.8.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|