marqetive-lib 0.1.2__py3-none-any.whl → 0.1.4__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 +58 -59
- marqetive/core/__init__.py +1 -1
- marqetive/factory.py +380 -0
- marqetive/platforms/__init__.py +6 -6
- marqetive/platforms/base.py +36 -3
- marqetive/platforms/instagram/__init__.py +2 -4
- marqetive/platforms/instagram/client.py +8 -4
- marqetive/platforms/instagram/exceptions.py +1 -1
- marqetive/platforms/instagram/media.py +2 -2
- marqetive/platforms/linkedin/__init__.py +2 -4
- marqetive/platforms/linkedin/client.py +8 -4
- marqetive/platforms/linkedin/exceptions.py +1 -1
- marqetive/platforms/linkedin/media.py +4 -4
- marqetive/platforms/tiktok/__init__.py +2 -4
- marqetive/platforms/tiktok/client.py +324 -104
- marqetive/platforms/tiktok/exceptions.py +170 -66
- marqetive/platforms/tiktok/media.py +545 -159
- marqetive/platforms/twitter/__init__.py +2 -4
- marqetive/platforms/twitter/client.py +11 -53
- marqetive/platforms/twitter/exceptions.py +1 -1
- marqetive/platforms/twitter/media.py +4 -4
- marqetive/utils/__init__.py +3 -3
- marqetive/utils/file_handlers.py +1 -1
- marqetive/utils/oauth.py +2 -2
- marqetive/utils/token_validator.py +1 -1
- {marqetive_lib-0.1.2.dist-info → marqetive_lib-0.1.4.dist-info}/METADATA +1 -1
- marqetive_lib-0.1.4.dist-info/RECORD +35 -0
- marqetive/core/account_factory.py +0 -212
- marqetive/core/base_manager.py +0 -303
- marqetive/core/progress.py +0 -291
- marqetive/core/registry.py +0 -257
- marqetive/platforms/instagram/factory.py +0 -106
- marqetive/platforms/instagram/manager.py +0 -112
- marqetive/platforms/linkedin/factory.py +0 -130
- marqetive/platforms/linkedin/manager.py +0 -119
- marqetive/platforms/tiktok/factory.py +0 -188
- marqetive/platforms/tiktok/manager.py +0 -115
- marqetive/platforms/twitter/factory.py +0 -151
- marqetive/platforms/twitter/manager.py +0 -121
- marqetive/platforms/twitter/threads.py +0 -442
- marqetive/registry_init.py +0 -66
- marqetive_lib-0.1.2.dist-info/RECORD +0 -48
- {marqetive_lib-0.1.2.dist-info → marqetive_lib-0.1.4.dist-info}/WHEEL +0 -0
|
@@ -12,19 +12,19 @@ from typing import Any, Literal, cast
|
|
|
12
12
|
import httpx
|
|
13
13
|
from pydantic import HttpUrl
|
|
14
14
|
|
|
15
|
-
from
|
|
16
|
-
from
|
|
15
|
+
from marqetive.platforms.base import ProgressCallback, SocialMediaPlatform
|
|
16
|
+
from marqetive.platforms.exceptions import (
|
|
17
17
|
MediaUploadError,
|
|
18
18
|
PlatformAuthError,
|
|
19
19
|
PlatformError,
|
|
20
20
|
PostNotFoundError,
|
|
21
21
|
ValidationError,
|
|
22
22
|
)
|
|
23
|
-
from
|
|
23
|
+
from marqetive.platforms.instagram.media import (
|
|
24
24
|
InstagramMediaManager,
|
|
25
25
|
MediaItem,
|
|
26
26
|
)
|
|
27
|
-
from
|
|
27
|
+
from marqetive.platforms.models import (
|
|
28
28
|
AuthCredentials,
|
|
29
29
|
Comment,
|
|
30
30
|
CommentStatus,
|
|
@@ -69,6 +69,7 @@ class InstagramClient(SocialMediaPlatform):
|
|
|
69
69
|
credentials: AuthCredentials,
|
|
70
70
|
timeout: float = 30.0,
|
|
71
71
|
api_version: str = "v21.0",
|
|
72
|
+
progress_callback: ProgressCallback | None = None,
|
|
72
73
|
) -> None:
|
|
73
74
|
"""Initialize Instagram client.
|
|
74
75
|
|
|
@@ -76,6 +77,8 @@ class InstagramClient(SocialMediaPlatform):
|
|
|
76
77
|
credentials: Instagram authentication credentials
|
|
77
78
|
timeout: Request timeout in seconds
|
|
78
79
|
api_version: Instagram Graph API version
|
|
80
|
+
progress_callback: Optional callback for progress updates during
|
|
81
|
+
long-running operations like media uploads.
|
|
79
82
|
|
|
80
83
|
Raises:
|
|
81
84
|
PlatformAuthError: If credentials are invalid
|
|
@@ -86,6 +89,7 @@ class InstagramClient(SocialMediaPlatform):
|
|
|
86
89
|
credentials=credentials,
|
|
87
90
|
base_url=base_url,
|
|
88
91
|
timeout=timeout,
|
|
92
|
+
progress_callback=progress_callback,
|
|
89
93
|
)
|
|
90
94
|
self.instagram_account_id = credentials.user_id
|
|
91
95
|
self.api_version = api_version
|
|
@@ -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
|
|
8
|
+
from marqetive.platforms.exceptions import (
|
|
9
9
|
MediaUploadError,
|
|
10
10
|
PlatformAuthError,
|
|
11
11
|
PlatformError,
|
|
@@ -19,11 +19,11 @@ from typing import Any, Literal
|
|
|
19
19
|
|
|
20
20
|
import httpx
|
|
21
21
|
|
|
22
|
-
from
|
|
22
|
+
from marqetive.platforms.exceptions import (
|
|
23
23
|
MediaUploadError,
|
|
24
24
|
ValidationError,
|
|
25
25
|
)
|
|
26
|
-
from
|
|
26
|
+
from marqetive.utils.retry import STANDARD_BACKOFF, retry_async
|
|
27
27
|
|
|
28
28
|
logger = logging.getLogger(__name__)
|
|
29
29
|
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"""LinkedIn platform integration."""
|
|
2
2
|
|
|
3
|
-
from
|
|
4
|
-
from src.marqetive.platforms.linkedin.factory import LinkedInAccountFactory
|
|
5
|
-
from src.marqetive.platforms.linkedin.manager import LinkedInPostManager
|
|
3
|
+
from marqetive.platforms.linkedin.client import LinkedInClient
|
|
6
4
|
|
|
7
|
-
__all__ = ["LinkedInClient"
|
|
5
|
+
__all__ = ["LinkedInClient"]
|
|
@@ -12,16 +12,16 @@ from typing import Any, cast
|
|
|
12
12
|
import httpx
|
|
13
13
|
from pydantic import HttpUrl
|
|
14
14
|
|
|
15
|
-
from
|
|
16
|
-
from
|
|
15
|
+
from marqetive.platforms.base import ProgressCallback, SocialMediaPlatform
|
|
16
|
+
from marqetive.platforms.exceptions import (
|
|
17
17
|
MediaUploadError,
|
|
18
18
|
PlatformAuthError,
|
|
19
19
|
PlatformError,
|
|
20
20
|
PostNotFoundError,
|
|
21
21
|
ValidationError,
|
|
22
22
|
)
|
|
23
|
-
from
|
|
24
|
-
from
|
|
23
|
+
from marqetive.platforms.linkedin.media import LinkedInMediaManager, MediaAsset
|
|
24
|
+
from marqetive.platforms.models import (
|
|
25
25
|
AuthCredentials,
|
|
26
26
|
Comment,
|
|
27
27
|
CommentStatus,
|
|
@@ -66,6 +66,7 @@ class LinkedInClient(SocialMediaPlatform):
|
|
|
66
66
|
credentials: AuthCredentials,
|
|
67
67
|
timeout: float = 30.0,
|
|
68
68
|
api_version: str = "v2",
|
|
69
|
+
progress_callback: ProgressCallback | None = None,
|
|
69
70
|
) -> None:
|
|
70
71
|
"""Initialize LinkedIn client.
|
|
71
72
|
|
|
@@ -73,6 +74,8 @@ class LinkedInClient(SocialMediaPlatform):
|
|
|
73
74
|
credentials: LinkedIn authentication credentials
|
|
74
75
|
timeout: Request timeout in seconds
|
|
75
76
|
api_version: LinkedIn API version
|
|
77
|
+
progress_callback: Optional callback for progress updates during
|
|
78
|
+
long-running operations like media uploads.
|
|
76
79
|
|
|
77
80
|
Raises:
|
|
78
81
|
PlatformAuthError: If credentials are invalid
|
|
@@ -83,6 +86,7 @@ class LinkedInClient(SocialMediaPlatform):
|
|
|
83
86
|
credentials=credentials,
|
|
84
87
|
base_url=base_url,
|
|
85
88
|
timeout=timeout,
|
|
89
|
+
progress_callback=progress_callback,
|
|
86
90
|
)
|
|
87
91
|
self.author_urn = (
|
|
88
92
|
credentials.user_id
|
|
@@ -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
|
|
12
|
+
from marqetive.platforms.exceptions import (
|
|
13
13
|
MediaUploadError,
|
|
14
14
|
PlatformAuthError,
|
|
15
15
|
PlatformError,
|
|
@@ -20,13 +20,13 @@ from typing import Any, Literal
|
|
|
20
20
|
|
|
21
21
|
import httpx
|
|
22
22
|
|
|
23
|
-
from
|
|
23
|
+
from marqetive.platforms.exceptions import (
|
|
24
24
|
MediaUploadError,
|
|
25
25
|
ValidationError,
|
|
26
26
|
)
|
|
27
|
-
from
|
|
28
|
-
from
|
|
29
|
-
from
|
|
27
|
+
from marqetive.utils.file_handlers import download_file, read_file_bytes
|
|
28
|
+
from marqetive.utils.media import detect_mime_type, format_file_size
|
|
29
|
+
from marqetive.utils.retry import STANDARD_BACKOFF, retry_async
|
|
30
30
|
|
|
31
31
|
logger = logging.getLogger(__name__)
|
|
32
32
|
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
"""TikTok platform integration."""
|
|
2
2
|
|
|
3
|
-
from
|
|
4
|
-
from src.marqetive.platforms.tiktok.factory import TikTokAccountFactory
|
|
5
|
-
from src.marqetive.platforms.tiktok.manager import TikTokPostManager
|
|
3
|
+
from marqetive.platforms.tiktok.client import TikTokClient
|
|
6
4
|
|
|
7
|
-
__all__ = ["TikTokClient"
|
|
5
|
+
__all__ = ["TikTokClient"]
|