openapi-spec-tools 0.20.0__tar.gz → 0.22.0__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.
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/PKG-INFO +7 -5
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/README.md +2 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/__init__.py +4 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/api_gen/api_generator.py +8 -5
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/api_gen/flat_generator.py +4 -1
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/api_gen/opaque_generator.py +4 -1
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/api_gen/property_generator.py +28 -54
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/base_gen/_logging.py +6 -4
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/base_gen/base_generator.py +45 -322
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/base_gen/constants.py +33 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/cli/api_gen.py +4 -7
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/cli/arguments.py +4 -2
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/cli/cli_gen.py +24 -27
- openapi_spec_tools-0.22.0/openapi_spec_tools/cli/constants.py +6 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/cli/content.py +2 -4
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/cli/layout.py +14 -16
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/cli/models.py +14 -15
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/cli/oas.py +10 -13
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/cli/operations.py +13 -15
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/cli/paths.py +9 -10
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/cli/tags.py +11 -11
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/cli/utils.py +11 -13
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/cli_gen/cli_generator.py +7 -4
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/constants.py +2 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/expand.py +27 -8
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/flatten.py +154 -23
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/layout/layout_generator.py +11 -6
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/types.py +2 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/utils.py +111 -3
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/pyproject.toml +5 -5
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/tests/cli_gen/test_cli_generator.py +12 -25
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/tests/cli_gen/test_files.py +1 -1
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/.gitignore +0 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/LICENSE +0 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/api_gen/__init__.py +0 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/api_gen/_environment.py +0 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/base_gen/__init__.py +0 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/base_gen/_requests.py +0 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/base_gen/config.py +0 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/base_gen/files.py +0 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/base_gen/utils.py +0 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/cli/__init__.py +0 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/cli/analyze.py +0 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/cli/history.py +0 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/cli_gen/__init__.py +0 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/cli_gen/_arguments.py +0 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/cli_gen/_display.py +0 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/cli_gen/_exceptions.py +0 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/cli_gen/_tree.py +0 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/cli_gen/files.py +0 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/layout/__init__.py +0 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/layout/config.py +0 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/layout/merge.py +0 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/layout/types.py +0 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/layout/utils.py +0 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/tests/cli_gen/__init__.py +0 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/tests/cli_gen/test_display.py +0 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/tests/cli_gen/test_exceptions.py +0 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/tests/cli_gen/test_main.py +0 -0
- {openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/tests/cli_gen/test_tree.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: openapi-spec-tools
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.22.0
|
|
4
4
|
Summary: OpenAPI specification tools for analyzing, updating, and generating a CLI.
|
|
5
5
|
Project-URL: Homepage, https://github.com/rickwporter/openapi-spec-tools
|
|
6
6
|
Project-URL: Repository, https://github.com/rickwporter/openapi-spec-tools
|
|
@@ -25,15 +25,17 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
|
25
25
|
Classifier: Topic :: Utilities
|
|
26
26
|
Classifier: Typing :: Typed
|
|
27
27
|
Requires-Python: <4,>=3.10
|
|
28
|
-
Requires-Dist: gitpython>=3.2.
|
|
29
|
-
Requires-Dist: pydantic<3,>=2.
|
|
28
|
+
Requires-Dist: gitpython>=3.2.1
|
|
29
|
+
Requires-Dist: pydantic<3,>=2.14.3
|
|
30
30
|
Requires-Dist: pyyaml>=6.0.3
|
|
31
31
|
Requires-Dist: requests>=2.34.2
|
|
32
|
-
Requires-Dist: rich-objects>=0.
|
|
32
|
+
Requires-Dist: rich-objects>=0.4.0
|
|
33
33
|
Requires-Dist: rich>=15.0.0
|
|
34
|
-
Requires-Dist: typer>=0.
|
|
34
|
+
Requires-Dist: typer>=0.29.1
|
|
35
35
|
Description-Content-Type: text/markdown
|
|
36
36
|
|
|
37
|
+
[](https://codecov.io/gh/rickwporter/openapi-spec-tools)
|
|
38
|
+
|
|
37
39
|
# openapi-spec-tools
|
|
38
40
|
|
|
39
41
|
This is a collection of tools for using OpenAPI specifications. The OpenAPI community has a plethora of tools, and this is intended to supplement those. The tools here provide functionality that has not been readily available elsewhere.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
[](https://codecov.io/gh/rickwporter/openapi-spec-tools)
|
|
2
|
+
|
|
1
3
|
# openapi-spec-tools
|
|
2
4
|
|
|
3
5
|
This is a collection of tools for using OpenAPI specifications. The OpenAPI community has a plethora of tools, and this is intended to supplement those. The tools here provide functionality that has not been readily available elsewhere.
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"""Implementation for several utilities for analyzing and modifying OpenAPI specifications."""
|
|
2
2
|
from openapi_spec_tools.expand import expand_schema
|
|
3
3
|
from openapi_spec_tools.expand import merge_schema
|
|
4
|
+
from openapi_spec_tools.flatten import apply_any_of
|
|
5
|
+
from openapi_spec_tools.flatten import apply_one_of
|
|
6
|
+
from openapi_spec_tools.flatten import flatten_collection
|
|
4
7
|
from openapi_spec_tools.flatten import flatten_schema
|
|
8
|
+
from openapi_spec_tools.flatten import is_simple_type
|
|
5
9
|
from openapi_spec_tools.utils import count_values
|
|
6
10
|
from openapi_spec_tools.utils import find_diffs
|
|
7
11
|
from openapi_spec_tools.utils import find_paths
|
{openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/api_gen/api_generator.py
RENAMED
|
@@ -18,10 +18,13 @@ from openapi_spec_tools.base_gen import simple_escape
|
|
|
18
18
|
from openapi_spec_tools.base_gen import to_snake_case
|
|
19
19
|
from openapi_spec_tools.layout import LayoutNode
|
|
20
20
|
from openapi_spec_tools.types import OasField
|
|
21
|
+
from openapi_spec_tools.utils import get_logger
|
|
21
22
|
|
|
22
23
|
DEFAULT_VAR_LOG_LEVEL = "API_LOG_LEVEL"
|
|
23
24
|
DEFAULT_VALUE_LOG_LEVEL = "info"
|
|
24
25
|
|
|
26
|
+
logger = get_logger(__name__)
|
|
27
|
+
|
|
25
28
|
|
|
26
29
|
class ApiGenerator(BaseGenerator, ABC):
|
|
27
30
|
"""Provides the majority of the CLI generation functions.
|
|
@@ -62,17 +65,17 @@ class ApiGenerator(BaseGenerator, ABC):
|
|
|
62
65
|
def property_help(self, prop: dict[str, Any]) -> str:
|
|
63
66
|
"""Get the short help string for the specified property."""
|
|
64
67
|
help = prop.get(OasField.SUMMARY) or prop.get(OasField.DESCRIPTION) or ""
|
|
65
|
-
short_ref = prop.get(OasField.X_REF)
|
|
68
|
+
short_ref = prop.get(OasField.X_ENUM) or prop.get(OasField.X_REF)
|
|
66
69
|
choices = prop.get(OasField.ENUM)
|
|
67
70
|
required = prop.get(OasField.REQUIRED)
|
|
68
71
|
|
|
69
72
|
if help:
|
|
70
73
|
if len(help) > self.max_help_length:
|
|
71
74
|
help = help.split(". ")[0].strip()[:self.max_help_length] + '...'
|
|
72
|
-
elif short_ref:
|
|
73
|
-
help = f"see {short_ref} for info"
|
|
74
75
|
elif choices:
|
|
75
76
|
help = f"choices: {', '.join([str(_) for _ in choices])}"
|
|
77
|
+
elif short_ref:
|
|
78
|
+
help = f"see {short_ref} for info"
|
|
76
79
|
|
|
77
80
|
if required and "require" not in help.lower():
|
|
78
81
|
if not help.endswith(" "):
|
|
@@ -153,7 +156,7 @@ from {self.package_name} import _requests as _r
|
|
|
153
156
|
py_type = self.get_parameter_pytype(prop)
|
|
154
157
|
if not py_type:
|
|
155
158
|
# log an error and use 'Any'
|
|
156
|
-
|
|
159
|
+
logger.error(f"Unable to determine Python type for {prop}")
|
|
157
160
|
py_type = 'Any'
|
|
158
161
|
|
|
159
162
|
if collection:
|
|
@@ -201,7 +204,7 @@ from {self.package_name} import _requests as _r
|
|
|
201
204
|
"""Create a module for the current node, and recursively generate sub-commands."""
|
|
202
205
|
if node.operations():
|
|
203
206
|
module_name = to_snake_case(node.identifier)
|
|
204
|
-
|
|
207
|
+
logger.info(f"Generating {module_name} module")
|
|
205
208
|
text = self.copyright
|
|
206
209
|
text += self.standard_imports()
|
|
207
210
|
for command in node.operations():
|
{openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/api_gen/flat_generator.py
RENAMED
|
@@ -9,6 +9,9 @@ from openapi_spec_tools.base_gen import SEP1
|
|
|
9
9
|
from openapi_spec_tools.base_gen import quoted
|
|
10
10
|
from openapi_spec_tools.layout import LayoutNode
|
|
11
11
|
from openapi_spec_tools.types import OasField
|
|
12
|
+
from openapi_spec_tools.utils import get_logger
|
|
13
|
+
|
|
14
|
+
logger = get_logger(__name__)
|
|
12
15
|
|
|
13
16
|
|
|
14
17
|
class FlatApiGenerator(ApiGenerator):
|
|
@@ -59,7 +62,7 @@ class FlatApiGenerator(ApiGenerator):
|
|
|
59
62
|
func_args.extend(self.command_infra_arguments(node))
|
|
60
63
|
args_str = SEP1 + SEP1.join(func_args) + NL
|
|
61
64
|
|
|
62
|
-
|
|
65
|
+
logger.debug(f"{func_name}({len(path_params)} path, {len(query_params)} query, {len(body_params)} body)")
|
|
63
66
|
|
|
64
67
|
user_header_init = ""
|
|
65
68
|
user_header_arg = ""
|
|
@@ -7,6 +7,9 @@ from openapi_spec_tools.base_gen import SEP1
|
|
|
7
7
|
from openapi_spec_tools.base_gen import quoted
|
|
8
8
|
from openapi_spec_tools.layout import LayoutNode
|
|
9
9
|
from openapi_spec_tools.types import OasField
|
|
10
|
+
from openapi_spec_tools.utils import get_logger
|
|
11
|
+
|
|
12
|
+
logger = get_logger(__name__)
|
|
10
13
|
|
|
11
14
|
|
|
12
15
|
class OpaqueApiGenerator(ApiGenerator):
|
|
@@ -77,7 +80,7 @@ class OpaqueApiGenerator(ApiGenerator):
|
|
|
77
80
|
func_args.extend(self.command_infra_arguments(node))
|
|
78
81
|
args_str = SEP1 + SEP1.join(func_args) + NL
|
|
79
82
|
|
|
80
|
-
|
|
83
|
+
logger.debug(f"{func_name}({len(path_params)} path, {len(query_params)} query")
|
|
81
84
|
|
|
82
85
|
user_header_init = ""
|
|
83
86
|
user_header_arg = ""
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
"""Declares the PropertyApiGenerator class."""
|
|
2
|
-
from copy import deepcopy
|
|
3
2
|
from typing import Any
|
|
4
3
|
|
|
5
4
|
from openapi_spec_tools.api_gen.api_generator import ApiGenerator
|
|
6
5
|
from openapi_spec_tools.base_gen import NL
|
|
7
6
|
from openapi_spec_tools.base_gen import SEP1
|
|
8
7
|
from openapi_spec_tools.base_gen import quoted
|
|
9
|
-
from openapi_spec_tools.
|
|
8
|
+
from openapi_spec_tools.expand import expand_schema
|
|
9
|
+
from openapi_spec_tools.flatten import apply_any_of
|
|
10
|
+
from openapi_spec_tools.flatten import apply_one_of
|
|
11
|
+
from openapi_spec_tools.flatten import flatten_collection
|
|
10
12
|
from openapi_spec_tools.layout import LayoutNode
|
|
11
13
|
from openapi_spec_tools.types import OasField
|
|
14
|
+
from openapi_spec_tools.utils import get_logger
|
|
15
|
+
|
|
16
|
+
logger = get_logger(__name__)
|
|
12
17
|
|
|
13
18
|
|
|
14
19
|
class PropertyApiGenerator(ApiGenerator):
|
|
@@ -24,57 +29,26 @@ class PropertyApiGenerator(ApiGenerator):
|
|
|
24
29
|
|
|
25
30
|
def model_properties(self, name: str, schema: dict[str, Any]) -> dict[str, Any]: # noqa: PLR0912
|
|
26
31
|
"""Get a list of settable model properties."""
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
any_of = model.pop(OasField.ANY_OF, None)
|
|
49
|
-
if any_of:
|
|
50
|
-
if len(any_of) != 1:
|
|
51
|
-
self.logger.info(f"Grabbing anyOf[0] item from {name}")
|
|
52
|
-
self.logger.debug(f"{name} anyOf selected: {shallow(any_of[0])}")
|
|
53
|
-
# just grab the first one... not sure this is the best choice, but need to do something
|
|
54
|
-
updated = self.update_one_of(name, deepcopy(any_of[0]))
|
|
55
|
-
updated = self.update_collection(updated)
|
|
56
|
-
updated = self.update_reference(updated)
|
|
57
|
-
model.update(self.update_enum(updated))
|
|
58
|
-
|
|
59
|
-
model = self.update_one_of(name, model)
|
|
60
|
-
model = self.update_collection(model)
|
|
61
|
-
model = self.update_reference(model)
|
|
62
|
-
required_props = model.get(OasField.REQUIRED, [])
|
|
63
|
-
|
|
64
|
-
# copy the individual properties
|
|
65
|
-
for prop_name, _prop_data in model.get(OasField.PROPS, {}).items():
|
|
66
|
-
if _prop_data.get(OasField.READ_ONLY, False):
|
|
67
|
-
continue
|
|
68
|
-
|
|
69
|
-
prop_data = deepcopy(_prop_data)
|
|
70
|
-
prop_data[OasField.REQUIRED.value] = prop_name in required_props
|
|
71
|
-
prop_data = self.update_one_of(prop_name, prop_data)
|
|
72
|
-
prop_data = self.update_collection(prop_data)
|
|
73
|
-
prop_data = self.update_reference(prop_data)
|
|
74
|
-
|
|
75
|
-
body_props[prop_name] = self.update_enum(prop_data)
|
|
76
|
-
|
|
77
|
-
return body_props
|
|
32
|
+
expanded = expand_schema(schema, self.components, name)
|
|
33
|
+
while apply_one_of(expanded) or apply_any_of(expanded):
|
|
34
|
+
pass
|
|
35
|
+
flatten_collection(expanded, force_single=False)
|
|
36
|
+
settable = {
|
|
37
|
+
name: data
|
|
38
|
+
for name, data in expanded.get(OasField.PROPS).items()
|
|
39
|
+
if not data.get(OasField.READ_ONLY, False)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
# update settable fields for easier digestion
|
|
43
|
+
required = expanded.get(OasField.REQUIRED) or []
|
|
44
|
+
for prop_name, prop_data in settable.items():
|
|
45
|
+
while apply_one_of(prop_data) or apply_any_of(prop_data):
|
|
46
|
+
pass
|
|
47
|
+
flatten_collection(prop_data, force_single=False)
|
|
48
|
+
self.update_enum(prop_data)
|
|
49
|
+
prop_data[OasField.REQUIRED.value] = bool(prop_name in required)
|
|
50
|
+
|
|
51
|
+
return settable
|
|
78
52
|
|
|
79
53
|
def op_body_formation(self, properties: dict[str, Any]) -> str:
|
|
80
54
|
"""Create body parameter and poulates it when there are body paramters."""
|
|
@@ -142,7 +116,7 @@ class PropertyApiGenerator(ApiGenerator):
|
|
|
142
116
|
func_args.extend(self.command_infra_arguments(node))
|
|
143
117
|
args_str = SEP1 + SEP1.join(func_args) + NL
|
|
144
118
|
|
|
145
|
-
|
|
119
|
+
logger.debug(f"{func_name}({len(path_params)} path, {len(query_params)} query")
|
|
146
120
|
|
|
147
121
|
user_header_init = ""
|
|
148
122
|
user_header_arg = ""
|
{openapi_spec_tools-0.20.0 → openapi_spec_tools-0.22.0}/openapi_spec_tools/base_gen/_logging.py
RENAMED
|
@@ -14,12 +14,14 @@ class LogLevel(str, Enum):
|
|
|
14
14
|
DEBUG = "debug"
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
def get_logger(
|
|
18
|
-
|
|
17
|
+
def get_logger() -> logging.Logger:
|
|
18
|
+
"""Get the logger for LOG_CLASS."""
|
|
19
|
+
return logging.getLogger(name=LOG_CLASS)
|
|
19
20
|
|
|
20
21
|
|
|
21
|
-
def init_logging(level: LogLevel
|
|
22
|
+
def init_logging(level: LogLevel) -> logging.Logger:
|
|
23
|
+
"""Initialize the LOG_CLASS logger and sets the level."""
|
|
22
24
|
logging.basicConfig(format=LOG_FORMAT, datefmt=LOG_DATE_FMT)
|
|
23
|
-
logger = get_logger(
|
|
25
|
+
logger = get_logger()
|
|
24
26
|
logger.setLevel(level.upper())
|
|
25
27
|
return logger
|