pyvikunja 0.14__py3-none-any.whl → 0.16__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.
pyvikunja/api.py CHANGED
@@ -24,11 +24,12 @@ class APIError(Exception):
24
24
 
25
25
 
26
26
  class VikunjaAPI:
27
- def __init__(self, base_url: str, token: str):
27
+ def __init__(self, base_url: str, token: str, strict_ssl: bool = True):
28
28
  self.host = self._normalize_host(base_url)
29
29
  self.api_base_url = self._normalize_api_base_url(self.host)
30
30
  self.headers = {"Authorization": f"Bearer {token}"}
31
- self.client = httpx.AsyncClient()
31
+ self.strict_ssl = strict_ssl
32
+ self.client = httpx.AsyncClient(verify=strict_ssl)
32
33
 
33
34
  @property
34
35
  def web_ui_link(self):
@@ -12,7 +12,13 @@ class BaseModel:
12
12
  def _parse_datetime(date_str: Optional[str]) -> Optional[datetime]:
13
13
  if date_str:
14
14
  try:
15
- return datetime.fromisoformat(date_str.rstrip('Z'))
16
- except ValueError:
15
+ date = datetime.fromisoformat(date_str.rstrip('Z'))
16
+ epoch_seconds = int(date.timestamp())
17
+
18
+ if epoch_seconds == 0:
19
+ return None
20
+ else:
21
+ return date
22
+ except ValueError as e:
17
23
  return None
18
24
  return None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pyvikunja
3
- Version: 0.14
3
+ Version: 0.16
4
4
  Summary: A Python wrapper for Vikunja API
5
5
  Author: Joseph Shufflebotham
6
6
  License: AGPL
@@ -1,15 +1,15 @@
1
1
  pyvikunja/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- pyvikunja/api.py,sha256=mHPn0XPFrYNCG3ChIUnluAOP08z3YyUL_3nors9RuYU,6920
2
+ pyvikunja/api.py,sha256=P5yQBHmnWaM2OORwkk0Q-1K2eLIqFzwdtnjiEK8BD6o,6999
3
3
  pyvikunja/models/label.py,sha256=cOOuVYDVDMmK96Ev22EDgWwXljkAonQNL4XsTMay4K4,467
4
- pyvikunja/models/models.py,sha256=RCPsYQtcgE-W5ZmhwGDejAI76nHZ9-1X-x5GeTG4RnI,637
4
+ pyvikunja/models/models.py,sha256=VmnBKs_DhcF1CNE3b2MhH4harwZo1697cMhTXetLGWk,822
5
5
  pyvikunja/models/project.py,sha256=viVIe3lVgbh7k05ADDds1cwzvC1vf4tT2vSNjbB7KMk,1179
6
6
  pyvikunja/models/task.py,sha256=8KUoN0SuTRkJq_cHdsuIeQHUiNgOiWCLcWFVN9NJH5c,7806
7
7
  pyvikunja/models/team.py,sha256=0Z3828Cm3nNuNr1z2on63fLYAVW325_SQKi5RmqXf-I,559
8
8
  pyvikunja/models/user.py,sha256=36duFNyGXKzlwqO0d6FA-C1KTCci2sIMU1IBIF-N_LM,310
9
9
  pyvikunja/models/enum/repeat_mode.py,sha256=xkDPfYeRz342ovqro1UVBAoegpPgpZQYTnyo2sf6R7I,112
10
10
  pyvikunja/models/enum/task_priority.py,sha256=aVz1HEofIqwUkXG0vYm58n_vLNbgqtbvHuQ5K-YQqA0,119
11
- pyvikunja-0.14.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
12
- pyvikunja-0.14.dist-info/METADATA,sha256=AZg0N7kHaa4qrcISVA7hq6Bm2y2p7VwIfhfgFHZi8oM,188
13
- pyvikunja-0.14.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
14
- pyvikunja-0.14.dist-info/top_level.txt,sha256=WVV9zgxUBuWOkUY1t_U7zI0paWWTVelKYB4vjsiKsks,10
15
- pyvikunja-0.14.dist-info/RECORD,,
11
+ pyvikunja-0.16.dist-info/LICENSE,sha256=hIahDEOTzuHCU5J2nd07LWwkLW7Hko4UFO__ffsvB-8,34523
12
+ pyvikunja-0.16.dist-info/METADATA,sha256=3euyTCR3vuG3-bv1QDux2x68eGDiZKyYkb90I1HeNnI,188
13
+ pyvikunja-0.16.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
14
+ pyvikunja-0.16.dist-info/top_level.txt,sha256=WVV9zgxUBuWOkUY1t_U7zI0paWWTVelKYB4vjsiKsks,10
15
+ pyvikunja-0.16.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.0)
2
+ Generator: setuptools (76.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5