Skip to content

Commit

Permalink
fix: [NO-JIRA] - Provide time parser fn
Browse files Browse the repository at this point in the history
  • Loading branch information
albert.franzi committed Sep 13, 2023
1 parent 06cd7fd commit 49b6ba0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions airflow_aws_shared_secrets/time_parser.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import pendulum
from pendulum import Date, DateTime, Duration, Time


def parse_timestamp(line: str) -> Date | Time | DateTime | Duration:
timestamp_str, _ = line.split(" ", 1)
print(f"Parsing time: {timestamp_str}")
return pendulum.parse(timestamp_str.strip("[]"))
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "airflow_aws_shared_secrets"
version = "0.0.3"
version = "0.0.4"
description = "Airflow AWS Shared Secrets Manager"
authors = ["Albert Franzi"]
readme = "README.md"
Expand Down

0 comments on commit 49b6ba0

Please sign in to comment.