marqetive-lib 0.2.1__py3-none-any.whl → 0.2.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.
marqetive/__init__.py CHANGED
@@ -80,7 +80,7 @@ from marqetive.utils.helpers import format_response
80
80
  # Retry utilities
81
81
  from marqetive.utils.retry import STANDARD_BACKOFF, BackoffConfig, retry_async
82
82
 
83
- __version__ = "0.2.1"
83
+ __version__ = "0.2.2"
84
84
 
85
85
  __all__ = [
86
86
  # Core
marqetive/core/base.py CHANGED
@@ -389,6 +389,7 @@ class SocialMediaPlatform(ABC):
389
389
  async def create_thread(
390
390
  self,
391
391
  posts: list[PostCreateRequest],
392
+ cancellation_check: Callable[[], Awaitable[bool]] | None = None,
392
393
  ) -> list[Post]:
393
394
  """Create a thread of connected posts.
394
395
 
@@ -400,6 +401,8 @@ class SocialMediaPlatform(ABC):
400
401
  posts: List of post requests to create as a thread.
401
402
  Each post can have its own content, media, etc.
402
403
  First post is the head of the thread.
404
+ cancellation_check: Optional async callback that returns True if the
405
+ thread creation should be cancelled. Called before each post.
403
406
 
404
407
  Returns:
405
408
  List of Post objects for each post in the thread.
@@ -408,6 +411,7 @@ class SocialMediaPlatform(ABC):
408
411
  NotImplementedError: If platform doesn't support threads.
409
412
  ValidationError: If posts list is empty.
410
413
  PlatformAuthError: If not authenticated.
414
+ ThreadCancelledException: If cancelled mid-thread (includes posted items).
411
415
 
412
416
  Example:
413
417
  >>> # Twitter thread example
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: marqetive-lib
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: Modern Python utilities for web APIs
5
5
  Keywords: api,utilities,web,http,marqetive
6
6
  Requires-Python: >=3.12
@@ -1,6 +1,6 @@
1
- marqetive/__init__.py,sha256=oAbgnTV2fTfnocxwampca87E3HTY_DclPv-rjOCQlhM,3298
1
+ marqetive/__init__.py,sha256=l6OOmL2ndYls4GKWIARKlKoZupNVrYsVQwUGNRai-TI,3298
2
2
  marqetive/core/__init__.py,sha256=0_0vzxJ619YIJkz1yzSvhnGDJRkrErs_QSg2q3Bloss,1172
3
- marqetive/core/base.py,sha256=PXq1u0QT3oKC338-QJXu0gebXI1n6v5MCGgLi2Kt-Sg,20001
3
+ marqetive/core/base.py,sha256=I2pRHJWIizSgUtGum1pW1TrJwCRgLE5vljLmJI7Z2Og,20323
4
4
  marqetive/core/client.py,sha256=eCtvL100dkxYQHC_TJzHbs3dGjgsa_me9VTHo-CUN2M,3900
5
5
  marqetive/core/exceptions.py,sha256=h4boyxGY2tUQXMfnDcpVzAKVW71VpqvOZtGkQ-oVkYM,9710
6
6
  marqetive/core/models.py,sha256=0n5z1GcrNJWmPCgc_k5glxd3dLGUANwp4qvHCM5FIC4,19287
@@ -33,6 +33,6 @@ marqetive/utils/helpers.py,sha256=Sh5HZD6AOJig_6T84n6JsKLosIkKIkpkiYTl69rnOOw,13
33
33
  marqetive/utils/media.py,sha256=reVousdueG-h5jeI6uLGqVCfjYxlsMiWhx6XZwg-iHY,14664
34
34
  marqetive/utils/oauth.py,sha256=3TtbUCVuGxtOBxIUvVJH_DUMIHrP76XDpabPYaLXhTU,15392
35
35
  marqetive/utils/retry.py,sha256=UcgrmVBVG5zd30_11mZnRnTaSFrbUYXBO1DrXPR0f8E,7627
36
- marqetive_lib-0.2.1.dist-info/METADATA,sha256=TGRiCpdcZ3x0eCi1OsaH37-BIuimbqVCrbaZvWvUNqE,7875
37
- marqetive_lib-0.2.1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
38
- marqetive_lib-0.2.1.dist-info/RECORD,,
36
+ marqetive_lib-0.2.2.dist-info/METADATA,sha256=fVQO0Nibz4TvbzU_K_WuUo6SmwbJ2V7lsVWN75CQEVE,7875
37
+ marqetive_lib-0.2.2.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
38
+ marqetive_lib-0.2.2.dist-info/RECORD,,