airbyte-cdk 6.42.0__py3-none-any.whl → 6.42.1__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.
@@ -156,7 +156,7 @@ def duration(datestring: str) -> Union[datetime.timedelta, isodate.Duration]:
156
156
 
157
157
 
158
158
  def format_datetime(
159
- dt: Union[str, datetime.datetime], format: str, input_format: Optional[str] = None
159
+ dt: Union[str, datetime.datetime, int], format: str, input_format: Optional[str] = None
160
160
  ) -> str:
161
161
  """
162
162
  Converts datetime to another format
@@ -170,9 +170,13 @@ def format_datetime(
170
170
  """
171
171
  if isinstance(dt, datetime.datetime):
172
172
  return dt.strftime(format)
173
- dt_datetime = (
174
- datetime.datetime.strptime(dt, input_format) if input_format else str_to_datetime(dt)
175
- )
173
+
174
+ if isinstance(dt, int):
175
+ dt_datetime = DatetimeParser().parse(dt, input_format if input_format else "%s")
176
+ else:
177
+ dt_datetime = (
178
+ datetime.datetime.strptime(dt, input_format) if input_format else str_to_datetime(dt)
179
+ )
176
180
  return DatetimeParser().format(dt=dt_datetime, format=format)
177
181
 
178
182
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: airbyte-cdk
3
- Version: 6.42.0
3
+ Version: 6.42.1
4
4
  Summary: A framework for writing Airbyte Connectors.
5
5
  Home-page: https://airbyte.com
6
6
  License: MIT
@@ -108,7 +108,7 @@ airbyte_cdk/sources/declarative/interpolation/interpolated_nested_mapping.py,sha
108
108
  airbyte_cdk/sources/declarative/interpolation/interpolated_string.py,sha256=CQkHqGlfa87G6VYMtBAQWin7ECKpfMdrDcg0JO5_rhc,3212
109
109
  airbyte_cdk/sources/declarative/interpolation/interpolation.py,sha256=9IoeuWam3L6GyN10L6U8xNWXmkt9cnahSDNkez1OmFY,982
110
110
  airbyte_cdk/sources/declarative/interpolation/jinja.py,sha256=UQeuS4Vpyp4hlOn-R3tRyeBX0e9IoV6jQ6gH-Jz8lY0,7182
111
- airbyte_cdk/sources/declarative/interpolation/macros.py,sha256=HQKHKnjE17zKoPn27ZpTpugRZZQSaof4GVzUUZaV2eE,5081
111
+ airbyte_cdk/sources/declarative/interpolation/macros.py,sha256=CF2L_r73TCd1Wssq9_tjFPb4c872QM8oW6NL-DIR0h4,5226
112
112
  airbyte_cdk/sources/declarative/manifest_declarative_source.py,sha256=kFfyVpX-babuF4YzUHm7xfx_3M4M-GwJsrOWuez1z9Q,18894
113
113
  airbyte_cdk/sources/declarative/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
114
114
  airbyte_cdk/sources/declarative/migrations/legacy_to_per_partition_state_migration.py,sha256=iemy3fKLczcU0-Aor7tx5jcT6DRedKMqyK7kCOp01hg,3924
@@ -359,9 +359,9 @@ airbyte_cdk/utils/slice_hasher.py,sha256=EDxgROHDbfG-QKQb59m7h_7crN1tRiawdf5uU7G
359
359
  airbyte_cdk/utils/spec_schema_transformations.py,sha256=-5HTuNsnDBAhj-oLeQXwpTGA0HdcjFOf2zTEMUTTg_Y,816
360
360
  airbyte_cdk/utils/stream_status_utils.py,sha256=ZmBoiy5HVbUEHAMrUONxZvxnvfV9CesmQJLDTAIWnWw,1171
361
361
  airbyte_cdk/utils/traced_exception.py,sha256=C8uIBuCL_E4WnBAOPSxBicD06JAldoN9fGsQDp463OY,6292
362
- airbyte_cdk-6.42.0.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
363
- airbyte_cdk-6.42.0.dist-info/LICENSE_SHORT,sha256=aqF6D1NcESmpn-cqsxBtszTEnHKnlsp8L4x9wAh3Nxg,55
364
- airbyte_cdk-6.42.0.dist-info/METADATA,sha256=Do1C-KGBA_TXQYaWqFyP6SqinuRcCeV-PVUd5pGdHvc,6071
365
- airbyte_cdk-6.42.0.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
366
- airbyte_cdk-6.42.0.dist-info/entry_points.txt,sha256=fj-e3PAQvsxsQzyyq8UkG1k8spunWnD4BAH2AwlR6NM,95
367
- airbyte_cdk-6.42.0.dist-info/RECORD,,
362
+ airbyte_cdk-6.42.1.dist-info/LICENSE.txt,sha256=Wfe61S4BaGPj404v8lrAbvhjYR68SHlkzeYrg3_bbuM,1051
363
+ airbyte_cdk-6.42.1.dist-info/LICENSE_SHORT,sha256=aqF6D1NcESmpn-cqsxBtszTEnHKnlsp8L4x9wAh3Nxg,55
364
+ airbyte_cdk-6.42.1.dist-info/METADATA,sha256=wDeKaMycroE4O-uTZu5pHISYOgTbZmfk8ulUZukjTGA,6071
365
+ airbyte_cdk-6.42.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
366
+ airbyte_cdk-6.42.1.dist-info/entry_points.txt,sha256=fj-e3PAQvsxsQzyyq8UkG1k8spunWnD4BAH2AwlR6NM,95
367
+ airbyte_cdk-6.42.1.dist-info/RECORD,,