upload-post 0.1.2__tar.gz → 2.0.0__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.
- upload_post-2.0.0/PKG-INFO +352 -0
- upload_post-2.0.0/README.md +314 -0
- upload_post-2.0.0/setup.py +44 -0
- upload_post-2.0.0/upload_post/__init__.py +22 -0
- upload_post-2.0.0/upload_post/api_client.py +945 -0
- upload_post-2.0.0/upload_post.egg-info/PKG-INFO +352 -0
- {upload_post-0.1.2 → upload_post-2.0.0}/upload_post.egg-info/SOURCES.txt +0 -1
- upload_post-2.0.0/upload_post.egg-info/requires.txt +1 -0
- upload_post-0.1.2/PKG-INFO +0 -143
- upload_post-0.1.2/README.md +0 -119
- upload_post-0.1.2/setup.py +0 -31
- upload_post-0.1.2/upload_post/__init__.py +0 -4
- upload_post-0.1.2/upload_post/api_client.py +0 -268
- upload_post-0.1.2/upload_post.egg-info/PKG-INFO +0 -143
- upload_post-0.1.2/upload_post.egg-info/entry_points.txt +0 -2
- upload_post-0.1.2/upload_post.egg-info/requires.txt +0 -2
- {upload_post-0.1.2 → upload_post-2.0.0}/setup.cfg +0 -0
- {upload_post-0.1.2 → upload_post-2.0.0}/upload_post/cli.py +0 -0
- {upload_post-0.1.2 → upload_post-2.0.0}/upload_post.egg-info/dependency_links.txt +0 -0
- {upload_post-0.1.2 → upload_post-2.0.0}/upload_post.egg-info/top_level.txt +0 -0
|
@@ -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,314 @@
|
|
|
1
|
+
# Upload-Post SDK for Python
|
|
2
|
+
|
|
3
|
+
Official Python client for the [Upload-Post API](https://www.upload-post.com) - Cross-platform social media upload.
|
|
4
|
+
|
|
5
|
+
Upload videos, photos, text posts, and documents to **TikTok, Instagram, YouTube, LinkedIn, Facebook, Pinterest, Threads, Reddit, Bluesky, and X (Twitter)** with a single API.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install upload-post
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Quick Start
|
|
14
|
+
|
|
15
|
+
```python
|
|
16
|
+
from upload_post import UploadPostClient
|
|
17
|
+
|
|
18
|
+
client = UploadPostClient("YOUR_API_KEY")
|
|
19
|
+
|
|
20
|
+
# Upload a video to multiple platforms
|
|
21
|
+
response = client.upload_video(
|
|
22
|
+
"video.mp4",
|
|
23
|
+
title="Check out this awesome video! 🎬",
|
|
24
|
+
user="my-profile",
|
|
25
|
+
platforms=["tiktok", "instagram", "youtube"]
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
print(response)
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Features
|
|
32
|
+
|
|
33
|
+
- ✅ **Video Upload** - TikTok, Instagram, YouTube, LinkedIn, Facebook, Pinterest, Threads, Bluesky, X
|
|
34
|
+
- ✅ **Photo Upload** - TikTok, Instagram, LinkedIn, Facebook, Pinterest, Threads, Reddit, Bluesky, X
|
|
35
|
+
- ✅ **Text Posts** - X, LinkedIn, Facebook, Threads, Reddit, Bluesky
|
|
36
|
+
- ✅ **Document Upload** - LinkedIn (PDF, PPT, PPTX, DOC, DOCX)
|
|
37
|
+
- ✅ **Scheduling** - Schedule posts for later
|
|
38
|
+
- ✅ **Posting Queue** - Add posts to your configured queue
|
|
39
|
+
- ✅ **First Comments** - Auto-post first comment after publishing
|
|
40
|
+
- ✅ **Analytics** - Get engagement metrics
|
|
41
|
+
- ✅ **Full Type Hints**
|
|
42
|
+
|
|
43
|
+
## API Reference
|
|
44
|
+
|
|
45
|
+
### Upload Video
|
|
46
|
+
|
|
47
|
+
```python
|
|
48
|
+
response = client.upload_video(
|
|
49
|
+
"video.mp4",
|
|
50
|
+
title="My awesome video",
|
|
51
|
+
user="my-profile",
|
|
52
|
+
platforms=["tiktok", "instagram", "youtube"],
|
|
53
|
+
|
|
54
|
+
# Optional: Schedule for later
|
|
55
|
+
scheduled_date="2024-12-25T10:00:00Z",
|
|
56
|
+
timezone="Europe/Madrid",
|
|
57
|
+
|
|
58
|
+
# Optional: Add first comment
|
|
59
|
+
first_comment="Thanks for watching! 🙏",
|
|
60
|
+
|
|
61
|
+
# Optional: Platform-specific settings
|
|
62
|
+
privacy_level="PUBLIC_TO_EVERYONE", # TikTok
|
|
63
|
+
media_type="REELS", # Instagram
|
|
64
|
+
privacyStatus="public", # YouTube
|
|
65
|
+
tags=["tutorial", "coding"], # YouTube
|
|
66
|
+
)
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Upload Photos
|
|
70
|
+
|
|
71
|
+
```python
|
|
72
|
+
# Upload single or multiple photos
|
|
73
|
+
response = client.upload_photos(
|
|
74
|
+
["photo1.jpg", "photo2.jpg", "https://example.com/photo3.jpg"],
|
|
75
|
+
title="Check out these photos! 📸",
|
|
76
|
+
user="my-profile",
|
|
77
|
+
platforms=["instagram", "facebook", "x"],
|
|
78
|
+
|
|
79
|
+
# Optional: Add to queue instead of posting immediately
|
|
80
|
+
add_to_queue=True,
|
|
81
|
+
|
|
82
|
+
# Platform-specific
|
|
83
|
+
media_type="IMAGE", # Instagram: IMAGE or STORIES
|
|
84
|
+
facebook_page_id="your-page-id",
|
|
85
|
+
)
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Upload Text Posts
|
|
89
|
+
|
|
90
|
+
```python
|
|
91
|
+
response = client.upload_text(
|
|
92
|
+
title="Just shipped a new feature! 🚀 Check it out at example.com",
|
|
93
|
+
user="my-profile",
|
|
94
|
+
platforms=["x", "linkedin", "threads"],
|
|
95
|
+
|
|
96
|
+
# Optional: Create a poll on X
|
|
97
|
+
poll_options=["Option A", "Option B", "Option C"],
|
|
98
|
+
poll_duration=1440, # 24 hours in minutes
|
|
99
|
+
|
|
100
|
+
# Optional: Post to a LinkedIn company page
|
|
101
|
+
target_linkedin_page_id="company-page-id",
|
|
102
|
+
)
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Upload Documents (LinkedIn)
|
|
106
|
+
|
|
107
|
+
```python
|
|
108
|
+
response = client.upload_document(
|
|
109
|
+
"presentation.pdf",
|
|
110
|
+
title="Q4 2024 Report",
|
|
111
|
+
user="my-profile",
|
|
112
|
+
description="Check out our latest quarterly results!",
|
|
113
|
+
visibility="PUBLIC",
|
|
114
|
+
target_linkedin_page_id="company-page-id", # Optional: post to company page
|
|
115
|
+
)
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Check Upload Status
|
|
119
|
+
|
|
120
|
+
For async uploads, check the status using the request_id:
|
|
121
|
+
|
|
122
|
+
```python
|
|
123
|
+
status = client.get_status("request_id_from_upload")
|
|
124
|
+
print(status)
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Get Upload History
|
|
128
|
+
|
|
129
|
+
```python
|
|
130
|
+
history = client.get_history(page=1, limit=20)
|
|
131
|
+
print(history)
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Scheduled Posts
|
|
135
|
+
|
|
136
|
+
```python
|
|
137
|
+
# List all scheduled posts
|
|
138
|
+
scheduled = client.list_scheduled()
|
|
139
|
+
|
|
140
|
+
# Edit a scheduled post
|
|
141
|
+
client.edit_scheduled(
|
|
142
|
+
"job-id",
|
|
143
|
+
scheduled_date="2024-12-26T15:00:00Z",
|
|
144
|
+
timezone="America/New_York",
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
# Cancel a scheduled post
|
|
148
|
+
client.cancel_scheduled("job-id")
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### User Management
|
|
152
|
+
|
|
153
|
+
```python
|
|
154
|
+
# List all profiles
|
|
155
|
+
users = client.list_users()
|
|
156
|
+
|
|
157
|
+
# Create a new profile
|
|
158
|
+
client.create_user("new-profile")
|
|
159
|
+
|
|
160
|
+
# Delete a profile
|
|
161
|
+
client.delete_user("old-profile")
|
|
162
|
+
|
|
163
|
+
# Generate JWT for platform integration (white-label)
|
|
164
|
+
jwt = client.generate_jwt(
|
|
165
|
+
"my-profile",
|
|
166
|
+
redirect_url="https://yourapp.com/callback",
|
|
167
|
+
platforms=["tiktok", "instagram"],
|
|
168
|
+
)
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
### Get Analytics
|
|
172
|
+
|
|
173
|
+
```python
|
|
174
|
+
analytics = client.get_analytics(
|
|
175
|
+
"my-profile",
|
|
176
|
+
platforms=["instagram", "tiktok"],
|
|
177
|
+
)
|
|
178
|
+
print(analytics)
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
### Helper Methods
|
|
182
|
+
|
|
183
|
+
```python
|
|
184
|
+
# Get Facebook pages for a profile
|
|
185
|
+
fb_pages = client.get_facebook_pages("my-profile")
|
|
186
|
+
|
|
187
|
+
# Get LinkedIn pages for a profile
|
|
188
|
+
li_pages = client.get_linkedin_pages("my-profile")
|
|
189
|
+
|
|
190
|
+
# Get Pinterest boards for a profile
|
|
191
|
+
boards = client.get_pinterest_boards("my-profile")
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
## Platform-Specific Options
|
|
195
|
+
|
|
196
|
+
### TikTok (Video)
|
|
197
|
+
- `privacy_level` - PUBLIC_TO_EVERYONE, MUTUAL_FOLLOW_FRIENDS, FOLLOWER_OF_CREATOR, SELF_ONLY
|
|
198
|
+
- `disable_duet` - Disable duet
|
|
199
|
+
- `disable_comment` - Disable comments
|
|
200
|
+
- `disable_stitch` - Disable stitch
|
|
201
|
+
- `cover_timestamp` - Timestamp in ms for cover
|
|
202
|
+
- `is_aigc` - AI-generated content flag
|
|
203
|
+
- `post_mode` - DIRECT_POST or MEDIA_UPLOAD
|
|
204
|
+
- `brand_content_toggle` - Branded content toggle
|
|
205
|
+
- `brand_organic_toggle` - Brand organic toggle
|
|
206
|
+
|
|
207
|
+
### TikTok (Photos)
|
|
208
|
+
- `auto_add_music` - Auto add music
|
|
209
|
+
- `photo_cover_index` - Index of photo for cover (0-based)
|
|
210
|
+
- `disable_comment` - Disable comments
|
|
211
|
+
|
|
212
|
+
### Instagram
|
|
213
|
+
- `media_type` - REELS, STORIES, IMAGE
|
|
214
|
+
- `share_to_feed` - Share to feed (for Reels/Stories)
|
|
215
|
+
- `collaborators` - Comma-separated collaborator usernames
|
|
216
|
+
- `cover_url` - Custom cover URL
|
|
217
|
+
- `audio_name` - Audio track name
|
|
218
|
+
- `user_tags` - Comma-separated user tags
|
|
219
|
+
- `location_id` - Location ID
|
|
220
|
+
- `thumb_offset` - Thumbnail offset
|
|
221
|
+
|
|
222
|
+
### YouTube
|
|
223
|
+
- `tags` - List or comma-separated tags
|
|
224
|
+
- `categoryId` - Category ID (default: "22" People & Blogs)
|
|
225
|
+
- `privacyStatus` - public, unlisted, private
|
|
226
|
+
- `embeddable` - Allow embedding
|
|
227
|
+
- `license` - youtube, creativeCommon
|
|
228
|
+
- `publicStatsViewable` - Show public stats
|
|
229
|
+
- `thumbnail_url` - Custom thumbnail URL
|
|
230
|
+
- `selfDeclaredMadeForKids` - Made for kids (COPPA)
|
|
231
|
+
- `containsSyntheticMedia` - AI/synthetic content flag
|
|
232
|
+
- `defaultLanguage` - Title/description language (BCP-47)
|
|
233
|
+
- `defaultAudioLanguage` - Audio language (BCP-47)
|
|
234
|
+
- `allowedCountries` / `blockedCountries` - Country restrictions
|
|
235
|
+
- `hasPaidProductPlacement` - Paid placement flag
|
|
236
|
+
- `recordingDate` - Recording date (ISO 8601)
|
|
237
|
+
|
|
238
|
+
### LinkedIn
|
|
239
|
+
- `visibility` - PUBLIC, CONNECTIONS, LOGGED_IN, CONTAINER
|
|
240
|
+
- `target_linkedin_page_id` - Page ID for organization posts
|
|
241
|
+
|
|
242
|
+
### Facebook
|
|
243
|
+
- `facebook_page_id` - Facebook Page ID (required)
|
|
244
|
+
- `video_state` - PUBLISHED, DRAFT
|
|
245
|
+
- `facebook_media_type` - REELS, STORIES
|
|
246
|
+
- `facebook_link_url` - URL for text posts
|
|
247
|
+
|
|
248
|
+
### Pinterest
|
|
249
|
+
- `pinterest_board_id` - Board ID
|
|
250
|
+
- `pinterest_link` - Destination link
|
|
251
|
+
- `pinterest_alt_text` - Alt text for photos
|
|
252
|
+
- `pinterest_cover_image_url` - Cover image URL (video)
|
|
253
|
+
- `pinterest_cover_image_key_frame_time` - Key frame time in ms
|
|
254
|
+
|
|
255
|
+
### X (Twitter)
|
|
256
|
+
- `reply_settings` - everyone, following, mentionedUsers, subscribers, verified
|
|
257
|
+
- `nullcast` - Promoted-only post
|
|
258
|
+
- `tagged_user_ids` - User IDs to tag
|
|
259
|
+
- `place_id` / `geo_place_id` - Location place ID
|
|
260
|
+
- `quote_tweet_id` - Tweet ID to quote
|
|
261
|
+
- `poll_options` - Poll options (2-4)
|
|
262
|
+
- `poll_duration` - Poll duration in minutes (5-10080)
|
|
263
|
+
- `for_super_followers_only` - Exclusive for super followers
|
|
264
|
+
- `community_id` - Community ID
|
|
265
|
+
- `share_with_followers` - Share community post with followers
|
|
266
|
+
- `card_uri` - Card URI for Twitter Cards
|
|
267
|
+
- `x_long_text_as_post` - Post long text as single post
|
|
268
|
+
|
|
269
|
+
### Threads
|
|
270
|
+
- `threads_long_text_as_post` - Post long text as single post (vs thread)
|
|
271
|
+
|
|
272
|
+
### Reddit
|
|
273
|
+
- `subreddit` - Subreddit name (without r/)
|
|
274
|
+
- `flair_id` - Flair template ID
|
|
275
|
+
|
|
276
|
+
## Common Options
|
|
277
|
+
|
|
278
|
+
These options work across all upload methods:
|
|
279
|
+
|
|
280
|
+
| Option | Description |
|
|
281
|
+
|--------|-------------|
|
|
282
|
+
| `title` | Post title/caption (required) |
|
|
283
|
+
| `user` | Profile name (required) |
|
|
284
|
+
| `platforms` | Target platforms list (required) |
|
|
285
|
+
| `first_comment` | First comment to post |
|
|
286
|
+
| `alt_text` | Alt text for accessibility |
|
|
287
|
+
| `scheduled_date` | ISO date for scheduling |
|
|
288
|
+
| `timezone` | Timezone for scheduled date |
|
|
289
|
+
| `add_to_queue` | Add to posting queue |
|
|
290
|
+
| `async_upload` | Process asynchronously (default: True) |
|
|
291
|
+
|
|
292
|
+
## Error Handling
|
|
293
|
+
|
|
294
|
+
```python
|
|
295
|
+
from upload_post import UploadPostClient, UploadPostError
|
|
296
|
+
|
|
297
|
+
client = UploadPostClient("YOUR_API_KEY")
|
|
298
|
+
|
|
299
|
+
try:
|
|
300
|
+
response = client.upload_video("video.mp4", **options)
|
|
301
|
+
print("Upload successful:", response)
|
|
302
|
+
except UploadPostError as e:
|
|
303
|
+
print("Upload failed:", str(e))
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
## Links
|
|
307
|
+
|
|
308
|
+
- [Upload-Post Website](https://www.upload-post.com)
|
|
309
|
+
- [API Documentation](https://docs.upload-post.com)
|
|
310
|
+
- [Dashboard](https://app.upload-post.com)
|
|
311
|
+
|
|
312
|
+
## License
|
|
313
|
+
|
|
314
|
+
MIT
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
from setuptools import find_packages, setup
|
|
2
|
+
|
|
3
|
+
with open("README.md", "r", encoding="utf-8") as fh:
|
|
4
|
+
long_description = fh.read()
|
|
5
|
+
|
|
6
|
+
setup(
|
|
7
|
+
name="upload-post",
|
|
8
|
+
version="2.0.0",
|
|
9
|
+
author="Upload-Post",
|
|
10
|
+
author_email="hi@img2html.com",
|
|
11
|
+
description="Cross-platform social media upload for TikTok, Instagram, YouTube, LinkedIn, Facebook, Pinterest, Threads, Reddit, Bluesky, and X (Twitter)",
|
|
12
|
+
long_description=long_description,
|
|
13
|
+
long_description_content_type="text/markdown",
|
|
14
|
+
url="https://www.upload-post.com/",
|
|
15
|
+
project_urls={
|
|
16
|
+
"Documentation": "https://docs.upload-post.com",
|
|
17
|
+
"Source": "https://github.com/upload-post/upload-post-pip",
|
|
18
|
+
"Bug Tracker": "https://github.com/upload-post/upload-post-pip/issues",
|
|
19
|
+
},
|
|
20
|
+
packages=find_packages(),
|
|
21
|
+
install_requires=[
|
|
22
|
+
"requests>=2.25.1",
|
|
23
|
+
],
|
|
24
|
+
classifiers=[
|
|
25
|
+
"Development Status :: 5 - Production/Stable",
|
|
26
|
+
"Intended Audience :: Developers",
|
|
27
|
+
"Topic :: Internet :: WWW/HTTP",
|
|
28
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
29
|
+
"Programming Language :: Python :: 3",
|
|
30
|
+
"Programming Language :: Python :: 3.8",
|
|
31
|
+
"Programming Language :: Python :: 3.9",
|
|
32
|
+
"Programming Language :: Python :: 3.10",
|
|
33
|
+
"Programming Language :: Python :: 3.11",
|
|
34
|
+
"Programming Language :: Python :: 3.12",
|
|
35
|
+
"License :: OSI Approved :: MIT License",
|
|
36
|
+
"Operating System :: OS Independent",
|
|
37
|
+
],
|
|
38
|
+
keywords=[
|
|
39
|
+
"social-media", "video-upload", "photo-upload", "tiktok", "instagram",
|
|
40
|
+
"youtube", "linkedin", "facebook", "pinterest", "threads", "reddit",
|
|
41
|
+
"bluesky", "twitter", "x", "api-client", "upload-post"
|
|
42
|
+
],
|
|
43
|
+
python_requires=">=3.8",
|
|
44
|
+
)
|