Habiticalib 0.4.0rc4__py3-none-any.whl → 0.4.2__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/const.py CHANGED
@@ -1,6 +1,6 @@
1
1
  """Constants for Habiticalib."""
2
2
 
3
- __version__ = "0.4.0rc4"
3
+ __version__ = "0.4.2"
4
4
 
5
5
  DEFAULT_URL = "https://habitica.com/"
6
6
  ASSETS_URL = "https://habitica-assets.s3.amazonaws.com/mobileApp/images/"
habiticalib/typedefs.py CHANGED
@@ -456,7 +456,7 @@ class FlagsUser(BaseModel):
456
456
  class EntryHistory(BaseModel):
457
457
  """History entry data."""
458
458
 
459
- date: datetime = field(
459
+ date: datetime | None = field(
460
460
  metadata=field_options(
461
461
  deserialize=serialize_datetime,
462
462
  )
@@ -573,6 +573,7 @@ class PartyUser(BaseModel):
573
573
  order: str | None = None
574
574
  orderAscending: str | None = None
575
575
  _id: UUID | None = None
576
+ id: UUID | None = field(default=None, metadata=field_options(alias="_id"))
576
577
 
577
578
 
578
579
  @dataclass(kw_only=True)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Habiticalib
3
- Version: 0.4.0rc4
3
+ Version: 0.4.2
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
@@ -19,34 +19,47 @@ Description-Content-Type: text/markdown
19
19
 
20
20
  # Habiticalib
21
21
 
22
- <p align="center">
23
- <em>Modern asynchronous Python client library for the Habitica API</em>
24
- </p>
22
+ Modern asynchronous Python client library for the Habitica API
25
23
 
26
24
  [![build](https://github.com/tr4nt0r/habiticalib/workflows/Build/badge.svg)](https://github.com/tr4nt0r/habiticalib/actions)
27
25
  [![codecov](https://codecov.io/gh/tr4nt0r/habiticalib/graph/badge.svg?token=iEsZ1Ktj7d)](https://codecov.io/gh/tr4nt0r/habiticalib)
28
26
  [![PyPI version](https://badge.fury.io/py/habiticalib.svg)](https://badge.fury.io/py/habiticalib)
27
+ ![PyPI - Downloads](https://img.shields.io/pypi/dm/habiticalib?style=flat&label=pypi%20downloads)
28
+ [!["Buy Me A Coffee"](https://img.shields.io/badge/-buy_me_a%C2%A0coffee-gray?logo=buy-me-a-coffee)](https://www.buymeacoffee.com/tr4nt0r)
29
+ [![GitHub Sponsor](https://img.shields.io/badge/GitHub-Sponsor-blue?logo=github)](https://github.com/sponsors/tr4nt0r)
30
+
31
+ ---
29
32
 
30
33
  **Habiticalib** is a Python library for interacting with the [Habitica API](https://habitica.com). It provides an organized, typed interface to work with Habitica’s features, including tasks, user data, and avatars. The goal of this library is to simplify integration with Habitica.
31
34
 
32
35
  ## Key features
33
36
 
34
- - **Asynchronous**: The library is fully asynchronous, allowing non-blocking API calls.
35
- - **Fully typed with Dataclasses**: The library is fully typed using Python `dataclasses`. It handles serialization with `mashumaro` and `orjson` for efficient conversion between Habitica API JSON data and Python objects.
36
- - **Dynamic avatar image generation**: Habiticalib can fetch all necessary assets (like equipped items, pets, and mounts) and combine them into a single avatar image. This image can be saved to disk or returned as a byte buffer for further processing.
37
- **Fetch user data**: Retrieve and manage user data such as stats, preferences, and items. User data is structured with dataclasses to make it easy to work with.
38
- - **Task management**: Support for creating, updating, and retrieving Habitica tasks (to-dos, dailies, habits, rewards) is provided.
39
- - **Task status updates**: The library allows updates for task statuses, habit scoring, and daily completion.
40
- - **Tags**: Habiticalib supports the creation, updating and deletion of tags.
41
- - **Stat allocation, class cystem and sleep**: The library offers methods for stat point allocation and switching between Habitica classes. It also provides the ability to disable the class system and pausing damage(resting in the inn)
37
+ * **Asynchronous**: The library is fully asynchronous, allowing non-blocking API calls.
38
+ * **Fully typed with Dataclasses**: The library is fully typed using Python `dataclasses`. It handles serialization with `mashumaro` and `orjson` for efficient conversion between Habitica API JSON data and Python objects.
39
+ * **Dynamic avatar image generation**: Habiticalib can fetch all necessary assets (like equipped items, pets, and mounts) and combine them into a single avatar image. This image can be saved to disk or returned as a byte buffer for further processing.
40
+ * **Fetch user data**: Retrieve and manage user data such as stats, preferences, and items. User data is structured with dataclasses to make it easy to work with.
41
+ * **Task management**: Support for creating, updating, and retrieving Habitica tasks (to-dos, dailies, habits, rewards) is provided.
42
+ * **Task status updates**: The library allows updates for task statuses, habit scoring, and daily completion.
43
+ * **Tags**: Habiticalib supports the creation, updating and deletion of tags.
44
+ * **Stat allocation, class cystem and sleep**: The library offers methods for stat point allocation and switching between Habitica classes. It also provides the ability to disable the class system and pausing damage(resting in the inn)
45
+
46
+ ---
47
+
48
+ ## 📖 Documentation
49
+
50
+ * **Full Documentation**: [https://tr4nt0r.github.io/habiticalib](https://tr4nt0r.github.io/habiticalib)
51
+ * **Source Code**: [https://github.com/tr4nt0r/habiticalib](https://github.com/tr4nt0r/habiticalib)
42
52
 
43
- ## Installation
53
+ ---
54
+
55
+ ## 📦 Installation
44
56
 
45
57
  ```bash
46
58
  pip install habiticalib
47
59
  ```
48
60
 
49
- ## Getting started
61
+ ## 🚀 Getting started
62
+
50
63
  Here’s an example to demonstrate basic usage:
51
64
 
52
65
  ```python
@@ -89,10 +102,27 @@ async def main():
89
102
  asyncio.run(main())
90
103
  ```
91
104
 
92
- ## Documentation
105
+ ---
106
+
107
+ ## 🛠️ Contributing
108
+
109
+ Contributions are welcome! To contribute:
110
+
111
+ 1. Fork the repository.
112
+ 2. Create a new branch.
113
+ 3. Make your changes and commit them.
114
+ 4. Submit a pull request.
115
+
116
+ Make sure to follow the [contributing guidelines](CONTRIBUTING.md).
117
+
118
+ ---
119
+
120
+ ## 📜 License
121
+
122
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
93
123
 
94
- For full documentation and detailed usage examples, please visit the [Habiticalib documentation](https://tr4nt0r.github.io/habiticalib/).
124
+ ---
95
125
 
96
- ## License
126
+ ## ❤️ Support
97
127
 
98
- This project is licensed under the terms of the MIT license.
128
+ If you find this project useful, consider [buying me a coffee ☕](https://www.buymeacoffee.com/tr4nt0r) or [sponsoring me on GitHub](https://github.com/sponsors/tr4nt0r)!
@@ -0,0 +1,12 @@
1
+ habiticalib/__init__.py,sha256=UxNKxNhjIi3v95VE3h-JWgitriNZytrGeX0GvKdevwU,7840
2
+ habiticalib/const.py,sha256=LVM9nbr5S4UQWlg6ydcXUahAi6eKU6Y6E7rp9FKkq3M,2308
3
+ habiticalib/exceptions.py,sha256=i9hnCaMT5RbnTioFhwRYJkcC_bG9lMeUd2jJsWFVnVg,1342
4
+ habiticalib/ha.py,sha256=c3cbXnWsA7IjcelzHb6snZ4C-fCDqwKoYZwvQiugnyY,25920
5
+ habiticalib/helpers.py,sha256=lq2HBvqLsFo5_zckMnc7hzDsHLfyrcStpFUpet3ZuZY,4500
6
+ habiticalib/lib.py,sha256=DUMdqia-w4AAPdf8bAX2g9PXq0HgPocYy-E1-cFXV7g,78503
7
+ habiticalib/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
+ habiticalib/typedefs.py,sha256=xZ-QOX-rizvBoQtetmdqru-0xzKi8L7KDAcoxQWnLN4,51024
9
+ habiticalib-0.4.2.dist-info/METADATA,sha256=bFcnsYTOyHXK6NDdrFk7JkS0Zk7R3MqOqaL38uj5yHU,5088
10
+ habiticalib-0.4.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
11
+ habiticalib-0.4.2.dist-info/licenses/LICENSE,sha256=oIinIOSJ49l1iVIRI3XGXFWt6SF7a83kEFBAY8ORwNI,1084
12
+ habiticalib-0.4.2.dist-info/RECORD,,
@@ -1,12 +0,0 @@
1
- habiticalib/__init__.py,sha256=UxNKxNhjIi3v95VE3h-JWgitriNZytrGeX0GvKdevwU,7840
2
- habiticalib/const.py,sha256=HxEw1nfGUDwGwSnUqqwV_kqlu-_VCk8220jyqI4VQ5o,2311
3
- habiticalib/exceptions.py,sha256=i9hnCaMT5RbnTioFhwRYJkcC_bG9lMeUd2jJsWFVnVg,1342
4
- habiticalib/ha.py,sha256=c3cbXnWsA7IjcelzHb6snZ4C-fCDqwKoYZwvQiugnyY,25920
5
- habiticalib/helpers.py,sha256=lq2HBvqLsFo5_zckMnc7hzDsHLfyrcStpFUpet3ZuZY,4500
6
- habiticalib/lib.py,sha256=DUMdqia-w4AAPdf8bAX2g9PXq0HgPocYy-E1-cFXV7g,78503
7
- habiticalib/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
- habiticalib/typedefs.py,sha256=jH2Q2F6CUShTN2XmfVOfbAfP7m8tMVLDe8Q8lpx3lM0,50938
9
- habiticalib-0.4.0rc4.dist-info/METADATA,sha256=ghh_Sp0wY2kCf2SG53wMMEvjR7UrcgL4Qf1sPphWUvo,4179
10
- habiticalib-0.4.0rc4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
11
- habiticalib-0.4.0rc4.dist-info/licenses/LICENSE,sha256=oIinIOSJ49l1iVIRI3XGXFWt6SF7a83kEFBAY8ORwNI,1084
12
- habiticalib-0.4.0rc4.dist-info/RECORD,,