marqetive-lib 0.1.4__tar.gz → 0.1.5__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 (36) hide show
  1. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/PKG-INFO +1 -1
  2. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/pyproject.toml +1 -1
  3. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/__init__.py +7 -8
  4. marqetive_lib-0.1.5/src/marqetive/core/__init__.py +54 -0
  5. {marqetive_lib-0.1.4/src/marqetive/platforms → marqetive_lib-0.1.5/src/marqetive/core}/base.py +2 -2
  6. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/factory.py +3 -3
  7. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/__init__.py +3 -3
  8. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/instagram/client.py +7 -7
  9. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/instagram/exceptions.py +1 -1
  10. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/instagram/media.py +1 -1
  11. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/linkedin/client.py +4 -4
  12. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/linkedin/exceptions.py +1 -1
  13. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/linkedin/media.py +1 -1
  14. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/tiktok/client.py +9 -5
  15. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/tiktok/exceptions.py +1 -1
  16. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/tiktok/media.py +1 -1
  17. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/twitter/client.py +3 -3
  18. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/twitter/exceptions.py +1 -1
  19. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/twitter/media.py +1 -1
  20. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/utils/oauth.py +2 -2
  21. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/utils/token_validator.py +1 -1
  22. marqetive_lib-0.1.4/src/marqetive/core/__init__.py +0 -5
  23. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/README.md +0 -0
  24. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/core/client.py +0 -0
  25. {marqetive_lib-0.1.4/src/marqetive/platforms → marqetive_lib-0.1.5/src/marqetive/core}/exceptions.py +0 -0
  26. {marqetive_lib-0.1.4/src/marqetive/platforms → marqetive_lib-0.1.5/src/marqetive/core}/models.py +0 -0
  27. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/instagram/__init__.py +0 -0
  28. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/linkedin/__init__.py +0 -0
  29. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/tiktok/__init__.py +0 -0
  30. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/platforms/twitter/__init__.py +0 -0
  31. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/py.typed +0 -0
  32. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/utils/__init__.py +0 -0
  33. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/utils/file_handlers.py +0 -0
  34. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/utils/helpers.py +0 -0
  35. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/utils/media.py +0 -0
  36. {marqetive_lib-0.1.4 → marqetive_lib-0.1.5}/src/marqetive/utils/retry.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: marqetive-lib
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: Modern Python utilities for web APIs
5
5
  Keywords: api,utilities,web,http,marqetive
6
6
  Requires-Python: >=3.12
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
4
4
 
5
5
  [project]
6
6
  name = "marqetive-lib"
7
- version = "0.1.4"
7
+ version = "0.1.5"
8
8
  description = "Modern Python utilities for web APIs"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.12"
@@ -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
 
@@ -0,0 +1,54 @@
1
+ """Core functionality for MarqetiveLib."""
2
+
3
+ from marqetive.core.base import ProgressCallback, SocialMediaPlatform
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
+ )
27
+
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,
@@ -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
  )
@@ -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(
@@ -1,5 +0,0 @@
1
- """Core functionality for MarqetiveLib."""
2
-
3
- from marqetive.core.client import APIClient
4
-
5
- __all__ = ["APIClient"]
File without changes