upload-post 0.1.2__py3-none-any.whl → 2.0.0__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.
@@ -0,0 +1,352 @@
1
+ Metadata-Version: 2.4
2
+ Name: upload-post
3
+ Version: 2.0.0
4
+ Summary: Cross-platform social media upload for TikTok, Instagram, YouTube, LinkedIn, Facebook, Pinterest, Threads, Reddit, Bluesky, and X (Twitter)
5
+ Home-page: https://www.upload-post.com/
6
+ Author: Upload-Post
7
+ Author-email: hi@img2html.com
8
+ Project-URL: Documentation, https://docs.upload-post.com
9
+ Project-URL: Source, https://github.com/upload-post/upload-post-pip
10
+ Project-URL: Bug Tracker, https://github.com/upload-post/upload-post-pip/issues
11
+ Keywords: social-media,video-upload,photo-upload,tiktok,instagram,youtube,linkedin,facebook,pinterest,threads,reddit,bluesky,twitter,x,api-client,upload-post
12
+ Classifier: Development Status :: 5 - Production/Stable
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Topic :: Internet :: WWW/HTTP
15
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.8
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: License :: OSI Approved :: MIT License
23
+ Classifier: Operating System :: OS Independent
24
+ Requires-Python: >=3.8
25
+ Description-Content-Type: text/markdown
26
+ Requires-Dist: requests>=2.25.1
27
+ Dynamic: author
28
+ Dynamic: author-email
29
+ Dynamic: classifier
30
+ Dynamic: description
31
+ Dynamic: description-content-type
32
+ Dynamic: home-page
33
+ Dynamic: keywords
34
+ Dynamic: project-url
35
+ Dynamic: requires-dist
36
+ Dynamic: requires-python
37
+ Dynamic: summary
38
+
39
+ # Upload-Post SDK for Python
40
+
41
+ Official Python client for the [Upload-Post API](https://www.upload-post.com) - Cross-platform social media upload.
42
+
43
+ Upload videos, photos, text posts, and documents to **TikTok, Instagram, YouTube, LinkedIn, Facebook, Pinterest, Threads, Reddit, Bluesky, and X (Twitter)** with a single API.
44
+
45
+ ## Installation
46
+
47
+ ```bash
48
+ pip install upload-post
49
+ ```
50
+
51
+ ## Quick Start
52
+
53
+ ```python
54
+ from upload_post import UploadPostClient
55
+
56
+ client = UploadPostClient("YOUR_API_KEY")
57
+
58
+ # Upload a video to multiple platforms
59
+ response = client.upload_video(
60
+ "video.mp4",
61
+ title="Check out this awesome video! 🎬",
62
+ user="my-profile",
63
+ platforms=["tiktok", "instagram", "youtube"]
64
+ )
65
+
66
+ print(response)
67
+ ```
68
+
69
+ ## Features
70
+
71
+ - ✅ **Video Upload** - TikTok, Instagram, YouTube, LinkedIn, Facebook, Pinterest, Threads, Bluesky, X
72
+ - ✅ **Photo Upload** - TikTok, Instagram, LinkedIn, Facebook, Pinterest, Threads, Reddit, Bluesky, X
73
+ - ✅ **Text Posts** - X, LinkedIn, Facebook, Threads, Reddit, Bluesky
74
+ - ✅ **Document Upload** - LinkedIn (PDF, PPT, PPTX, DOC, DOCX)
75
+ - ✅ **Scheduling** - Schedule posts for later
76
+ - ✅ **Posting Queue** - Add posts to your configured queue
77
+ - ✅ **First Comments** - Auto-post first comment after publishing
78
+ - ✅ **Analytics** - Get engagement metrics
79
+ - ✅ **Full Type Hints**
80
+
81
+ ## API Reference
82
+
83
+ ### Upload Video
84
+
85
+ ```python
86
+ response = client.upload_video(
87
+ "video.mp4",
88
+ title="My awesome video",
89
+ user="my-profile",
90
+ platforms=["tiktok", "instagram", "youtube"],
91
+
92
+ # Optional: Schedule for later
93
+ scheduled_date="2024-12-25T10:00:00Z",
94
+ timezone="Europe/Madrid",
95
+
96
+ # Optional: Add first comment
97
+ first_comment="Thanks for watching! 🙏",
98
+
99
+ # Optional: Platform-specific settings
100
+ privacy_level="PUBLIC_TO_EVERYONE", # TikTok
101
+ media_type="REELS", # Instagram
102
+ privacyStatus="public", # YouTube
103
+ tags=["tutorial", "coding"], # YouTube
104
+ )
105
+ ```
106
+
107
+ ### Upload Photos
108
+
109
+ ```python
110
+ # Upload single or multiple photos
111
+ response = client.upload_photos(
112
+ ["photo1.jpg", "photo2.jpg", "https://example.com/photo3.jpg"],
113
+ title="Check out these photos! 📸",
114
+ user="my-profile",
115
+ platforms=["instagram", "facebook", "x"],
116
+
117
+ # Optional: Add to queue instead of posting immediately
118
+ add_to_queue=True,
119
+
120
+ # Platform-specific
121
+ media_type="IMAGE", # Instagram: IMAGE or STORIES
122
+ facebook_page_id="your-page-id",
123
+ )
124
+ ```
125
+
126
+ ### Upload Text Posts
127
+
128
+ ```python
129
+ response = client.upload_text(
130
+ title="Just shipped a new feature! 🚀 Check it out at example.com",
131
+ user="my-profile",
132
+ platforms=["x", "linkedin", "threads"],
133
+
134
+ # Optional: Create a poll on X
135
+ poll_options=["Option A", "Option B", "Option C"],
136
+ poll_duration=1440, # 24 hours in minutes
137
+
138
+ # Optional: Post to a LinkedIn company page
139
+ target_linkedin_page_id="company-page-id",
140
+ )
141
+ ```
142
+
143
+ ### Upload Documents (LinkedIn)
144
+
145
+ ```python
146
+ response = client.upload_document(
147
+ "presentation.pdf",
148
+ title="Q4 2024 Report",
149
+ user="my-profile",
150
+ description="Check out our latest quarterly results!",
151
+ visibility="PUBLIC",
152
+ target_linkedin_page_id="company-page-id", # Optional: post to company page
153
+ )
154
+ ```
155
+
156
+ ### Check Upload Status
157
+
158
+ For async uploads, check the status using the request_id:
159
+
160
+ ```python
161
+ status = client.get_status("request_id_from_upload")
162
+ print(status)
163
+ ```
164
+
165
+ ### Get Upload History
166
+
167
+ ```python
168
+ history = client.get_history(page=1, limit=20)
169
+ print(history)
170
+ ```
171
+
172
+ ### Scheduled Posts
173
+
174
+ ```python
175
+ # List all scheduled posts
176
+ scheduled = client.list_scheduled()
177
+
178
+ # Edit a scheduled post
179
+ client.edit_scheduled(
180
+ "job-id",
181
+ scheduled_date="2024-12-26T15:00:00Z",
182
+ timezone="America/New_York",
183
+ )
184
+
185
+ # Cancel a scheduled post
186
+ client.cancel_scheduled("job-id")
187
+ ```
188
+
189
+ ### User Management
190
+
191
+ ```python
192
+ # List all profiles
193
+ users = client.list_users()
194
+
195
+ # Create a new profile
196
+ client.create_user("new-profile")
197
+
198
+ # Delete a profile
199
+ client.delete_user("old-profile")
200
+
201
+ # Generate JWT for platform integration (white-label)
202
+ jwt = client.generate_jwt(
203
+ "my-profile",
204
+ redirect_url="https://yourapp.com/callback",
205
+ platforms=["tiktok", "instagram"],
206
+ )
207
+ ```
208
+
209
+ ### Get Analytics
210
+
211
+ ```python
212
+ analytics = client.get_analytics(
213
+ "my-profile",
214
+ platforms=["instagram", "tiktok"],
215
+ )
216
+ print(analytics)
217
+ ```
218
+
219
+ ### Helper Methods
220
+
221
+ ```python
222
+ # Get Facebook pages for a profile
223
+ fb_pages = client.get_facebook_pages("my-profile")
224
+
225
+ # Get LinkedIn pages for a profile
226
+ li_pages = client.get_linkedin_pages("my-profile")
227
+
228
+ # Get Pinterest boards for a profile
229
+ boards = client.get_pinterest_boards("my-profile")
230
+ ```
231
+
232
+ ## Platform-Specific Options
233
+
234
+ ### TikTok (Video)
235
+ - `privacy_level` - PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, FOLLOWER_OF_CREATOR, SELF_ONLY
236
+ - `disable_duet` - Disable duet
237
+ - `disable_comment` - Disable comments
238
+ - `disable_stitch` - Disable stitch
239
+ - `cover_timestamp` - Timestamp in ms for cover
240
+ - `is_aigc` - AI-generated content flag
241
+ - `post_mode` - DIRECT_POST or MEDIA_UPLOAD
242
+ - `brand_content_toggle` - Branded content toggle
243
+ - `brand_organic_toggle` - Brand organic toggle
244
+
245
+ ### TikTok (Photos)
246
+ - `auto_add_music` - Auto add music
247
+ - `photo_cover_index` - Index of photo for cover (0-based)
248
+ - `disable_comment` - Disable comments
249
+
250
+ ### Instagram
251
+ - `media_type` - REELS, STORIES, IMAGE
252
+ - `share_to_feed` - Share to feed (for Reels/Stories)
253
+ - `collaborators` - Comma-separated collaborator usernames
254
+ - `cover_url` - Custom cover URL
255
+ - `audio_name` - Audio track name
256
+ - `user_tags` - Comma-separated user tags
257
+ - `location_id` - Location ID
258
+ - `thumb_offset` - Thumbnail offset
259
+
260
+ ### YouTube
261
+ - `tags` - List or comma-separated tags
262
+ - `categoryId` - Category ID (default: "22" People & Blogs)
263
+ - `privacyStatus` - public, unlisted, private
264
+ - `embeddable` - Allow embedding
265
+ - `license` - youtube, creativeCommon
266
+ - `publicStatsViewable` - Show public stats
267
+ - `thumbnail_url` - Custom thumbnail URL
268
+ - `selfDeclaredMadeForKids` - Made for kids (COPPA)
269
+ - `containsSyntheticMedia` - AI/synthetic content flag
270
+ - `defaultLanguage` - Title/description language (BCP-47)
271
+ - `defaultAudioLanguage` - Audio language (BCP-47)
272
+ - `allowedCountries` / `blockedCountries` - Country restrictions
273
+ - `hasPaidProductPlacement` - Paid placement flag
274
+ - `recordingDate` - Recording date (ISO 8601)
275
+
276
+ ### LinkedIn
277
+ - `visibility` - PUBLIC, CONNECTIONS, LOGGED_IN, CONTAINER
278
+ - `target_linkedin_page_id` - Page ID for organization posts
279
+
280
+ ### Facebook
281
+ - `facebook_page_id` - Facebook Page ID (required)
282
+ - `video_state` - PUBLISHED, DRAFT
283
+ - `facebook_media_type` - REELS, STORIES
284
+ - `facebook_link_url` - URL for text posts
285
+
286
+ ### Pinterest
287
+ - `pinterest_board_id` - Board ID
288
+ - `pinterest_link` - Destination link
289
+ - `pinterest_alt_text` - Alt text for photos
290
+ - `pinterest_cover_image_url` - Cover image URL (video)
291
+ - `pinterest_cover_image_key_frame_time` - Key frame time in ms
292
+
293
+ ### X (Twitter)
294
+ - `reply_settings` - everyone, following, mentionedUsers, subscribers, verified
295
+ - `nullcast` - Promoted-only post
296
+ - `tagged_user_ids` - User IDs to tag
297
+ - `place_id` / `geo_place_id` - Location place ID
298
+ - `quote_tweet_id` - Tweet ID to quote
299
+ - `poll_options` - Poll options (2-4)
300
+ - `poll_duration` - Poll duration in minutes (5-10080)
301
+ - `for_super_followers_only` - Exclusive for super followers
302
+ - `community_id` - Community ID
303
+ - `share_with_followers` - Share community post with followers
304
+ - `card_uri` - Card URI for Twitter Cards
305
+ - `x_long_text_as_post` - Post long text as single post
306
+
307
+ ### Threads
308
+ - `threads_long_text_as_post` - Post long text as single post (vs thread)
309
+
310
+ ### Reddit
311
+ - `subreddit` - Subreddit name (without r/)
312
+ - `flair_id` - Flair template ID
313
+
314
+ ## Common Options
315
+
316
+ These options work across all upload methods:
317
+
318
+ | Option | Description |
319
+ |--------|-------------|
320
+ | `title` | Post title/caption (required) |
321
+ | `user` | Profile name (required) |
322
+ | `platforms` | Target platforms list (required) |
323
+ | `first_comment` | First comment to post |
324
+ | `alt_text` | Alt text for accessibility |
325
+ | `scheduled_date` | ISO date for scheduling |
326
+ | `timezone` | Timezone for scheduled date |
327
+ | `add_to_queue` | Add to posting queue |
328
+ | `async_upload` | Process asynchronously (default: True) |
329
+
330
+ ## Error Handling
331
+
332
+ ```python
333
+ from upload_post import UploadPostClient, UploadPostError
334
+
335
+ client = UploadPostClient("YOUR_API_KEY")
336
+
337
+ try:
338
+ response = client.upload_video("video.mp4", **options)
339
+ print("Upload successful:", response)
340
+ except UploadPostError as e:
341
+ print("Upload failed:", str(e))
342
+ ```
343
+
344
+ ## Links
345
+
346
+ - [Upload-Post Website](https://www.upload-post.com)
347
+ - [API Documentation](https://docs.upload-post.com)
348
+ - [Dashboard](https://app.upload-post.com)
349
+
350
+ ## License
351
+
352
+ MIT
@@ -0,0 +1,7 @@
1
+ upload_post/__init__.py,sha256=IaYt2-YlKKcbSiDiTMFzHFtgLJQOiqK_7KcWhy4LH1k,659
2
+ upload_post/api_client.py,sha256=mWqS2O8t0TAyXwB7ZptcngtzmLWOYAqKlEYnZpEn_qM,37365
3
+ upload_post/cli.py,sha256=Ruyl0sOpRVXnRnT3lUcObIM700pUFHJtWfIIXBsQSNY,1708
4
+ upload_post-2.0.0.dist-info/METADATA,sha256=pH9IOT2XAzuP_LWPXsKCBp9voSTqxaqg1Pc2fuWjhqs,10250
5
+ upload_post-2.0.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
6
+ upload_post-2.0.0.dist-info/top_level.txt,sha256=c5Jpx2u159BqOkC2P3Gp3dSotri2_XAADesx3h9pCRU,12
7
+ upload_post-2.0.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (80.9.0)
2
+ Generator: setuptools (80.10.2)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,143 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: upload-post
3
- Version: 0.1.2
4
- Summary: Python client for Upload-Post.com API
5
- Home-page: https://www.upload-post.com/
6
- Author: Manuel Gracia
7
- Author-email: hi@img2html.com
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: License :: OSI Approved :: MIT License
10
- Classifier: Operating System :: OS Independent
11
- Requires-Python: >=3.8
12
- Description-Content-Type: text/markdown
13
- Requires-Dist: requests>=2.25.1
14
- Requires-Dist: python-dotenv>=0.19.0
15
- Dynamic: author
16
- Dynamic: author-email
17
- Dynamic: classifier
18
- Dynamic: description
19
- Dynamic: description-content-type
20
- Dynamic: home-page
21
- Dynamic: requires-dist
22
- Dynamic: requires-python
23
- Dynamic: summary
24
-
25
- # upload-post Python Client
26
-
27
- A Python client for the [Upload-Post.com](https://www.upload-post.com/) API, designed to facilitate interaction with the service. Upload-Post.com allows you to upload videos to multiple social media platforms simultaneously.
28
-
29
- [![PyPI version](https://img.shields.io/pypi/v/upload-post.svg)](https://pypi.org/project/upload-post/)
30
- [![Python Versions](https://img.shields.io/pypi/pyversions/upload-post.svg)](https://pypi.org/project/upload-post/)
31
-
32
- ## Features
33
-
34
- - 🚀 Upload videos to TikTok, Instagram, LinkedIn, YouTube, Facebook, X (Twitter), Threads, and Pinterest (platform support based on API availability)
35
- - 🖼️ Upload photos to TikTok, Instagram, LinkedIn, Facebook, X (Twitter), Threads, and Pinterest
36
- - ✍️ Upload text posts to LinkedIn, X (Twitter), Facebook, and Threads
37
- - 🔒 Secure API key authentication
38
- - 📁 File validation and error handling
39
- - 📊 Detailed logging
40
- - 🤖 Both CLI and Python API interfaces
41
-
42
- ## Installation
43
-
44
- ```bash
45
- pip install upload-post
46
- ```
47
-
48
- ## Usage
49
-
50
- ### Command Line Interface
51
-
52
- ```bash
53
- upload-post \
54
- --api-key "your_api_key_here" \
55
- --video "/path/to/video.mp4" \
56
- --title "My Awesome Video" \
57
- --user "testuser" \
58
- --platforms tiktok instagram
59
- ```
60
-
61
- ### Python API
62
-
63
- ```python
64
- from upload_post import UploadPostClient, UploadPostError
65
- from pathlib import Path
66
-
67
- # Initialize client
68
- client = UploadPostClient(api_key="your_api_key_here")
69
-
70
- # Example: Upload a video
71
- try:
72
- response_video = client.upload_video(
73
- video_path="/path/to/video.mp4", # Can also be a URL: "https://example.com/video.mp4"
74
- title="My Awesome Video",
75
- user="testuser",
76
- platforms=["tiktok", "youtube", "linkedin"],
77
- # TikTok specific
78
- privacy_level="PUBLIC_TO_EVERYONE",
79
- disable_comment=False,
80
- # YouTube specific
81
- description="Detailed description for YouTube",
82
- tags=["tutorial", "python", "api"],
83
- categoryId="22", # "People & Blogs"
84
- privacyStatus="public",
85
- # LinkedIn specific
86
- visibility="PUBLIC", # Required for LinkedIn if not using default
87
- description="Post commentary for LinkedIn" # Optional, uses title if not set
88
- )
89
- print(f"Video upload successful: {response_video}")
90
- except UploadPostError as e:
91
- print(f"Video upload failed: {e}")
92
-
93
- # Example: Upload photos
94
- try:
95
- response_photos = client.upload_photos(
96
- photos=["/path/to/image1.jpg", Path("/path/to/image2.png"), "https://example.com/photo3.jpg"],
97
- user="testuser",
98
- platforms=["instagram", "facebook"],
99
- title="My Photo Album",
100
- caption="Check out these cool photos!",
101
- # Platform-specific parameters
102
- facebook_page_id="your_facebook_page_id", # Required for Facebook
103
- media_type="IMAGE" # For Instagram, "IMAGE" or "STORIES"
104
- )
105
- print(f"Photo upload successful: {response_photos}")
106
- except UploadPostError as e:
107
- print(f"Photo upload failed: {e}")
108
-
109
- # Example: Upload a text post
110
- try:
111
- response_text = client.upload_text(
112
- user="testuser",
113
- platforms=["x", "linkedin"],
114
- title="This is my awesome text post! #Python #API",
115
- # Platform-specific parameters
116
- # For LinkedIn, if posting to an organization page:
117
- # target_linkedin_page_id="your_linkedin_page_id",
118
- # For Facebook, facebook_page_id is required:
119
- # facebook_page_id="your_facebook_page_id"
120
- # (add 'facebook' to platforms list too)
121
- )
122
- print(f"Text post successful: {response_text}")
123
- except UploadPostError as e:
124
- print(f"Text post failed: {e}")
125
- ```
126
-
127
- ## Error Handling
128
-
129
- The client raises `UploadPostError` exceptions for API errors. Common error scenarios:
130
-
131
- - Invalid API key
132
- - Missing required parameters
133
- - File not found
134
- - Platform not supported
135
- - API rate limits exceeded
136
-
137
- ## Documentation
138
-
139
- For full API documentation and platform availability, see the official [Upload-Post.com documentation](https://www.upload-post.com/).
140
-
141
- ## License
142
-
143
- MIT License - See [LICENSE](LICENSE) for details.
@@ -1,8 +0,0 @@
1
- upload_post/__init__.py,sha256=WtahEoLXqDhFCLBEYmWJjNIvwTcPeBk0IeZ8yABUmA4,131
2
- upload_post/api_client.py,sha256=uF0vQzY4t2nIdvLSi8NF3HBImNrpFaSCA_vSFXLKy1E,11153
3
- upload_post/cli.py,sha256=Ruyl0sOpRVXnRnT3lUcObIM700pUFHJtWfIIXBsQSNY,1708
4
- upload_post-0.1.2.dist-info/METADATA,sha256=ZpLE62psTCDowYiSLsy9CFwGscysLJ96RkZ5VK_e5nM,4707
5
- upload_post-0.1.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
6
- upload_post-0.1.2.dist-info/entry_points.txt,sha256=D_MqrtgTSJQkRIwPLVCvKcwxNnaoAS8my7_gBtU1X_I,53
7
- upload_post-0.1.2.dist-info/top_level.txt,sha256=c5Jpx2u159BqOkC2P3Gp3dSotri2_XAADesx3h9pCRU,12
8
- upload_post-0.1.2.dist-info/RECORD,,
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- upload-post = upload_post.cli:main