pararamio-aio 3.0.0__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.
Files changed (61) hide show
  1. pararamio_aio-3.0.0/PKG-INFO +269 -0
  2. pararamio_aio-3.0.0/README.md +236 -0
  3. pararamio_aio-3.0.0/pyproject.toml +119 -0
  4. pararamio_aio-3.0.0/setup.cfg +4 -0
  5. pararamio_aio-3.0.0/src/pararamio_aio/__init__.py +26 -0
  6. pararamio_aio-3.0.0/src/pararamio_aio/_core/__init__.py +125 -0
  7. pararamio_aio-3.0.0/src/pararamio_aio/_core/_types.py +120 -0
  8. pararamio_aio-3.0.0/src/pararamio_aio/_core/base.py +143 -0
  9. pararamio_aio-3.0.0/src/pararamio_aio/_core/client_protocol.py +90 -0
  10. pararamio_aio-3.0.0/src/pararamio_aio/_core/constants/__init__.py +7 -0
  11. pararamio_aio-3.0.0/src/pararamio_aio/_core/constants/base.py +9 -0
  12. pararamio_aio-3.0.0/src/pararamio_aio/_core/constants/endpoints.py +84 -0
  13. pararamio_aio-3.0.0/src/pararamio_aio/_core/cookie_decorator.py +208 -0
  14. pararamio_aio-3.0.0/src/pararamio_aio/_core/cookie_manager.py +1222 -0
  15. pararamio_aio-3.0.0/src/pararamio_aio/_core/endpoints.py +67 -0
  16. pararamio_aio-3.0.0/src/pararamio_aio/_core/exceptions/__init__.py +6 -0
  17. pararamio_aio-3.0.0/src/pararamio_aio/_core/exceptions/auth.py +91 -0
  18. pararamio_aio-3.0.0/src/pararamio_aio/_core/exceptions/base.py +124 -0
  19. pararamio_aio-3.0.0/src/pararamio_aio/_core/models/__init__.py +17 -0
  20. pararamio_aio-3.0.0/src/pararamio_aio/_core/models/base.py +66 -0
  21. pararamio_aio-3.0.0/src/pararamio_aio/_core/models/chat.py +92 -0
  22. pararamio_aio-3.0.0/src/pararamio_aio/_core/models/post.py +65 -0
  23. pararamio_aio-3.0.0/src/pararamio_aio/_core/models/user.py +54 -0
  24. pararamio_aio-3.0.0/src/pararamio_aio/_core/py.typed +2 -0
  25. pararamio_aio-3.0.0/src/pararamio_aio/_core/utils/__init__.py +73 -0
  26. pararamio_aio-3.0.0/src/pararamio_aio/_core/utils/async_requests.py +417 -0
  27. pararamio_aio-3.0.0/src/pararamio_aio/_core/utils/auth_flow.py +202 -0
  28. pararamio_aio-3.0.0/src/pararamio_aio/_core/utils/authentication.py +235 -0
  29. pararamio_aio-3.0.0/src/pararamio_aio/_core/utils/captcha.py +92 -0
  30. pararamio_aio-3.0.0/src/pararamio_aio/_core/utils/helpers.py +336 -0
  31. pararamio_aio-3.0.0/src/pararamio_aio/_core/utils/http_client.py +199 -0
  32. pararamio_aio-3.0.0/src/pararamio_aio/_core/utils/requests.py +424 -0
  33. pararamio_aio-3.0.0/src/pararamio_aio/_core/validators.py +78 -0
  34. pararamio_aio-3.0.0/src/pararamio_aio/_types.py +29 -0
  35. pararamio_aio-3.0.0/src/pararamio_aio/client.py +989 -0
  36. pararamio_aio-3.0.0/src/pararamio_aio/constants/__init__.py +16 -0
  37. pararamio_aio-3.0.0/src/pararamio_aio/exceptions/__init__.py +31 -0
  38. pararamio_aio-3.0.0/src/pararamio_aio/exceptions/base.py +1 -0
  39. pararamio_aio-3.0.0/src/pararamio_aio/file_operations.py +232 -0
  40. pararamio_aio-3.0.0/src/pararamio_aio/models/__init__.py +31 -0
  41. pararamio_aio-3.0.0/src/pararamio_aio/models/activity.py +127 -0
  42. pararamio_aio-3.0.0/src/pararamio_aio/models/attachment.py +141 -0
  43. pararamio_aio-3.0.0/src/pararamio_aio/models/base.py +83 -0
  44. pararamio_aio-3.0.0/src/pararamio_aio/models/bot.py +274 -0
  45. pararamio_aio-3.0.0/src/pararamio_aio/models/chat.py +722 -0
  46. pararamio_aio-3.0.0/src/pararamio_aio/models/deferred_post.py +174 -0
  47. pararamio_aio-3.0.0/src/pararamio_aio/models/file.py +103 -0
  48. pararamio_aio-3.0.0/src/pararamio_aio/models/group.py +361 -0
  49. pararamio_aio-3.0.0/src/pararamio_aio/models/poll.py +275 -0
  50. pararamio_aio-3.0.0/src/pararamio_aio/models/post.py +643 -0
  51. pararamio_aio-3.0.0/src/pararamio_aio/models/team.py +403 -0
  52. pararamio_aio-3.0.0/src/pararamio_aio/models/user.py +239 -0
  53. pararamio_aio-3.0.0/src/pararamio_aio/py.typed +2 -0
  54. pararamio_aio-3.0.0/src/pararamio_aio/utils/__init__.py +18 -0
  55. pararamio_aio-3.0.0/src/pararamio_aio/utils/authentication.py +383 -0
  56. pararamio_aio-3.0.0/src/pararamio_aio/utils/requests.py +75 -0
  57. pararamio_aio-3.0.0/src/pararamio_aio.egg-info/PKG-INFO +269 -0
  58. pararamio_aio-3.0.0/src/pararamio_aio.egg-info/SOURCES.txt +59 -0
  59. pararamio_aio-3.0.0/src/pararamio_aio.egg-info/dependency_links.txt +1 -0
  60. pararamio_aio-3.0.0/src/pararamio_aio.egg-info/requires.txt +10 -0
  61. pararamio_aio-3.0.0/src/pararamio_aio.egg-info/top_level.txt +1 -0
@@ -0,0 +1,269 @@
1
+ Metadata-Version: 2.4
2
+ Name: pararamio-aio
3
+ Version: 3.0.0
4
+ Summary: Async Python client library for pararam.io platform
5
+ Author: Pararamio Team
6
+ License: MIT
7
+ Project-URL: Homepage, https://github.com/your-repo/py-pararamio
8
+ Project-URL: Documentation, https://your-docs-site.com
9
+ Project-URL: Repository, https://github.com/your-repo/py-pararamio
10
+ Project-URL: Issues, https://github.com/your-repo/py-pararamio/issues
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Topic :: Internet :: WWW/HTTP
21
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
+ Requires-Python: >=3.9
23
+ Description-Content-Type: text/markdown
24
+ Requires-Dist: aiohttp>=3.8.0
25
+ Requires-Dist: aiofiles>=0.8.0
26
+ Provides-Extra: dev
27
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
28
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == "dev"
29
+ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
30
+ Requires-Dist: ruff>=0.1.0; extra == "dev"
31
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
32
+ Requires-Dist: types-aiofiles; extra == "dev"
33
+
34
+ # Pararamio AIO
35
+
36
+ Async Python API client for [pararam.io](https://pararam.io) platform.
37
+
38
+ ## Features
39
+
40
+ - ⚡ **Async/Await**: Modern asynchronous interface with aiohttp
41
+ - 🚀 **Explicit Loading**: Predictable API calls with explicit `load()` methods
42
+ - 🍪 **Cookie Persistence**: Automatic session management
43
+ - 🔐 **Two-Factor Authentication**: Built-in 2FA support
44
+ - 🐍 **Type Hints**: Full typing support for better IDE experience
45
+
46
+ ## Installation
47
+
48
+ ```bash
49
+ pip install pararamio-aio
50
+ ```
51
+
52
+ ## Quick Start
53
+
54
+ ```python
55
+ import asyncio
56
+ from pararamio_aio import PararamioAIO, User, Chat, Post
57
+ from pararamio_core import AsyncFileCookieManager
58
+
59
+ async def main():
60
+ # Initialize cookie manager for persistent authentication
61
+ cookie_manager = AsyncFileCookieManager("session.cookie")
62
+
63
+ # Initialize client
64
+ async with PararamioAIO(
65
+ login="your_login",
66
+ password="your_password",
67
+ key="your_2fa_key",
68
+ cookie_manager=cookie_manager
69
+ ) as client:
70
+ # Authenticate
71
+ await client.authenticate()
72
+
73
+ # Search for users - returns User objects (clean names!)
74
+ users = await client.search_users("John")
75
+ for user in users:
76
+ print(f"{user.name}")
77
+
78
+ # Get chat messages - returns Chat and Post objects
79
+ chat = await client.get_chat_by_id(12345)
80
+ posts = await chat.get_posts(limit=10)
81
+ for post in posts:
82
+ await post.load() # Explicit loading
83
+ print(f"{post.author.name}: {post.text}")
84
+
85
+ asyncio.run(main())
86
+ ```
87
+
88
+ ## Explicit Loading
89
+
90
+ Unlike the sync version, pararamio-aio uses explicit loading for predictable async behavior:
91
+
92
+ ```python
93
+ # Get user object
94
+ user = await client.get_user_by_id(123)
95
+ print(user.name) # Basic data is already loaded
96
+
97
+ # Load full profile data explicitly
98
+ await user.load()
99
+ print(user.bio) # Now additional data is available
100
+
101
+ # Load specific relations
102
+ posts = await user.get_posts()
103
+ for post in posts:
104
+ await post.load() # Load each post's content
105
+ ```
106
+
107
+ ## Cookie Management
108
+
109
+ The async client supports multiple cookie storage options:
110
+
111
+ ### Default (In-Memory)
112
+ ```python
113
+ # By default, uses AsyncInMemoryCookieManager (no persistence)
114
+ async with PararamioAIO(
115
+ login="user",
116
+ password="pass",
117
+ key="key"
118
+ ) as client:
119
+ await client.authenticate()
120
+ # Cookies are stored in memory only during the session
121
+ ```
122
+
123
+ ### File-based Persistence
124
+ ```python
125
+ from pararamio_core import AsyncFileCookieManager
126
+
127
+ # Create a cookie manager for persistent storage
128
+ cookie_manager = AsyncFileCookieManager("session.cookie")
129
+
130
+ # First run - authenticates with credentials
131
+ async with PararamioAIO(
132
+ login="user",
133
+ password="pass",
134
+ key="key",
135
+ cookie_manager=cookie_manager
136
+ ) as client:
137
+ await client.authenticate()
138
+
139
+ # Later runs - uses saved cookie
140
+ cookie_manager2 = AsyncFileCookieManager("session.cookie")
141
+ async with PararamioAIO(cookie_manager=cookie_manager2) as client:
142
+ # Already authenticated!
143
+ profile = await client.get_profile()
144
+ ```
145
+
146
+ ## Concurrent Operations
147
+
148
+ Take advantage of async for concurrent operations:
149
+
150
+ ```python
151
+ async def get_multiple_users(client, user_ids):
152
+ # Fetch all users concurrently
153
+ tasks = [client.get_user_by_id(uid) for uid in user_ids]
154
+ users = await asyncio.gather(*tasks)
155
+
156
+ # Load all profiles concurrently
157
+ await asyncio.gather(*[user.load() for user in users])
158
+
159
+ return users
160
+ ```
161
+
162
+ ## API Reference
163
+
164
+ ### Client Methods
165
+
166
+ All methods are async and must be awaited:
167
+
168
+ - `authenticate()` - Authenticate with the API
169
+ - `search_users(query)` - Search for users
170
+ - `get_user_by_id(user_id)` - Get user by ID
171
+ - `get_users_by_ids(ids)` - Get multiple users
172
+ - `get_chat_by_id(chat_id)` - Get chat by ID
173
+ - `search_groups(query)` - Search for groups
174
+ - `create_chat(title, description)` - Create new chat
175
+
176
+ ### Model Objects
177
+
178
+ All models have async methods:
179
+
180
+ - `User` - User profile
181
+ - `load()` - Load full profile
182
+ - `get_posts()` - Get user's posts
183
+ - `get_groups()` - Get user's groups
184
+
185
+ - `Chat` - Chat/conversation
186
+ - `load()` - Load chat details
187
+ - `get_posts(limit, offset)` - Get messages
188
+ - `send_message(text)` - Send message
189
+
190
+ - `Post` - Message/post
191
+ - `load()` - Load post content
192
+ - `delete()` - Delete post
193
+
194
+ - `Group` - Community group
195
+ - `load()` - Load group details
196
+ - `get_members()` - Get member list
197
+
198
+ ## Error Handling
199
+
200
+ ```python
201
+ from pararamio_aio import (
202
+ PararamioAuthenticationException,
203
+ PararamioHTTPRequestException
204
+ )
205
+
206
+ async with PararamioAIO(**credentials) as client:
207
+ try:
208
+ await client.authenticate()
209
+ except PararamioAuthenticationException as e:
210
+ print(f"Authentication failed: {e}")
211
+ except PararamioHTTPRequestException as e:
212
+ print(f"HTTP error {e.code}: {e.message}")
213
+ ```
214
+
215
+ ## Advanced Usage
216
+
217
+ ### Custom Session
218
+
219
+ ```python
220
+ import aiohttp
221
+
222
+ # Create custom session with specific timeout
223
+ timeout = aiohttp.ClientTimeout(total=60)
224
+ connector = aiohttp.TCPConnector(limit=100)
225
+ session = aiohttp.ClientSession(timeout=timeout, connector=connector)
226
+
227
+ async with PararamioAIO(session=session, **credentials) as client:
228
+ # Client will use your custom session
229
+ await client.authenticate()
230
+ ```
231
+
232
+ ### Rate Limiting
233
+
234
+ The client automatically handles rate limiting:
235
+
236
+ ```python
237
+ client = PararamioAIO(
238
+ wait_auth_limit=True, # Wait instead of failing on rate limit
239
+ **credentials
240
+ )
241
+ ```
242
+
243
+ ## Migration from Sync Version
244
+
245
+ If you're migrating from the synchronous `pararamio` package:
246
+
247
+ 1. Add `async`/`await` keywords
248
+ 2. Use async context manager (`async with`)
249
+ 3. Call `load()` explicitly when needed
250
+ 4. Use `asyncio.gather()` for concurrent operations
251
+
252
+ Example migration:
253
+
254
+ ```python
255
+ # Sync version
256
+ client = Pararamio(**creds)
257
+ user = client.get_user_by_id(123)
258
+ print(user.bio) # Lazy loaded
259
+
260
+ # Async version
261
+ async with PararamioAIO(**creds) as client:
262
+ user = await client.get_user_by_id(123)
263
+ await user.load() # Explicit load
264
+ print(user.bio)
265
+ ```
266
+
267
+ ## License
268
+
269
+ MIT License - see LICENSE file for details.
@@ -0,0 +1,236 @@
1
+ # Pararamio AIO
2
+
3
+ Async Python API client for [pararam.io](https://pararam.io) platform.
4
+
5
+ ## Features
6
+
7
+ - ⚡ **Async/Await**: Modern asynchronous interface with aiohttp
8
+ - 🚀 **Explicit Loading**: Predictable API calls with explicit `load()` methods
9
+ - 🍪 **Cookie Persistence**: Automatic session management
10
+ - 🔐 **Two-Factor Authentication**: Built-in 2FA support
11
+ - 🐍 **Type Hints**: Full typing support for better IDE experience
12
+
13
+ ## Installation
14
+
15
+ ```bash
16
+ pip install pararamio-aio
17
+ ```
18
+
19
+ ## Quick Start
20
+
21
+ ```python
22
+ import asyncio
23
+ from pararamio_aio import PararamioAIO, User, Chat, Post
24
+ from pararamio_core import AsyncFileCookieManager
25
+
26
+ async def main():
27
+ # Initialize cookie manager for persistent authentication
28
+ cookie_manager = AsyncFileCookieManager("session.cookie")
29
+
30
+ # Initialize client
31
+ async with PararamioAIO(
32
+ login="your_login",
33
+ password="your_password",
34
+ key="your_2fa_key",
35
+ cookie_manager=cookie_manager
36
+ ) as client:
37
+ # Authenticate
38
+ await client.authenticate()
39
+
40
+ # Search for users - returns User objects (clean names!)
41
+ users = await client.search_users("John")
42
+ for user in users:
43
+ print(f"{user.name}")
44
+
45
+ # Get chat messages - returns Chat and Post objects
46
+ chat = await client.get_chat_by_id(12345)
47
+ posts = await chat.get_posts(limit=10)
48
+ for post in posts:
49
+ await post.load() # Explicit loading
50
+ print(f"{post.author.name}: {post.text}")
51
+
52
+ asyncio.run(main())
53
+ ```
54
+
55
+ ## Explicit Loading
56
+
57
+ Unlike the sync version, pararamio-aio uses explicit loading for predictable async behavior:
58
+
59
+ ```python
60
+ # Get user object
61
+ user = await client.get_user_by_id(123)
62
+ print(user.name) # Basic data is already loaded
63
+
64
+ # Load full profile data explicitly
65
+ await user.load()
66
+ print(user.bio) # Now additional data is available
67
+
68
+ # Load specific relations
69
+ posts = await user.get_posts()
70
+ for post in posts:
71
+ await post.load() # Load each post's content
72
+ ```
73
+
74
+ ## Cookie Management
75
+
76
+ The async client supports multiple cookie storage options:
77
+
78
+ ### Default (In-Memory)
79
+ ```python
80
+ # By default, uses AsyncInMemoryCookieManager (no persistence)
81
+ async with PararamioAIO(
82
+ login="user",
83
+ password="pass",
84
+ key="key"
85
+ ) as client:
86
+ await client.authenticate()
87
+ # Cookies are stored in memory only during the session
88
+ ```
89
+
90
+ ### File-based Persistence
91
+ ```python
92
+ from pararamio_core import AsyncFileCookieManager
93
+
94
+ # Create a cookie manager for persistent storage
95
+ cookie_manager = AsyncFileCookieManager("session.cookie")
96
+
97
+ # First run - authenticates with credentials
98
+ async with PararamioAIO(
99
+ login="user",
100
+ password="pass",
101
+ key="key",
102
+ cookie_manager=cookie_manager
103
+ ) as client:
104
+ await client.authenticate()
105
+
106
+ # Later runs - uses saved cookie
107
+ cookie_manager2 = AsyncFileCookieManager("session.cookie")
108
+ async with PararamioAIO(cookie_manager=cookie_manager2) as client:
109
+ # Already authenticated!
110
+ profile = await client.get_profile()
111
+ ```
112
+
113
+ ## Concurrent Operations
114
+
115
+ Take advantage of async for concurrent operations:
116
+
117
+ ```python
118
+ async def get_multiple_users(client, user_ids):
119
+ # Fetch all users concurrently
120
+ tasks = [client.get_user_by_id(uid) for uid in user_ids]
121
+ users = await asyncio.gather(*tasks)
122
+
123
+ # Load all profiles concurrently
124
+ await asyncio.gather(*[user.load() for user in users])
125
+
126
+ return users
127
+ ```
128
+
129
+ ## API Reference
130
+
131
+ ### Client Methods
132
+
133
+ All methods are async and must be awaited:
134
+
135
+ - `authenticate()` - Authenticate with the API
136
+ - `search_users(query)` - Search for users
137
+ - `get_user_by_id(user_id)` - Get user by ID
138
+ - `get_users_by_ids(ids)` - Get multiple users
139
+ - `get_chat_by_id(chat_id)` - Get chat by ID
140
+ - `search_groups(query)` - Search for groups
141
+ - `create_chat(title, description)` - Create new chat
142
+
143
+ ### Model Objects
144
+
145
+ All models have async methods:
146
+
147
+ - `User` - User profile
148
+ - `load()` - Load full profile
149
+ - `get_posts()` - Get user's posts
150
+ - `get_groups()` - Get user's groups
151
+
152
+ - `Chat` - Chat/conversation
153
+ - `load()` - Load chat details
154
+ - `get_posts(limit, offset)` - Get messages
155
+ - `send_message(text)` - Send message
156
+
157
+ - `Post` - Message/post
158
+ - `load()` - Load post content
159
+ - `delete()` - Delete post
160
+
161
+ - `Group` - Community group
162
+ - `load()` - Load group details
163
+ - `get_members()` - Get member list
164
+
165
+ ## Error Handling
166
+
167
+ ```python
168
+ from pararamio_aio import (
169
+ PararamioAuthenticationException,
170
+ PararamioHTTPRequestException
171
+ )
172
+
173
+ async with PararamioAIO(**credentials) as client:
174
+ try:
175
+ await client.authenticate()
176
+ except PararamioAuthenticationException as e:
177
+ print(f"Authentication failed: {e}")
178
+ except PararamioHTTPRequestException as e:
179
+ print(f"HTTP error {e.code}: {e.message}")
180
+ ```
181
+
182
+ ## Advanced Usage
183
+
184
+ ### Custom Session
185
+
186
+ ```python
187
+ import aiohttp
188
+
189
+ # Create custom session with specific timeout
190
+ timeout = aiohttp.ClientTimeout(total=60)
191
+ connector = aiohttp.TCPConnector(limit=100)
192
+ session = aiohttp.ClientSession(timeout=timeout, connector=connector)
193
+
194
+ async with PararamioAIO(session=session, **credentials) as client:
195
+ # Client will use your custom session
196
+ await client.authenticate()
197
+ ```
198
+
199
+ ### Rate Limiting
200
+
201
+ The client automatically handles rate limiting:
202
+
203
+ ```python
204
+ client = PararamioAIO(
205
+ wait_auth_limit=True, # Wait instead of failing on rate limit
206
+ **credentials
207
+ )
208
+ ```
209
+
210
+ ## Migration from Sync Version
211
+
212
+ If you're migrating from the synchronous `pararamio` package:
213
+
214
+ 1. Add `async`/`await` keywords
215
+ 2. Use async context manager (`async with`)
216
+ 3. Call `load()` explicitly when needed
217
+ 4. Use `asyncio.gather()` for concurrent operations
218
+
219
+ Example migration:
220
+
221
+ ```python
222
+ # Sync version
223
+ client = Pararamio(**creds)
224
+ user = client.get_user_by_id(123)
225
+ print(user.bio) # Lazy loaded
226
+
227
+ # Async version
228
+ async with PararamioAIO(**creds) as client:
229
+ user = await client.get_user_by_id(123)
230
+ await user.load() # Explicit load
231
+ print(user.bio)
232
+ ```
233
+
234
+ ## License
235
+
236
+ MIT License - see LICENSE file for details.
@@ -0,0 +1,119 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "pararamio-aio"
7
+ version = "3.0.0"
8
+ description = "Async Python client library for pararam.io platform"
9
+ readme = "README.md"
10
+ license = {text = "MIT"}
11
+ authors = [
12
+ {name = "Pararamio Team"}
13
+ ]
14
+ classifiers = [
15
+ "Development Status :: 3 - Alpha",
16
+ "Intended Audience :: Developers",
17
+ "License :: OSI Approved :: MIT License",
18
+ "Programming Language :: Python :: 3",
19
+ "Programming Language :: Python :: 3.9",
20
+ "Programming Language :: Python :: 3.10",
21
+ "Programming Language :: Python :: 3.11",
22
+ "Programming Language :: Python :: 3.12",
23
+ "Programming Language :: Python :: 3.13",
24
+ "Topic :: Internet :: WWW/HTTP",
25
+ "Topic :: Software Development :: Libraries :: Python Modules",
26
+ ]
27
+ requires-python = ">=3.9"
28
+ dependencies = [
29
+ "aiohttp>=3.8.0",
30
+ "aiofiles>=0.8.0",
31
+ ]
32
+
33
+ [project.optional-dependencies]
34
+ dev = [
35
+ "pytest>=7.0.0",
36
+ "pytest-asyncio>=0.21.0",
37
+ "pytest-cov>=4.0.0",
38
+ "ruff>=0.1.0",
39
+ "mypy>=1.0.0",
40
+ "types-aiofiles",
41
+ ]
42
+
43
+ [project.urls]
44
+ Homepage = "https://github.com/your-repo/py-pararamio"
45
+ Documentation = "https://your-docs-site.com"
46
+ Repository = "https://github.com/your-repo/py-pararamio"
47
+ Issues = "https://github.com/your-repo/py-pararamio/issues"
48
+
49
+ [tool.setuptools.packages.find]
50
+ where = ["src"]
51
+ include = ["pararamio_aio*"]
52
+
53
+ [tool.ruff]
54
+ line-length = 100
55
+ target-version = "py38"
56
+ exclude = [
57
+ ".git",
58
+ "__pycache__",
59
+ "build",
60
+ "dist",
61
+ ".venv",
62
+ ]
63
+
64
+ [tool.ruff.lint]
65
+ select = [
66
+ "E", # pycodestyle errors
67
+ "W", # pycodestyle warnings
68
+ "F", # pyflakes
69
+ "I", # isort
70
+ "B", # flake8-bugbear
71
+ "C4", # flake8-comprehensions
72
+ "UP", # pyupgrade
73
+ ]
74
+ ignore = [
75
+ "E501", # line too long, handled by formatter
76
+ "B008", # do not perform function calls in argument defaults
77
+ "C901", # too complex
78
+ ]
79
+
80
+ [tool.mypy]
81
+ python_version = "3.9"
82
+ warn_return_any = true
83
+ warn_unused_configs = true
84
+ disallow_untyped_defs = true
85
+ disallow_incomplete_defs = true
86
+ check_untyped_defs = true
87
+ disallow_untyped_decorators = true
88
+ no_implicit_optional = true
89
+ warn_redundant_casts = true
90
+ warn_unused_ignores = true
91
+ warn_no_return = true
92
+ warn_unreachable = true
93
+ strict_equality = true
94
+
95
+ [tool.pytest.ini_options]
96
+ minversion = "6.0"
97
+ addopts = "-ra -q --strict-markers --strict-config"
98
+ testpaths = ["tests"]
99
+ asyncio_mode = "auto"
100
+
101
+ [tool.coverage.run]
102
+ source = ["src"]
103
+ omit = ["*/tests/*"]
104
+
105
+ [tool.coverage.report]
106
+ exclude_lines = [
107
+ "pragma: no cover",
108
+ "def __repr__",
109
+ "if self.debug:",
110
+ "if settings.DEBUG",
111
+ "raise AssertionError",
112
+ "raise NotImplementedError",
113
+ "if 0:",
114
+ "if __name__ == .__main__.:",
115
+ "class .*\\bProtocol\\):",
116
+ "@(abc\\.)?abstractmethod",
117
+ ]
118
+
119
+ [tool.uv.sources]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,26 @@
1
+ """Async Python client library for pararam.io platform."""
2
+
3
+ from pararamio_aio._core.constants import VERSION
4
+
5
+ from .client import AsyncPararamio
6
+ from .exceptions import (
7
+ PararamioAuthenticationException,
8
+ PararamioException,
9
+ PararamioHTTPRequestException,
10
+ PararamioValidationException,
11
+ )
12
+ from .models import Chat, File, Group, Post, User
13
+
14
+ __version__ = VERSION
15
+ __all__ = (
16
+ "AsyncPararamio",
17
+ "Chat",
18
+ "User",
19
+ "Post",
20
+ "Group",
21
+ "File",
22
+ "PararamioException",
23
+ "PararamioAuthenticationException",
24
+ "PararamioHTTPRequestException",
25
+ "PararamioValidationException",
26
+ )