garf-executors 0.0.11__tar.gz → 0.0.13__tar.gz
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.
- {garf_executors-0.0.11 → garf_executors-0.0.13}/PKG-INFO +4 -3
- {garf_executors-0.0.11 → garf_executors-0.0.13}/garf_executors/__init__.py +2 -2
- {garf_executors-0.0.11 → garf_executors-0.0.13}/garf_executors/entrypoints/cli.py +4 -1
- {garf_executors-0.0.11 → garf_executors-0.0.13}/garf_executors/entrypoints/utils.py +19 -0
- {garf_executors-0.0.11 → garf_executors-0.0.13}/garf_executors.egg-info/PKG-INFO +4 -3
- {garf_executors-0.0.11 → garf_executors-0.0.13}/garf_executors.egg-info/requires.txt +1 -0
- {garf_executors-0.0.11 → garf_executors-0.0.13}/pyproject.toml +3 -2
- {garf_executors-0.0.11 → garf_executors-0.0.13}/README.md +0 -0
- {garf_executors-0.0.11 → garf_executors-0.0.13}/garf_executors/api_executor.py +0 -0
- {garf_executors-0.0.11 → garf_executors-0.0.13}/garf_executors/bq_executor.py +0 -0
- {garf_executors-0.0.11 → garf_executors-0.0.13}/garf_executors/config.py +0 -0
- {garf_executors-0.0.11 → garf_executors-0.0.13}/garf_executors/entrypoints/__init__.py +0 -0
- {garf_executors-0.0.11 → garf_executors-0.0.13}/garf_executors/entrypoints/server.py +0 -0
- {garf_executors-0.0.11 → garf_executors-0.0.13}/garf_executors/exceptions.py +0 -0
- {garf_executors-0.0.11 → garf_executors-0.0.13}/garf_executors/execution_context.py +0 -0
- {garf_executors-0.0.11 → garf_executors-0.0.13}/garf_executors/executor.py +0 -0
- {garf_executors-0.0.11 → garf_executors-0.0.13}/garf_executors/fetchers.py +0 -0
- {garf_executors-0.0.11 → garf_executors-0.0.13}/garf_executors/sql_executor.py +0 -0
- {garf_executors-0.0.11 → garf_executors-0.0.13}/garf_executors.egg-info/SOURCES.txt +0 -0
- {garf_executors-0.0.11 → garf_executors-0.0.13}/garf_executors.egg-info/dependency_links.txt +0 -0
- {garf_executors-0.0.11 → garf_executors-0.0.13}/garf_executors.egg-info/entry_points.txt +0 -0
- {garf_executors-0.0.11 → garf_executors-0.0.13}/garf_executors.egg-info/top_level.txt +0 -0
- {garf_executors-0.0.11 → garf_executors-0.0.13}/setup.cfg +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: garf-executors
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.13
|
|
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
|
|
7
7
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
8
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
9
8
|
Classifier: Programming Language :: Python :: 3.9
|
|
10
9
|
Classifier: Programming Language :: Python :: 3.10
|
|
11
10
|
Classifier: Programming Language :: Python :: 3.11
|
|
12
11
|
Classifier: Programming Language :: Python :: 3.12
|
|
13
12
|
Classifier: Programming Language :: Python :: 3.13
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
14
14
|
Classifier: Intended Audience :: Developers
|
|
15
15
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
16
16
|
Classifier: Operating System :: OS Independent
|
|
17
17
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
18
|
-
Requires-Python: >=3.
|
|
18
|
+
Requires-Python: >=3.9
|
|
19
19
|
Description-Content-Type: text/markdown
|
|
20
20
|
Requires-Dist: garf-core
|
|
21
21
|
Requires-Dist: garf-io
|
|
@@ -24,6 +24,7 @@ Requires-Dist: pydantic
|
|
|
24
24
|
Provides-Extra: bq
|
|
25
25
|
Requires-Dist: garf-io[bq]; extra == "bq"
|
|
26
26
|
Requires-Dist: pandas; extra == "bq"
|
|
27
|
+
Requires-Dist: google-cloud-logging; extra == "bq"
|
|
27
28
|
Provides-Extra: sql
|
|
28
29
|
Requires-Dist: garf-io[sqlalchemy]; extra == "sql"
|
|
29
30
|
Requires-Dist: pandas; extra == "sql"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
# See the License for the specific language governing permissions and
|
|
13
13
|
# limitations under the License.
|
|
14
|
-
"""Executors to fetch data from various
|
|
14
|
+
"""Executors to fetch data from various APIs."""
|
|
15
15
|
|
|
16
16
|
from __future__ import annotations
|
|
17
17
|
|
|
@@ -48,4 +48,4 @@ __all__ = [
|
|
|
48
48
|
'ApiExecutionContext',
|
|
49
49
|
]
|
|
50
50
|
|
|
51
|
-
__version__ = '0.0.
|
|
51
|
+
__version__ = '0.0.13'
|
|
@@ -20,6 +20,7 @@ storage.
|
|
|
20
20
|
from __future__ import annotations
|
|
21
21
|
|
|
22
22
|
import argparse
|
|
23
|
+
import logging
|
|
23
24
|
import sys
|
|
24
25
|
|
|
25
26
|
from garf_io import reader
|
|
@@ -38,6 +39,7 @@ def main():
|
|
|
38
39
|
parser.add_argument('--input', dest='input', default='file')
|
|
39
40
|
parser.add_argument('--log', '--loglevel', dest='loglevel', default='info')
|
|
40
41
|
parser.add_argument('--logger', dest='logger', default='local')
|
|
42
|
+
parser.add_argument('--log-name', dest='log_name', default='garf')
|
|
41
43
|
parser.add_argument(
|
|
42
44
|
'--parallel-queries', dest='parallel_queries', action='store_true'
|
|
43
45
|
)
|
|
@@ -57,7 +59,7 @@ def main():
|
|
|
57
59
|
print(garf_executors.__version__)
|
|
58
60
|
sys.exit()
|
|
59
61
|
logger = utils.init_logging(
|
|
60
|
-
loglevel=args.loglevel.upper(), logger_type=args.logger
|
|
62
|
+
loglevel=args.loglevel.upper(), logger_type=args.logger, name=args.log_name
|
|
61
63
|
)
|
|
62
64
|
if not args.query:
|
|
63
65
|
logger.error('Please provide one or more queries to run')
|
|
@@ -102,6 +104,7 @@ def main():
|
|
|
102
104
|
logger.info('Running queries sequentially')
|
|
103
105
|
for query in args.query:
|
|
104
106
|
query_executor.execute(reader_client.read(query), query, context)
|
|
107
|
+
logging.shutdown()
|
|
105
108
|
|
|
106
109
|
|
|
107
110
|
if __name__ == '__main__':
|
|
@@ -93,6 +93,7 @@ class GarfParamsException(Exception):
|
|
|
93
93
|
class LoggerEnum(str, enum.Enum):
|
|
94
94
|
local = 'local'
|
|
95
95
|
rich = 'rich'
|
|
96
|
+
gcloud = 'gcloud'
|
|
96
97
|
|
|
97
98
|
|
|
98
99
|
def init_logging(
|
|
@@ -100,6 +101,7 @@ def init_logging(
|
|
|
100
101
|
logger_type: str | LoggerEnum = 'local',
|
|
101
102
|
name: str = __name__,
|
|
102
103
|
) -> logging.Logger:
|
|
104
|
+
loglevel = getattr(logging, loglevel)
|
|
103
105
|
if logger_type == 'rich':
|
|
104
106
|
logging.basicConfig(
|
|
105
107
|
format='%(message)s',
|
|
@@ -109,6 +111,23 @@ def init_logging(
|
|
|
109
111
|
rich_logging.RichHandler(rich_tracebacks=True),
|
|
110
112
|
],
|
|
111
113
|
)
|
|
114
|
+
elif logger_type == 'gcloud':
|
|
115
|
+
try:
|
|
116
|
+
import google.cloud.logging as glogging
|
|
117
|
+
except ImportError as e:
|
|
118
|
+
raise ImportError(
|
|
119
|
+
'Please install garf-executors with Cloud logging support - '
|
|
120
|
+
'`pip install garf-executors[bq]`'
|
|
121
|
+
) from e
|
|
122
|
+
|
|
123
|
+
client = glogging.Client()
|
|
124
|
+
handler = glogging.handlers.CloudLoggingHandler(client, name=name)
|
|
125
|
+
handler.close()
|
|
126
|
+
glogging.handlers.setup_logging(handler, log_level=loglevel)
|
|
127
|
+
logging.basicConfig(
|
|
128
|
+
level=loglevel,
|
|
129
|
+
handlers=[handler],
|
|
130
|
+
)
|
|
112
131
|
else:
|
|
113
132
|
logging.basicConfig(
|
|
114
133
|
format='[%(asctime)s][%(name)s][%(levelname)s] %(message)s',
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: garf-executors
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.13
|
|
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
|
|
7
7
|
Classifier: Programming Language :: Python :: 3 :: Only
|
|
8
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
9
8
|
Classifier: Programming Language :: Python :: 3.9
|
|
10
9
|
Classifier: Programming Language :: Python :: 3.10
|
|
11
10
|
Classifier: Programming Language :: Python :: 3.11
|
|
12
11
|
Classifier: Programming Language :: Python :: 3.12
|
|
13
12
|
Classifier: Programming Language :: Python :: 3.13
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
14
14
|
Classifier: Intended Audience :: Developers
|
|
15
15
|
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
16
16
|
Classifier: Operating System :: OS Independent
|
|
17
17
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
18
|
-
Requires-Python: >=3.
|
|
18
|
+
Requires-Python: >=3.9
|
|
19
19
|
Description-Content-Type: text/markdown
|
|
20
20
|
Requires-Dist: garf-core
|
|
21
21
|
Requires-Dist: garf-io
|
|
@@ -24,6 +24,7 @@ Requires-Dist: pydantic
|
|
|
24
24
|
Provides-Extra: bq
|
|
25
25
|
Requires-Dist: garf-io[bq]; extra == "bq"
|
|
26
26
|
Requires-Dist: pandas; extra == "bq"
|
|
27
|
+
Requires-Dist: google-cloud-logging; extra == "bq"
|
|
27
28
|
Provides-Extra: sql
|
|
28
29
|
Requires-Dist: garf-io[sqlalchemy]; extra == "sql"
|
|
29
30
|
Requires-Dist: pandas; extra == "sql"
|
|
@@ -14,18 +14,18 @@ authors = [
|
|
|
14
14
|
{name = "Google Inc. (gTech gPS CSE team)", email = "no-reply@google.com"},
|
|
15
15
|
{name = "Andrei Markin", email = "andrey.markin.ppc@gmail.com"},
|
|
16
16
|
]
|
|
17
|
-
requires-python = ">=3.
|
|
17
|
+
requires-python = ">=3.9"
|
|
18
18
|
description = "Executes queries against API and writes data to local/remote storage."
|
|
19
19
|
readme = "README.md"
|
|
20
20
|
license = {text = "Apache 2.0"}
|
|
21
21
|
classifiers = [
|
|
22
22
|
"Programming Language :: Python :: 3 :: Only",
|
|
23
|
-
"Programming Language :: Python :: 3.8",
|
|
24
23
|
"Programming Language :: Python :: 3.9",
|
|
25
24
|
"Programming Language :: Python :: 3.10",
|
|
26
25
|
"Programming Language :: Python :: 3.11",
|
|
27
26
|
"Programming Language :: Python :: 3.12",
|
|
28
27
|
"Programming Language :: Python :: 3.13",
|
|
28
|
+
"Programming Language :: Python :: 3.14",
|
|
29
29
|
"Intended Audience :: Developers",
|
|
30
30
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
31
31
|
"Operating System :: OS Independent",
|
|
@@ -40,6 +40,7 @@ version = {attr = "garf_executors.__version__"}
|
|
|
40
40
|
bq=[
|
|
41
41
|
"garf-io[bq]",
|
|
42
42
|
"pandas",
|
|
43
|
+
"google-cloud-logging",
|
|
43
44
|
]
|
|
44
45
|
sql=[
|
|
45
46
|
"garf-io[sqlalchemy]",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{garf_executors-0.0.11 → garf_executors-0.0.13}/garf_executors.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|