Habiticalib 0.1.0a0__py3-none-any.whl → 0.1.0a1__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.
habiticalib/__init__.py CHANGED
@@ -3,7 +3,7 @@
3
3
  from .exceptions import HabiticaException, NotAuthorizedError, NotFoundError
4
4
  from .lib import Habitica
5
5
 
6
- __version__ = "0.1.0a0"
6
+ __version__ = "0.1.0a1"
7
7
  __all__ = [
8
8
  "Habitica",
9
9
  "HabiticaException",
habiticalib/lib.py CHANGED
@@ -50,10 +50,7 @@ class Habitica:
50
50
  """Modern asynchronous Python client library for the Habitica API."""
51
51
 
52
52
  _close_session: bool = False
53
- _headers: dict[str, str]
54
- _assets_cache: dict[str, IO[bytes]]
55
53
  _cache_size = 32
56
- _cache_order: list[str]
57
54
 
58
55
  def __init__(
59
56
  self,
@@ -66,7 +63,8 @@ class Habitica:
66
63
  """Initialize the Habitica API client."""
67
64
  client_headers = {"X-CLIENT": get_x_client(x_client)}
68
65
  user_agent = {"User-Agent": get_user_agent()}
69
- self._headers = {}
66
+ self._headers: dict[str, str] = {}
67
+
70
68
  if session:
71
69
  self._session = session
72
70
  if "User-Agent" not in session.headers:
@@ -91,6 +89,9 @@ class Habitica:
91
89
 
92
90
  self.url = URL(url if url else DEFAULT_URL) / "api"
93
91
 
92
+ self._assets_cache: dict[str, IO[bytes]] = {}
93
+ self._cache_order: list[str] = []
94
+
94
95
  async def _request(self, method: str, url: URL, **kwargs) -> str:
95
96
  """Handle API request."""
96
97
  async with self._session.request(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: Habiticalib
3
- Version: 0.1.0a0
3
+ Version: 0.1.0a1
4
4
  Summary: Asynchronous Python client library for the Habitica API
5
5
  Project-URL: Documentation, https://tr4nt0r.github.io/habiticalib/
6
6
  Project-URL: Source, https://github.com/tr4nt0r/habiticalib
@@ -1,11 +1,11 @@
1
- habiticalib/__init__.py,sha256=veWNJO9Y1tearAF3GXOM3PZgGxqE1Ku3vpMcuFpQWIk,301
1
+ habiticalib/__init__.py,sha256=k4L3Ik4KZ7U_mtIseyqGHG0TdBE7iwxgQfazr2zli5U,301
2
2
  habiticalib/const.py,sha256=HeIl1dPAeAxt1V-9PkPCt60ThAJJWkUKpCzMEEAR-ik,584
3
3
  habiticalib/exceptions.py,sha256=V7QAPQM4HbGxq7-BYDSdG9Zi2u9F2w3tX8XwualJbWM,601
4
4
  habiticalib/helpers.py,sha256=1PEq8tjOgotMnGRUcRcFcLCEa7jFWUORD9ZPHEVH2sU,3527
5
- habiticalib/lib.py,sha256=FlQUFX1jvbznJLcd1M7xQ7YxAXuU2GAl3R4KMZwefJM,53749
5
+ habiticalib/lib.py,sha256=S0wLsSCSSoEtq-nlx9Wy7TsqI20iLBYUZhrDOkq6Z3o,53766
6
6
  habiticalib/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  habiticalib/types.py,sha256=r_5pCRdfZRv7whryAgVOUnqv4qUGfokgq9GqdkdK_y8,32549
8
- habiticalib-0.1.0a0.dist-info/METADATA,sha256=7rJ5r71bY1A5mz50twmXizvs9pX5xpCvivJWqaoXIUs,2471
9
- habiticalib-0.1.0a0.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
10
- habiticalib-0.1.0a0.dist-info/licenses/LICENSE,sha256=oIinIOSJ49l1iVIRI3XGXFWt6SF7a83kEFBAY8ORwNI,1084
11
- habiticalib-0.1.0a0.dist-info/RECORD,,
8
+ habiticalib-0.1.0a1.dist-info/METADATA,sha256=t7hoV7_9JMYFVUqZgjLN9qh3RFuz7CFaPPL24zB0TlY,2471
9
+ habiticalib-0.1.0a1.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
10
+ habiticalib-0.1.0a1.dist-info/licenses/LICENSE,sha256=oIinIOSJ49l1iVIRI3XGXFWt6SF7a83kEFBAY8ORwNI,1084
11
+ habiticalib-0.1.0a1.dist-info/RECORD,,