marqetive-lib 0.1.4__py3-none-any.whl → 0.1.6__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.
marqetive/__init__.py CHANGED
@@ -35,16 +35,12 @@ Usage:
35
35
  """
36
36
 
37
37
  # Core API client
38
- from marqetive.core.client import APIClient
39
-
40
- # Factory
41
- from marqetive.factory import PlatformFactory, get_client
42
-
43
38
  # Progress callback type
44
- from marqetive.platforms.base import ProgressCallback
39
+ from marqetive.core.base import ProgressCallback
40
+ from marqetive.core.client import APIClient
45
41
 
46
42
  # Exceptions
47
- from marqetive.platforms.exceptions import (
43
+ from marqetive.core.exceptions import (
48
44
  InvalidFileTypeError,
49
45
  MediaUploadError,
50
46
  PlatformAuthError,
@@ -55,7 +51,7 @@ from marqetive.platforms.exceptions import (
55
51
  )
56
52
 
57
53
  # Models
58
- from marqetive.platforms.models import (
54
+ from marqetive.core.models import (
59
55
  AccountStatus,
60
56
  AuthCredentials,
61
57
  Comment,
@@ -68,6 +64,9 @@ from marqetive.platforms.models import (
68
64
  PostUpdateRequest,
69
65
  )
70
66
 
67
+ # Factory
68
+ from marqetive.factory import PlatformFactory, get_client
69
+
71
70
  # Utilities
72
71
  from marqetive.utils.helpers import format_response
73
72
 
@@ -1,5 +1,54 @@
1
1
  """Core functionality for MarqetiveLib."""
2
2
 
3
+ from marqetive.core.base import ProgressCallback, SocialMediaPlatform
3
4
  from marqetive.core.client import APIClient
5
+ from marqetive.core.exceptions import (
6
+ InvalidFileTypeError,
7
+ MediaUploadError,
8
+ PlatformAuthError,
9
+ PlatformError,
10
+ PostNotFoundError,
11
+ RateLimitError,
12
+ ValidationError,
13
+ )
14
+ from marqetive.core.models import (
15
+ AccountStatus,
16
+ AuthCredentials,
17
+ Comment,
18
+ CommentStatus,
19
+ MediaAttachment,
20
+ MediaType,
21
+ PlatformResponse,
22
+ Post,
23
+ PostCreateRequest,
24
+ PostStatus,
25
+ PostUpdateRequest,
26
+ )
4
27
 
5
- __all__ = ["APIClient"]
28
+ __all__ = [
29
+ # Client
30
+ "APIClient",
31
+ # Base class
32
+ "SocialMediaPlatform",
33
+ "ProgressCallback",
34
+ # Models
35
+ "AccountStatus",
36
+ "AuthCredentials",
37
+ "Comment",
38
+ "CommentStatus",
39
+ "MediaAttachment",
40
+ "MediaType",
41
+ "PlatformResponse",
42
+ "Post",
43
+ "PostCreateRequest",
44
+ "PostStatus",
45
+ "PostUpdateRequest",
46
+ # Exceptions
47
+ "InvalidFileTypeError",
48
+ "MediaUploadError",
49
+ "PlatformAuthError",
50
+ "PlatformError",
51
+ "PostNotFoundError",
52
+ "RateLimitError",
53
+ "ValidationError",
54
+ ]
@@ -12,11 +12,11 @@ from traceback import TracebackException
12
12
  from typing import Any
13
13
 
14
14
  from marqetive.core.client import APIClient
15
- from marqetive.platforms.exceptions import (
15
+ from marqetive.core.exceptions import (
16
16
  PlatformAuthError,
17
17
  RateLimitError,
18
18
  )
19
- from marqetive.platforms.models import (
19
+ from marqetive.core.models import (
20
20
  AuthCredentials,
21
21
  Comment,
22
22
  MediaAttachment,
marqetive/factory.py CHANGED
@@ -8,8 +8,8 @@ import logging
8
8
  import os
9
9
  from typing import TYPE_CHECKING
10
10
 
11
- from marqetive.platforms.exceptions import PlatformAuthError
12
- from marqetive.platforms.models import AuthCredentials
11
+ from marqetive.core.exceptions import PlatformAuthError
12
+ from marqetive.core.models import AuthCredentials
13
13
  from marqetive.utils.oauth import (
14
14
  refresh_instagram_token,
15
15
  refresh_linkedin_token,
@@ -18,7 +18,7 @@ from marqetive.utils.oauth import (
18
18
  )
19
19
 
20
20
  if TYPE_CHECKING:
21
- from marqetive.platforms.base import SocialMediaPlatform
21
+ from marqetive.core.base import SocialMediaPlatform
22
22
 
23
23
  logger = logging.getLogger(__name__)
24
24
 
@@ -9,8 +9,8 @@ Platform clients are available via their respective subpackages:
9
9
  - from marqetive.platforms.instagram import InstagramClient
10
10
  """
11
11
 
12
- from marqetive.platforms.base import SocialMediaPlatform
13
- from marqetive.platforms.exceptions import (
12
+ from marqetive.core.base import SocialMediaPlatform
13
+ from marqetive.core.exceptions import (
14
14
  MediaUploadError,
15
15
  PlatformAuthError,
16
16
  PlatformError,
@@ -18,7 +18,7 @@ from marqetive.platforms.exceptions import (
18
18
  RateLimitError,
19
19
  ValidationError,
20
20
  )
21
- from marqetive.platforms.models import (
21
+ from marqetive.core.models import (
22
22
  AuthCredentials,
23
23
  Comment,
24
24
  CommentStatus,
@@ -12,19 +12,15 @@ from typing import Any, Literal, cast
12
12
  import httpx
13
13
  from pydantic import HttpUrl
14
14
 
15
- from marqetive.platforms.base import ProgressCallback, SocialMediaPlatform
16
- from marqetive.platforms.exceptions import (
15
+ from marqetive.core.base import ProgressCallback, SocialMediaPlatform
16
+ from marqetive.core.exceptions import (
17
17
  MediaUploadError,
18
18
  PlatformAuthError,
19
19
  PlatformError,
20
20
  PostNotFoundError,
21
21
  ValidationError,
22
22
  )
23
- from marqetive.platforms.instagram.media import (
24
- InstagramMediaManager,
25
- MediaItem,
26
- )
27
- from marqetive.platforms.models import (
23
+ from marqetive.core.models import (
28
24
  AuthCredentials,
29
25
  Comment,
30
26
  CommentStatus,
@@ -35,6 +31,10 @@ from marqetive.platforms.models import (
35
31
  PostStatus,
36
32
  PostUpdateRequest,
37
33
  )
34
+ from marqetive.platforms.instagram.media import (
35
+ InstagramMediaManager,
36
+ MediaItem,
37
+ )
38
38
 
39
39
 
40
40
  class InstagramClient(SocialMediaPlatform):
@@ -5,7 +5,7 @@ This module provides comprehensive error handling for Instagram Graph API errors
5
5
 
6
6
  from typing import Any
7
7
 
8
- from marqetive.platforms.exceptions import (
8
+ from marqetive.core.exceptions import (
9
9
  MediaUploadError,
10
10
  PlatformAuthError,
11
11
  PlatformError,
@@ -19,7 +19,7 @@ from typing import Any, Literal
19
19
 
20
20
  import httpx
21
21
 
22
- from marqetive.platforms.exceptions import (
22
+ from marqetive.core.exceptions import (
23
23
  MediaUploadError,
24
24
  ValidationError,
25
25
  )
@@ -12,16 +12,15 @@ from typing import Any, cast
12
12
  import httpx
13
13
  from pydantic import HttpUrl
14
14
 
15
- from marqetive.platforms.base import ProgressCallback, SocialMediaPlatform
16
- from marqetive.platforms.exceptions import (
15
+ from marqetive.core.base import ProgressCallback, SocialMediaPlatform
16
+ from marqetive.core.exceptions import (
17
17
  MediaUploadError,
18
18
  PlatformAuthError,
19
19
  PlatformError,
20
20
  PostNotFoundError,
21
21
  ValidationError,
22
22
  )
23
- from marqetive.platforms.linkedin.media import LinkedInMediaManager, MediaAsset
24
- from marqetive.platforms.models import (
23
+ from marqetive.core.models import (
25
24
  AuthCredentials,
26
25
  Comment,
27
26
  CommentStatus,
@@ -32,6 +31,7 @@ from marqetive.platforms.models import (
32
31
  PostStatus,
33
32
  PostUpdateRequest,
34
33
  )
34
+ from marqetive.platforms.linkedin.media import LinkedInMediaManager, MediaAsset
35
35
 
36
36
 
37
37
  class LinkedInClient(SocialMediaPlatform):
@@ -9,7 +9,7 @@ This module provides comprehensive error handling for LinkedIn API errors includ
9
9
 
10
10
  from typing import Any
11
11
 
12
- from marqetive.platforms.exceptions import (
12
+ from marqetive.core.exceptions import (
13
13
  MediaUploadError,
14
14
  PlatformAuthError,
15
15
  PlatformError,
@@ -20,7 +20,7 @@ from typing import Any, Literal
20
20
 
21
21
  import httpx
22
22
 
23
- from marqetive.platforms.exceptions import (
23
+ from marqetive.core.exceptions import (
24
24
  MediaUploadError,
25
25
  ValidationError,
26
26
  )
@@ -11,14 +11,14 @@ from typing import Any
11
11
 
12
12
  from pydantic import HttpUrl
13
13
 
14
- from marqetive.platforms.base import ProgressCallback, SocialMediaPlatform
15
- from marqetive.platforms.exceptions import (
14
+ from marqetive.core.base import ProgressCallback, SocialMediaPlatform
15
+ from marqetive.core.exceptions import (
16
16
  PlatformAuthError,
17
17
  PlatformError,
18
18
  PostNotFoundError,
19
19
  ValidationError,
20
20
  )
21
- from marqetive.platforms.models import (
21
+ from marqetive.core.models import (
22
22
  AuthCredentials,
23
23
  Comment,
24
24
  CommentStatus,
@@ -292,7 +292,9 @@ class TikTokClient(SocialMediaPlatform):
292
292
  ) from e
293
293
 
294
294
  async def update_post(
295
- self, post_id: str, request: PostUpdateRequest # noqa: ARG002
295
+ self,
296
+ post_id: str,
297
+ request: PostUpdateRequest, # noqa: ARG002
296
298
  ) -> Post:
297
299
  """Update a TikTok video.
298
300
 
@@ -337,7 +339,9 @@ class TikTokClient(SocialMediaPlatform):
337
339
  )
338
340
 
339
341
  async def create_comment(
340
- self, post_id: str, content: str # noqa: ARG002
342
+ self,
343
+ post_id: str,
344
+ content: str, # noqa: ARG002
341
345
  ) -> Comment:
342
346
  """Create a comment on a TikTok video.
343
347
 
@@ -9,7 +9,7 @@ TikTok API uses string error codes in the response format:
9
9
 
10
10
  from typing import Any
11
11
 
12
- from marqetive.platforms.exceptions import (
12
+ from marqetive.core.exceptions import (
13
13
  MediaUploadError,
14
14
  PlatformAuthError,
15
15
  PlatformError,
@@ -20,7 +20,7 @@ from typing import Any, Literal
20
20
 
21
21
  import httpx
22
22
 
23
- from marqetive.platforms.exceptions import (
23
+ from marqetive.core.exceptions import (
24
24
  InvalidFileTypeError,
25
25
  MediaUploadError,
26
26
  )
@@ -13,8 +13,8 @@ import httpx
13
13
  import tweepy
14
14
  from pydantic import HttpUrl
15
15
 
16
- from marqetive.platforms.base import ProgressCallback, SocialMediaPlatform
17
- from marqetive.platforms.exceptions import (
16
+ from marqetive.core.base import ProgressCallback, SocialMediaPlatform
17
+ from marqetive.core.exceptions import (
18
18
  MediaUploadError,
19
19
  PlatformAuthError,
20
20
  PlatformError,
@@ -22,7 +22,7 @@ from marqetive.platforms.exceptions import (
22
22
  RateLimitError,
23
23
  ValidationError,
24
24
  )
25
- from marqetive.platforms.models import (
25
+ from marqetive.core.models import (
26
26
  AuthCredentials,
27
27
  Comment,
28
28
  CommentStatus,
@@ -9,7 +9,7 @@ This module provides comprehensive error handling for Twitter API errors includi
9
9
 
10
10
  from typing import Any
11
11
 
12
- from marqetive.platforms.exceptions import (
12
+ from marqetive.core.exceptions import (
13
13
  MediaUploadError,
14
14
  PlatformAuthError,
15
15
  PlatformError,
@@ -18,7 +18,7 @@ from typing import Any, Literal
18
18
 
19
19
  import httpx
20
20
 
21
- from marqetive.platforms.exceptions import (
21
+ from marqetive.core.exceptions import (
22
22
  InvalidFileTypeError,
23
23
  MediaUploadError,
24
24
  )
marqetive/utils/oauth.py CHANGED
@@ -10,8 +10,8 @@ from typing import Any
10
10
 
11
11
  import httpx
12
12
 
13
- from marqetive.platforms.exceptions import PlatformAuthError
14
- from marqetive.platforms.models import AuthCredentials
13
+ from marqetive.core.exceptions import PlatformAuthError
14
+ from marqetive.core.models import AuthCredentials
15
15
 
16
16
  logger = logging.getLogger(__name__)
17
17
 
@@ -8,7 +8,7 @@ import re
8
8
  from datetime import datetime, timedelta
9
9
  from typing import Any
10
10
 
11
- from marqetive.platforms.models import AuthCredentials
11
+ from marqetive.core.models import AuthCredentials
12
12
 
13
13
 
14
14
  def is_token_expired(
@@ -0,0 +1,297 @@
1
+ Metadata-Version: 2.4
2
+ Name: marqetive-lib
3
+ Version: 0.1.6
4
+ Summary: Modern Python utilities for web APIs
5
+ Keywords: api,utilities,web,http,marqetive
6
+ Requires-Python: >=3.12
7
+ Classifier: Development Status :: 3 - Alpha
8
+ Classifier: Intended Audience :: Developers
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3.12
11
+ Classifier: Programming Language :: Python :: 3.13
12
+ Classifier: Topic :: Internet :: WWW/HTTP
13
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
14
+ Provides-Extra: dev
15
+ Provides-Extra: docs
16
+ Requires-Dist: aiofiles (>=24.0.0)
17
+ Requires-Dist: httpx (>=0.28.1)
18
+ Requires-Dist: mkdocs (>=1.5.0) ; extra == "docs"
19
+ Requires-Dist: mkdocs-material (>=9.5.0) ; extra == "docs"
20
+ Requires-Dist: mkdocstrings[python] (>=0.30.1) ; extra == "docs"
21
+ Requires-Dist: pydantic (>=2.0.0)
22
+ Requires-Dist: pyright (>=1.1.0) ; extra == "dev"
23
+ Requires-Dist: pytest (>=9.0.0) ; extra == "dev"
24
+ Requires-Dist: pytest-asyncio (>=1.3.0) ; extra == "dev"
25
+ Requires-Dist: pytest-cov (>=7.0.0) ; extra == "dev"
26
+ Requires-Dist: ruff (>=0.14.4) ; extra == "dev"
27
+ Requires-Dist: tweepy (>=4.16.0,<5.0.0)
28
+ Project-URL: Documentation, https://marqetive-lib.readthedocs.io
29
+ Project-URL: Homepage, https://github.com/yourusername/marqetive-lib
30
+ Project-URL: Issues, https://github.com/yourusername/marqetive-lib/issues
31
+ Project-URL: Repository, https://github.com/yourusername/marqetive-lib
32
+ Description-Content-Type: text/markdown
33
+
34
+ # MarqetiveLib
35
+
36
+ Modern Python library for social media platform integrations - Simple, type-safe, and async-ready.
37
+
38
+ ## Supported Platforms
39
+
40
+ - **Twitter/X** - Post tweets, upload media, manage threads
41
+ - **LinkedIn** - Share updates, upload images and videos
42
+ - **Instagram** - Create posts with media via Graph API
43
+ - **TikTok** - Upload and publish videos
44
+
45
+ ## Features
46
+
47
+ - **Unified API**: Single interface for all social media platforms
48
+ - **Async-First**: Built for modern async Python applications
49
+ - **Type-Safe**: Full type hints and Pyright compliance
50
+ - **Auto Token Refresh**: Factory handles OAuth token lifecycle automatically
51
+ - **Media Upload**: Progress tracking for large file uploads
52
+ - **Retry Logic**: Exponential backoff with jitter for transient failures
53
+ - **Well Tested**: Comprehensive test coverage
54
+
55
+ ## Installation
56
+
57
+ ```bash
58
+ pip install marqetive
59
+ ```
60
+
61
+ Or with Poetry:
62
+
63
+ ```bash
64
+ poetry add marqetive
65
+ ```
66
+
67
+ ## Quick Start
68
+
69
+ ```python
70
+ import asyncio
71
+ from marqetive import get_client, AuthCredentials, PostCreateRequest
72
+
73
+ async def main():
74
+ # Create credentials for your platform
75
+ credentials = AuthCredentials(
76
+ platform="twitter",
77
+ access_token="your_access_token",
78
+ refresh_token="your_refresh_token"
79
+ )
80
+
81
+ # Get authenticated client (auto-refreshes token if expired)
82
+ client = await get_client(credentials)
83
+
84
+ # Use client as async context manager
85
+ async with client:
86
+ request = PostCreateRequest(content="Hello from MarqetiveLib!")
87
+ post = await client.create_post(request)
88
+ print(f"Posted! ID: {post.platform_id}")
89
+
90
+ asyncio.run(main())
91
+ ```
92
+
93
+ ## Platform Examples
94
+
95
+ ### Twitter
96
+
97
+ ```python
98
+ from marqetive import get_client, AuthCredentials, PostCreateRequest
99
+
100
+ credentials = AuthCredentials(
101
+ platform="twitter",
102
+ access_token="your_access_token",
103
+ refresh_token="your_refresh_token" # Optional, for token refresh
104
+ )
105
+
106
+ client = await get_client(credentials)
107
+ async with client:
108
+ # Text post
109
+ post = await client.create_post(PostCreateRequest(content="Hello Twitter!"))
110
+
111
+ # Post with media
112
+ post = await client.create_post(PostCreateRequest(
113
+ content="Check out this image!",
114
+ media_paths=["/path/to/image.jpg"]
115
+ ))
116
+ ```
117
+
118
+ ### LinkedIn
119
+
120
+ ```python
121
+ from marqetive import get_client, AuthCredentials, PostCreateRequest
122
+
123
+ credentials = AuthCredentials(
124
+ platform="linkedin",
125
+ access_token="your_access_token",
126
+ user_id="urn:li:person:your_person_id" # Required for LinkedIn
127
+ )
128
+
129
+ client = await get_client(credentials)
130
+ async with client:
131
+ post = await client.create_post(PostCreateRequest(
132
+ content="Excited to share this update!"
133
+ ))
134
+ ```
135
+
136
+ ### Instagram
137
+
138
+ ```python
139
+ from marqetive import get_client, AuthCredentials, PostCreateRequest
140
+
141
+ credentials = AuthCredentials(
142
+ platform="instagram",
143
+ access_token="your_access_token",
144
+ user_id="your_instagram_business_account_id" # Required
145
+ )
146
+
147
+ client = await get_client(credentials)
148
+ async with client:
149
+ # Instagram requires media for posts
150
+ post = await client.create_post(PostCreateRequest(
151
+ content="Beautiful day! #photography",
152
+ media_paths=["/path/to/photo.jpg"]
153
+ ))
154
+ ```
155
+
156
+ ### TikTok
157
+
158
+ ```python
159
+ from marqetive import get_client, AuthCredentials, PostCreateRequest
160
+
161
+ credentials = AuthCredentials(
162
+ platform="tiktok",
163
+ access_token="your_access_token",
164
+ additional_data={"open_id": "your_open_id"} # Required for TikTok
165
+ )
166
+
167
+ client = await get_client(credentials)
168
+ async with client:
169
+ post = await client.create_post(PostCreateRequest(
170
+ content="Check out this video!",
171
+ media_paths=["/path/to/video.mp4"]
172
+ ))
173
+ ```
174
+
175
+ ## Using Custom OAuth Credentials
176
+
177
+ ```python
178
+ from marqetive import PlatformFactory, AuthCredentials, PostCreateRequest
179
+
180
+ # Create factory with your OAuth app credentials
181
+ factory = PlatformFactory(
182
+ twitter_client_id="your_client_id",
183
+ twitter_client_secret="your_client_secret",
184
+ linkedin_client_id="your_linkedin_client_id",
185
+ linkedin_client_secret="your_linkedin_client_secret"
186
+ )
187
+
188
+ credentials = AuthCredentials(
189
+ platform="twitter",
190
+ access_token="user_access_token",
191
+ refresh_token="user_refresh_token"
192
+ )
193
+
194
+ # Get client with automatic token refresh
195
+ client = await factory.get_client(credentials)
196
+ async with client:
197
+ post = await client.create_post(PostCreateRequest(content="Hello!"))
198
+ ```
199
+
200
+ ## Progress Tracking for Media Uploads
201
+
202
+ ```python
203
+ def progress_callback(operation: str, progress: int, total: int, message: str | None):
204
+ percent = (progress / total) * 100 if total > 0 else 0
205
+ print(f"{operation}: {percent:.1f}% - {message or ''}")
206
+
207
+ client = await get_client(credentials, progress_callback=progress_callback)
208
+ async with client:
209
+ post = await client.create_post(PostCreateRequest(
210
+ content="Uploading video...",
211
+ media_paths=["/path/to/large_video.mp4"]
212
+ ))
213
+ ```
214
+
215
+ ## Error Handling
216
+
217
+ ```python
218
+ from marqetive import get_client, AuthCredentials, PostCreateRequest
219
+ from marqetive.core.exceptions import (
220
+ PlatformError,
221
+ PlatformAuthError,
222
+ RateLimitError,
223
+ MediaUploadError
224
+ )
225
+
226
+ try:
227
+ client = await get_client(credentials)
228
+ async with client:
229
+ post = await client.create_post(request)
230
+ except PlatformAuthError as e:
231
+ print(f"Authentication failed: {e}")
232
+ # Token may need refresh or reconnection
233
+ except RateLimitError as e:
234
+ print(f"Rate limited. Retry after: {e.retry_after} seconds")
235
+ except MediaUploadError as e:
236
+ print(f"Media upload failed: {e}")
237
+ except PlatformError as e:
238
+ print(f"Platform error: {e}")
239
+ ```
240
+
241
+ ## Requirements
242
+
243
+ - Python 3.12+
244
+ - httpx >= 0.28.1
245
+ - pydantic >= 2.0.0
246
+ - tweepy >= 4.16.0
247
+ - aiofiles >= 24.0.0
248
+
249
+ ## Development
250
+
251
+ ### Setup Development Environment
252
+
253
+ ```bash
254
+ # Clone the repository
255
+ git clone https://github.com/your-org/marqetive-lib.git
256
+ cd marqetive-lib
257
+
258
+ # Install Poetry if you haven't already
259
+ curl -sSL https://install.python-poetry.org | python3 -
260
+
261
+ # Install dependencies
262
+ poetry install --with dev,docs
263
+
264
+ # Activate virtual environment
265
+ poetry shell
266
+ ```
267
+
268
+ ### Running Tests
269
+
270
+ ```bash
271
+ # Run tests
272
+ poetry run pytest
273
+
274
+ # Run tests with coverage
275
+ poetry run pytest --cov=src/marqetive --cov-report=term-missing
276
+
277
+ # Run platform-specific tests
278
+ poetry run pytest tests/platforms/test_twitter.py
279
+ ```
280
+
281
+ ### Code Quality
282
+
283
+ ```bash
284
+ # Lint code with Ruff
285
+ poetry run ruff check .
286
+
287
+ # Format code with Ruff
288
+ poetry run ruff format .
289
+
290
+ # Type check with Pyright
291
+ poetry run pyright src/
292
+ ```
293
+
294
+ ## License
295
+
296
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
297
+
@@ -0,0 +1,35 @@
1
+ marqetive/__init__.py,sha256=TPjbyZ8ZRux2b6GqSG_7w9A7auPaTkxlamcfYIz0XVw,2907
2
+ marqetive/core/__init__.py,sha256=8n-Ys3qR4wcGUV2rZTz68ICknD1GrkYz82SxLo-dods,1129
3
+ marqetive/core/base.py,sha256=CKNTA6nErZ_Fx8uPtWxgNY054kmSTlGXL81zaF2d0R0,13248
4
+ marqetive/core/client.py,sha256=2_FoNpqaRglsWg10i5RTbyDg_kRQKhgWjYs6iDdFxLg,3210
5
+ marqetive/core/exceptions.py,sha256=Xyj0bzNiZm5VTErmzXgVW8T6IQnOpF92-HJiKPKjIio,7076
6
+ marqetive/core/models.py,sha256=W_yOuRWItWSn82n8vXRNN_ScdNkzY1De2qqXaVN2RGU,10974
7
+ marqetive/factory.py,sha256=irZ5oN8a__kXZH70UN2uI7TzqTXu66d4QZ1FoxSoiK8,14092
8
+ marqetive/platforms/__init__.py,sha256=RBxlQSGyELsulSnwf5uaE1ohxFc7jC61OO9CrKaZp48,1312
9
+ marqetive/platforms/instagram/__init__.py,sha256=7ClfTovAcCHac2DzKS7z1MFuZpy9lcwet7YP5d6MPeY,135
10
+ marqetive/platforms/instagram/client.py,sha256=C5T9v1Aina8F3_Dk3d_I_RiVt7VvxTwwqdYeizDr0iQ,25187
11
+ marqetive/platforms/instagram/exceptions.py,sha256=TcD_pX4eSx_k4yW8DgfA6SGPiAz3VW7cMqM8DmiXIhg,8978
12
+ marqetive/platforms/instagram/media.py,sha256=sZKbBpTac4hIR3OvVV3wL21uHOSQUUpBBKXrvC1zXPc,21161
13
+ marqetive/platforms/linkedin/__init__.py,sha256=zCnokoPYs56iA1sBSYIlaZW2J50L3CbnQpJSaOLrzP8,131
14
+ marqetive/platforms/linkedin/client.py,sha256=cU22ympiWxDPXSUIB0juAQUV3RCpBg-m2nb4D38N5Go,23806
15
+ marqetive/platforms/linkedin/exceptions.py,sha256=i5fARUkZik46bS3htZBwUInVzetsZx1APpKEXLrCKf0,9762
16
+ marqetive/platforms/linkedin/media.py,sha256=lYUKJWbI3mOsvdSOZfUytc4BWb_nIf4YjiKNpC7EpT0,16896
17
+ marqetive/platforms/tiktok/__init__.py,sha256=BQtxdECd2bW9_vV9W-MY4A1rdXi_xurGWWmzTjTUpMM,123
18
+ marqetive/platforms/tiktok/client.py,sha256=i_nyhVywh4feFu5vv4LrMQOkoLsxfxgpH6aKa9JjdOc,17060
19
+ marqetive/platforms/tiktok/exceptions.py,sha256=vxwyAKujMGZJh0LetG1QsLF95QfUs_kR6ujsWSHGqL0,10124
20
+ marqetive/platforms/tiktok/media.py,sha256=p42E0D3bp9x0RgdK7lqcBl2v5G70ZOpY4JTYS-oCgD4,23766
21
+ marqetive/platforms/twitter/__init__.py,sha256=AA5BELRvZyl2WE_7-puSEWArxZjaXcTJ_i8NGOWrv6k,129
22
+ marqetive/platforms/twitter/client.py,sha256=nVXFU1nZBimjzxq0uwCzi0hQy7tdkbW42bbV_A2w8jk,19627
23
+ marqetive/platforms/twitter/exceptions.py,sha256=eZ-dJKOXH_-bAMg29zWKbEqMFud29piEJ5IWfC9wFts,8926
24
+ marqetive/platforms/twitter/media.py,sha256=N8f9UZv1JPJoFDTrPOrvxqdShFU-DQPFBScBoCrZci4,24963
25
+ marqetive/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
+ marqetive/utils/__init__.py,sha256=bSrNajbxYBSKQayrPviLz8JeGjplnyK8y_NGDtgb7yQ,977
27
+ marqetive/utils/file_handlers.py,sha256=4TP5kmWofNTSZmlS683CM1UYP83WvRd_NubMbqtXv-g,12568
28
+ marqetive/utils/helpers.py,sha256=8-ljhL47SremKcQO2GF8DIHOPODEv1rSioVNuSPCbec,2634
29
+ marqetive/utils/media.py,sha256=Rvxw9XKU65n-z4G1bEihG3wXZBmjSDZUqClfjGFrg6k,12013
30
+ marqetive/utils/oauth.py,sha256=LQLXpThZUe0XbSpO3dJ5oW3sPRJuKjSk3_f5_3baUzA,12095
31
+ marqetive/utils/retry.py,sha256=lAniJLMNWp9XsHrvU0XBNifpNEjfde4MGfd5hlFTPfA,7636
32
+ marqetive/utils/token_validator.py,sha256=dNvDeHs2Du5UyMMH2ZOW6ydR7OwOEKA4c9e-rG0f9-0,6698
33
+ marqetive_lib-0.1.6.dist-info/METADATA,sha256=Xf_dBnNYwqOSf9GHJuormIVzyb1oRAJI_zQOsebTOxE,7986
34
+ marqetive_lib-0.1.6.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
35
+ marqetive_lib-0.1.6.dist-info/RECORD,,
@@ -1,260 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: marqetive-lib
3
- Version: 0.1.4
4
- Summary: Modern Python utilities for web APIs
5
- Keywords: api,utilities,web,http,marqetive
6
- Requires-Python: >=3.12
7
- Classifier: Development Status :: 3 - Alpha
8
- Classifier: Intended Audience :: Developers
9
- Classifier: Programming Language :: Python :: 3
10
- Classifier: Programming Language :: Python :: 3.12
11
- Classifier: Programming Language :: Python :: 3.13
12
- Classifier: Topic :: Internet :: WWW/HTTP
13
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
14
- Provides-Extra: dev
15
- Provides-Extra: docs
16
- Requires-Dist: aiofiles (>=24.0.0)
17
- Requires-Dist: httpx (>=0.28.1)
18
- Requires-Dist: mkdocs (>=1.5.0) ; extra == "docs"
19
- Requires-Dist: mkdocs-material (>=9.5.0) ; extra == "docs"
20
- Requires-Dist: mkdocstrings[python] (>=0.30.1) ; extra == "docs"
21
- Requires-Dist: pydantic (>=2.0.0)
22
- Requires-Dist: pyright (>=1.1.0) ; extra == "dev"
23
- Requires-Dist: pytest (>=9.0.0) ; extra == "dev"
24
- Requires-Dist: pytest-asyncio (>=1.3.0) ; extra == "dev"
25
- Requires-Dist: pytest-cov (>=7.0.0) ; extra == "dev"
26
- Requires-Dist: ruff (>=0.14.4) ; extra == "dev"
27
- Requires-Dist: tweepy (>=4.16.0,<5.0.0)
28
- Project-URL: Documentation, https://marqetive-lib.readthedocs.io
29
- Project-URL: Homepage, https://github.com/yourusername/marqetive-lib
30
- Project-URL: Issues, https://github.com/yourusername/marqetive-lib/issues
31
- Project-URL: Repository, https://github.com/yourusername/marqetive-lib
32
- Description-Content-Type: text/markdown
33
-
34
- # MarqetiveLib
35
-
36
- [![CI](https://github.com/yourusername/marqetive-lib/workflows/CI/badge.svg)](https://github.com/yourusername/marqetive-lib/actions)
37
- [![codecov](https://codecov.io/gh/yourusername/marqetive-lib/branch/main/graph/badge.svg)](https://codecov.io/gh/yourusername/marqetive-lib)
38
- [![PyPI version](https://badge.fury.io/py/marqetive-lib.svg)](https://badge.fury.io/py/marqetive-lib)
39
- [![Python versions](https://img.shields.io/pypi/pyversions/marqetive-lib.svg)](https://pypi.org/project/marqetive-lib/)
40
- [![License](https://img.shields.io/github/license/yourusername/marqetive-lib.svg)](https://github.com/yourusername/marqetive-lib/blob/main/LICENSE)
41
- [![Documentation](https://img.shields.io/badge/docs-latest-blue.svg)](https://marqetive-lib.readthedocs.io)
42
-
43
- Modern Python utilities for web APIs - Simple, type-safe, and async-ready.
44
-
45
- ## Features
46
-
47
- - **🚀 Fast and Lightweight**: Built on httpx with minimal dependencies
48
- - **🔒 Type-Safe**: Full type hints and Pyright compliance for better IDE support
49
- - **📦 Zero Learning Curve**: Intuitive API design that feels natural
50
- - **🧪 Well Tested**: Comprehensive test coverage (>90%)
51
- - **📚 Excellent Documentation**: Clear examples and detailed API reference
52
- - **🔄 Async/Await Support**: Built for modern async Python applications
53
- - **✨ Developer Friendly**: Great error messages and helpful utilities
54
-
55
- ## Installation
56
-
57
- ```bash
58
- pip install marqetive-lib
59
- ```
60
-
61
- Or with Poetry:
62
-
63
- ```bash
64
- poetry add marqetive-lib
65
- ```
66
-
67
- ## Quick Start
68
-
69
- ```python
70
- import asyncio
71
- from marqetive_lib import APIClient
72
-
73
- async def main():
74
- async with APIClient(base_url="https://api.example.com") as client:
75
- # Make a GET request
76
- response = await client.get("/users/1")
77
- print(f"User: {response.data['name']}")
78
-
79
- # Make a POST request
80
- new_user = {"name": "John Doe", "email": "john@example.com"}
81
- response = await client.post("/users", data=new_user)
82
- print(f"Created user ID: {response.data['id']}")
83
-
84
- asyncio.run(main())
85
- ```
86
-
87
- ## Core Features
88
-
89
- ### Simple HTTP Client
90
-
91
- ```python
92
- from marqetive_lib import APIClient
93
-
94
- async with APIClient(base_url="https://api.example.com") as client:
95
- # GET request with query parameters
96
- response = await client.get("/search", params={"q": "python"})
97
-
98
- # POST request with JSON body
99
- response = await client.post("/users", data={"name": "Alice"})
100
-
101
- # Access response details
102
- print(response.status_code) # 200
103
- print(response.data) # Parsed JSON response
104
- print(response.headers) # Response headers
105
- ```
106
-
107
- ### Utility Functions
108
-
109
- ```python
110
- from marqetive_lib.utils import (
111
- format_response,
112
- parse_query_params,
113
- build_query_string,
114
- merge_headers
115
- )
116
-
117
- # Format JSON responses beautifully
118
- data = {"users": [{"id": 1, "name": "Alice"}]}
119
- print(format_response(data, pretty=True, indent=2))
120
-
121
- # Parse URL query parameters
122
- params = parse_query_params("https://api.com/search?q=python&page=1")
123
- # {'q': ['python'], 'page': ['1']}
124
-
125
- # Build query strings
126
- query = build_query_string({"search": "api", "limit": 10})
127
- # "search=api&limit=10"
128
-
129
- # Merge HTTP headers
130
- headers = merge_headers(
131
- {"Content-Type": "application/json"},
132
- {"Authorization": "Bearer token"}
133
- )
134
- ```
135
-
136
- ### Type-Safe Responses
137
-
138
- ```python
139
- from marqetive_lib import APIClient
140
- from pydantic import BaseModel
141
-
142
- class User(BaseModel):
143
- id: int
144
- name: str
145
- email: str
146
-
147
- async with APIClient(base_url="https://api.example.com") as client:
148
- response = await client.get("/users/1")
149
- user = User(**response.data) # Automatic validation
150
- print(user.name)
151
- ```
152
-
153
- ## Documentation
154
-
155
- Full documentation is available at [marqetive-lib.readthedocs.io](https://marqetive-lib.readthedocs.io)
156
-
157
- - [Getting Started Guide](https://marqetive-lib.readthedocs.io/getting-started/)
158
- - [API Reference](https://marqetive-lib.readthedocs.io/api/core/)
159
- - [Examples](https://marqetive-lib.readthedocs.io/examples/basic/)
160
- - [Contributing Guide](https://marqetive-lib.readthedocs.io/contributing/)
161
-
162
- ## Requirements
163
-
164
- - Python 3.9+
165
- - httpx >= 0.27.0
166
- - pydantic >= 2.0.0
167
-
168
- ## Development
169
-
170
- ### Setup Development Environment
171
-
172
- ```bash
173
- # Clone the repository
174
- git clone https://github.com/yourusername/marqetive-lib.git
175
- cd marqetive-lib
176
-
177
- # Install Poetry if you haven't already
178
- curl -sSL https://install.python-poetry.org | python3 -
179
-
180
- # Install dependencies
181
- poetry install --with dev,docs
182
-
183
- # Activate virtual environment
184
- poetry shell
185
- ```
186
-
187
- ### Running Tests
188
-
189
- ```bash
190
- # Run tests
191
- poetry run pytest
192
-
193
- # Run tests with coverage
194
- poetry run pytest --cov=src/marqetive_lib --cov-report=term-missing
195
-
196
- # Run tests for specific Python versions
197
- poetry run tox
198
- ```
199
-
200
- ### Code Quality
201
-
202
- ```bash
203
- # Lint code with Ruff
204
- poetry run ruff check .
205
-
206
- # Format code with Ruff
207
- poetry run ruff format .
208
-
209
- # Type check with Pyright
210
- poetry run pyright src/
211
- ```
212
-
213
- ### Building Documentation
214
-
215
- ```bash
216
- # Serve documentation locally with live reload
217
- poetry run mkdocs serve
218
-
219
- # Build static documentation
220
- poetry run mkdocs build
221
- ```
222
-
223
- ## Contributing
224
-
225
- Contributions are welcome! Please read our [Contributing Guide](CONTRIBUTING.md) for details on:
226
-
227
- - Code of conduct
228
- - Development workflow
229
- - Code style guidelines
230
- - Testing requirements
231
- - Pull request process
232
-
233
- ## Changelog
234
-
235
- See [CHANGELOG.md](CHANGELOG.md) for a list of changes in each release.
236
-
237
- ## License
238
-
239
- This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
240
-
241
- ## Acknowledgments
242
-
243
- - Built with [httpx](https://www.python-httpx.org/) for HTTP requests
244
- - Uses [Pydantic](https://docs.pydantic.dev/) for data validation
245
- - Tested with [pytest](https://pytest.org/)
246
- - Documentation powered by [MkDocs Material](https://squidfunk.github.io/mkdocs-material/)
247
-
248
- ## Support
249
-
250
- - **Documentation**: [marqetive-lib.readthedocs.io](https://marqetive-lib.readthedocs.io)
251
- - **Issues**: [GitHub Issues](https://github.com/yourusername/marqetive-lib/issues)
252
- - **Discussions**: [GitHub Discussions](https://github.com/yourusername/marqetive-lib/discussions)
253
-
254
- ## Links
255
-
256
- - **PyPI**: [pypi.org/project/marqetive-lib](https://pypi.org/project/marqetive-lib/)
257
- - **Source Code**: [github.com/yourusername/marqetive-lib](https://github.com/yourusername/marqetive-lib)
258
- - **Documentation**: [marqetive-lib.readthedocs.io](https://marqetive-lib.readthedocs.io)
259
- - **Changelog**: [CHANGELOG.md](CHANGELOG.md)
260
-
@@ -1,35 +0,0 @@
1
- marqetive/__init__.py,sha256=LaGrC2HSkbpJBj9mKWuVOflTSN1upTzHowZm6Aw0nOY,2923
2
- marqetive/core/__init__.py,sha256=qOC6JhGjWOpj9_7umtc6VGH16ZJZE6iNDhA6iDZm8kg,113
3
- marqetive/core/client.py,sha256=2_FoNpqaRglsWg10i5RTbyDg_kRQKhgWjYs6iDdFxLg,3210
4
- marqetive/factory.py,sha256=W-8O7eowx_M5ykmL9ZEnjZVoMqNKq8rsDWpyU6X7mxg,14107
5
- marqetive/platforms/__init__.py,sha256=jMzSg8fI5nCO20aTNaoF6cQ6RIZoxzVhEDvq3ZpAbXc,1327
6
- marqetive/platforms/base.py,sha256=o0bY9tcV350uGYOHpo3SbSYI61gvx6Ll9KyHaSYFXko,13258
7
- marqetive/platforms/exceptions.py,sha256=Xyj0bzNiZm5VTErmzXgVW8T6IQnOpF92-HJiKPKjIio,7076
8
- marqetive/platforms/instagram/__init__.py,sha256=7ClfTovAcCHac2DzKS7z1MFuZpy9lcwet7YP5d6MPeY,135
9
- marqetive/platforms/instagram/client.py,sha256=Y7jnIDoIRnzwP3QtubwKd8aRi89zrxr5ZLgCqS43xwI,25202
10
- marqetive/platforms/instagram/exceptions.py,sha256=zwTc90VbG8uz_6O5bKw68Pp53SoevLQUqPiXj4ZgThU,8983
11
- marqetive/platforms/instagram/media.py,sha256=JDRFB66UlhSjAf0PFR3raGqYxtNTSd5yIZ_2xTGmZRk,21166
12
- marqetive/platforms/linkedin/__init__.py,sha256=zCnokoPYs56iA1sBSYIlaZW2J50L3CbnQpJSaOLrzP8,131
13
- marqetive/platforms/linkedin/client.py,sha256=GSWUq66KkerS4H9Vh8j3F6KrMzrlz1DYokbERNyrrCc,23821
14
- marqetive/platforms/linkedin/exceptions.py,sha256=WHjMZ-XJnKgT6uzzi7LXqFt4lD7nSCjzMzaqtOQA3hM,9767
15
- marqetive/platforms/linkedin/media.py,sha256=360OT1sdBuJRjuL3wJ-T1irAX5gHmcf4AwAU__cvwwA,16901
16
- marqetive/platforms/models.py,sha256=W_yOuRWItWSn82n8vXRNN_ScdNkzY1De2qqXaVN2RGU,10974
17
- marqetive/platforms/tiktok/__init__.py,sha256=BQtxdECd2bW9_vV9W-MY4A1rdXi_xurGWWmzTjTUpMM,123
18
- marqetive/platforms/tiktok/client.py,sha256=UkljwzrSybIgm4opT5ItT_EXdGx3OGbV4ig8yPoaCbM,17041
19
- marqetive/platforms/tiktok/exceptions.py,sha256=yOjkZgHyo_t9Chrhws_2n-2sbiDDkCUBv5fdW2nfiHI,10129
20
- marqetive/platforms/tiktok/media.py,sha256=pAT9AVZX7ZnAnhgoameFLszKDyX16nY43we_CHc5z9s,23771
21
- marqetive/platforms/twitter/__init__.py,sha256=AA5BELRvZyl2WE_7-puSEWArxZjaXcTJ_i8NGOWrv6k,129
22
- marqetive/platforms/twitter/client.py,sha256=vZ9wvFPaTOuBD-L48RD1UH6MCPZoF2EHRvFWe0m_cfc,19642
23
- marqetive/platforms/twitter/exceptions.py,sha256=aKrjUZL07KWQ8hatj5-U7UfnSTl-n8DnTgGGigYCrIY,8931
24
- marqetive/platforms/twitter/media.py,sha256=16atvKwSukvK_YC_gIm2qsl3pmidWEBAwIfJBPG9HQo,24968
25
- marqetive/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
- marqetive/utils/__init__.py,sha256=bSrNajbxYBSKQayrPviLz8JeGjplnyK8y_NGDtgb7yQ,977
27
- marqetive/utils/file_handlers.py,sha256=4TP5kmWofNTSZmlS683CM1UYP83WvRd_NubMbqtXv-g,12568
28
- marqetive/utils/helpers.py,sha256=8-ljhL47SremKcQO2GF8DIHOPODEv1rSioVNuSPCbec,2634
29
- marqetive/utils/media.py,sha256=Rvxw9XKU65n-z4G1bEihG3wXZBmjSDZUqClfjGFrg6k,12013
30
- marqetive/utils/oauth.py,sha256=NjHh3o5iKlXMJmzSFJHq-pn5yn82DvmpB7DMTJT0ht8,12105
31
- marqetive/utils/retry.py,sha256=lAniJLMNWp9XsHrvU0XBNifpNEjfde4MGfd5hlFTPfA,7636
32
- marqetive/utils/token_validator.py,sha256=pNimFr_FNJLcYGV5oADhoBjflKfEbLQ3Epwnwg_nTbg,6703
33
- marqetive_lib-0.1.4.dist-info/METADATA,sha256=KawBEFdT6w-WUGCF5ulti5nfi6cWer0oOqP-DFXDDaM,7798
34
- marqetive_lib-0.1.4.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
35
- marqetive_lib-0.1.4.dist-info/RECORD,,
File without changes
File without changes