pyvikunja 0.15__tar.gz → 0.17__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.2
2
2
  Name: pyvikunja
3
- Version: 0.15
3
+ Version: 0.17
4
4
  Summary: A Python wrapper for Vikunja API
5
5
  Author: Joseph Shufflebotham
6
6
  License: AGPL
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pyvikunja"
7
- version = "0.15"
7
+ version = "0.17"
8
8
  description = "A Python wrapper for Vikunja API"
9
9
  authors = [
10
10
  {name = "Joseph Shufflebotham"}
@@ -1,4 +1,5 @@
1
1
  import logging
2
+ from functools import cached_property
2
3
  from typing import List, Dict, Any, Optional
3
4
  from urllib.parse import urlparse, urlunparse
4
5
 
@@ -24,11 +25,16 @@ class APIError(Exception):
24
25
 
25
26
 
26
27
  class VikunjaAPI:
27
- def __init__(self, base_url: str, token: str):
28
+ def __init__(self, base_url: str, token: str, strict_ssl: bool = True):
28
29
  self.host = self._normalize_host(base_url)
29
30
  self.api_base_url = self._normalize_api_base_url(self.host)
30
31
  self.headers = {"Authorization": f"Bearer {token}"}
31
- self.client = httpx.AsyncClient()
32
+ self.strict_ssl = strict_ssl
33
+
34
+ @cached_property
35
+ def client(self) -> httpx.AsyncClient:
36
+ """Lazily instantiate the HTTP client when first accessed."""
37
+ return httpx.AsyncClient(verify=self.strict_ssl)
32
38
 
33
39
  @property
34
40
  def web_ui_link(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pyvikunja
3
- Version: 0.15
3
+ Version: 0.17
4
4
  Summary: A Python wrapper for Vikunja API
5
5
  Author: Joseph Shufflebotham
6
6
  License: AGPL
File without changes
File without changes
File without changes
File without changes