garf-core 0.1.2__tar.gz → 0.1.3__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: garf-core
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: Abstracts fetching data from API based on provided SQL-like query.
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
@@ -12,4 +12,4 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
- __version__ = '0.1.2'
15
+ __version__ = '0.1.3'
@@ -83,6 +83,8 @@ class DictParser(BaseParser):
83
83
 
84
84
  def get_nested_field(self, dictionary: dict[str, Any], key: str):
85
85
  """Returns nested fields from a dictionary."""
86
+ if result := dictionary.get(key):
87
+ return result
86
88
  key = key.split('.')
87
89
  try:
88
90
  return functools.reduce(operator.getitem, key, dictionary)
@@ -102,6 +104,9 @@ class NumericConverterDictParser(DictParser):
102
104
  return type_(value)
103
105
  return value
104
106
 
107
+ if result := dictionary.get(key):
108
+ return convert_field(result)
109
+
105
110
  key = key.split('.')
106
111
  try:
107
112
  field = functools.reduce(operator.getitem, key, dictionary)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: garf-core
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: Abstracts fetching data from API based on provided SQL-like query.
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
File without changes
File without changes
File without changes
File without changes