maxapi-python 0.1.0__py3-none-any.whl → 0.1.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.
@@ -1,110 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: maxapi-python
3
- Version: 0.1.0
4
- Summary: Python wrapper для API мессенджера Max
5
- Author-email: noxzion <negroid2281488ilikrilex@gmail.com>
6
- License-Expression: MIT
7
- Project-URL: Homepage, https://github.com/noxzion/PyMax
8
- Project-URL: Repository, https://github.com/noxzion/PyMax
9
- Project-URL: Issues, https://github.com/noxzion/PyMax/issues
10
- Keywords: max,messenger,api,wrapper,websocket
11
- Classifier: Programming Language :: Python :: 3
12
- Classifier: Operating System :: OS Independent
13
- Requires-Python: >=3.11
14
- Description-Content-Type: text/markdown
15
- License-File: LICENSE
16
- Requires-Dist: build>=1.3.0
17
- Requires-Dist: pydocstring>=0.2.1
18
- Requires-Dist: sqlmodel>=0.0.24
19
- Requires-Dist: websockets>=11.0
20
- Dynamic: license-file
21
-
22
- ## MApi - Python api wrapper для Max'a
23
-
24
- ## Установка
25
-
26
- > [!IMPORTANT]
27
- > Нужно иметь git для установки из репозитория
28
-
29
- ```bash
30
- pip install git+https://github.com/noxzion/PyMax
31
- ```
32
-
33
- Или (без git)
34
- ```bash
35
- pip install maxapi-python
36
- ```
37
-
38
- ## Пример использования:
39
-
40
- ```python
41
- import asyncio
42
-
43
- from mapi import MaxClient, Message
44
-
45
-
46
- phone = "+1234567890"
47
- client = MaxClient(phone=phone, work_dir="cache")
48
-
49
-
50
- async def main() -> None:
51
- await client.start()
52
-
53
- for chat in client.chats:
54
- print(chat.title)
55
-
56
- message = await client.send_message("Hello from MaxClient!", chat.id, notify=True)
57
-
58
- await asyncio.sleep(5)
59
- message = await client.edit_message(chat.id, message.id, "Hello from MaxClient! (edited)")
60
- await asyncio.sleep(5)
61
-
62
- await client.delete_message(chat.id, [message.id], for_me=False)
63
-
64
- for dialog in client.dialogs:
65
- print(dialog.last_message.text)
66
-
67
- for channel in client.channels:
68
- print(channel.title)
69
-
70
- await client.close()
71
-
72
-
73
- @client.on_message
74
- async def handle_message(message: Message) -> None:
75
- print(str(message.sender) + ": " + message.text)
76
-
77
-
78
- @client.on_start
79
- async def handle_start() -> None:
80
- print("Client started successfully!")
81
- history = await client.fetch_history(chat_id=0)
82
- if history:
83
- for message in history:
84
- user_id = message.sender
85
- user = await client.get_user(user_id)
86
-
87
- if user:
88
- print(f"{user.names[0].name}: {message.text}")
89
-
90
-
91
- if __name__ == "__main__":
92
- asyncio.run(client.start())
93
- ```
94
-
95
- ## Разработка
96
-
97
- Сборка пакета:
98
-
99
- ```bash
100
- python scripts/build.py
101
- ```
102
-
103
- ## Лицензия
104
-
105
- [MIT](LICENSE)
106
-
107
- ## Авторы
108
-
109
- - [noxzion](https://github.com/noxzion) - исходный код пакета
110
- - [ink](https://github.com/ink-developer) - вскрытие API и документация
@@ -1,12 +0,0 @@
1
- maxapi_python-0.1.0.dist-info/licenses/LICENSE,sha256=Ud-0SKeXO_yA02Bb1nMDnEaSGwz2OqNlfGQbk0IzqPI,1085
2
- pymax/__init__.py,sha256=I-ZUVKBfHN-MPkLUbLPxflsvnHSFsyXdW3TmbN2_zz0,950
3
- pymax/core.py,sha256=DI3yjlCvSipilWMescXluLbP-sDwoOD092K67dJqR38,25132
4
- pymax/crud.py,sha256=Cn7Psw-gGN0607nqWOLlIorP_wowYWrLomlsof0gLkI,3311
5
- pymax/exceptions.py,sha256=tiD_JD-MYSb4qFyKov-KWOm0zlD1p_gG6nf1fV-0-SY,702
6
- pymax/models.py,sha256=7sWAmVuJjM7SPnDkpYEi8CARbTpUKbXqtWKMQdwd0w0,209
7
- pymax/static.py,sha256=ZIPPAyr3__gtkwSgS_-hXk_oNkcVKs55tY8pSzOrSlY,1711
8
- pymax/types.py,sha256=6EofkAY_oUnDkNh-cC9Uk05GjKgl6ThBy3_8Hjownz4,11541
9
- maxapi_python-0.1.0.dist-info/METADATA,sha256=DOVISXKymoucnNKgU1z84wPCLA1Mcwx9rzpxBPAuKCQ,2808
10
- maxapi_python-0.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
- maxapi_python-0.1.0.dist-info/top_level.txt,sha256=bdAekZwlWiYDxQTWsAUa-yjplJDWDeWEmyhRO3R8qV4,6
12
- maxapi_python-0.1.0.dist-info/RECORD,,
@@ -1 +0,0 @@
1
- pymax