A Python package for effortless file uploads and management via the CloudPrime, supporting images, videos, documents, presentations, spreadsheets, and all file types.
Project description
CloudPrime Documentation
The CloudPrime enables users to securely upload and retrieve files of any type with ease. To use this API, you need to register on the CloudPrime platform and obtain an API key. This API is designed for seamless integration into your applications, ensuring reliable and efficient file management.
Features
- Universal File Support: Upload images (JPG, PNG, GIF, BMP, WEBP, SVG, TIFF), videos (MP4, AVI, MOV, MKV, WMV), documents (PDF, DOC, DOCX, PPT, PPTX, TXT), spreadsheets (CSV, XLS, XLSX), and any other file type.
- Secure File Uploads: Upload your files securely using API key authentication.
- Simple Integration: Integrate the API into your Python application effortlessly.
- File Retrieval: Retrieve uploaded files quickly and reliably.
- API Usage Tracking: Monitor your API usage, limits, and statistics.
Getting Started
Step 1: Register and Obtain an API Key
- Visit the CloudPrime Platform to create an account.
- After registering, log in to your account and navigate to the Dashboard.
- Go to the API Keys section and generate your unique API key.
- This API key will be used to authenticate all your API requests.
Step 2: Access the Documentation
For detailed information on API endpoints and usage, refer to the CloudPrime Documentation.
Installation
To use the CloudPrime in your Python application, install the required package:
pip install cloudprime
Usage Example
Basic File Upload
Here is a simple example demonstrating how to upload any type of file using the CloudPrime:
from cloudprime import CloudPrime
# Replace with your actual API key from CloudPrime dashboard
API_KEY = "your_actual_api_key_here"
# Initialize the CloudPrime client
client = CloudPrime(API_KEY)
# Get API usage statistics
print("Getting API usage stats...")
stats = client.get_upload_info()
print(f"Stats: {stats}")
# Upload any type of file (image, video, document, etc.)
file_to_upload = "path/to/your/file.pdf" # Can be PDF, DOC, PNG, MP4, CSV, etc.
try:
print(f"\nUploading file: {file_to_upload}")
result = client.upload_file(file_to_upload)
print("Upload successful!")
print(f"File URL: {result['data']['publicUrl']}")
print(f"File ID: {result['data']['id']}")
print(f"File Size: {result['data']['fileSize']}")
except FileNotFoundError as e:
print(f"Error: {e}")
except Exception as e:
print(f"Upload failed: {e}")
Example Response
API Usage Statistics Response:
{
"success": True,
"data": {
"keyName": "Production Key",
"isActive": True,
"lastUsed": "2026-01-05T15:29:07.817Z",
"usageCount": 6,
"totalUploads": 3,
"uploadsThisMonth": 6,
"uploadLimit": "50",
"usagePercentage": 12,
"createdAt": "2026-01-05T12:24:10.432Z",
"expiresAt": "2027-01-05T12:24:10.432Z"
}
}
File Upload Success Response:
{
"success": True,
"data": {
"id": "695bd8c4f91c7ee047d11bf8",
"publicUrl": "https://imageserve.pythonanywhere.com/media/uploads/your_uploaded_image.pdf",
"fileSize": "2.15 MB",
"fileName": "document.pdf",
"fileType": "application/pdf",
"uploadedAt": "2026-01-05T15:30:45.123Z"
}
}
Example Output in Terminal:
Getting API usage stats...
Stats: {'success': True, 'data': {'keyName': 'Production Key', 'isActive': True, 'lastUsed': '2026-01-05T15:29:07.817Z', 'usageCount': 6, 'totalUploads': 3, 'uploadsThisMonth': 6, 'uploadLimit': '50', 'usagePercentage': 12, 'createdAt': '2026-01-05T12:24:10.432Z', 'expiresAt': '2027-01-05T12:24:10.432Z'}}
Uploading file: document.pdf
Upload successful!
File URL: https://imageserve.pythonanywhere.com/media/uploads/your_uploaded_image.pdf
File ID: 695bd8c4f91c7ee047d11bf8
File Size: 2.15 MB
Supported File Types
- Images: .jpg, .jpeg, .png, .gif, .bmp, .webp, .svg, .tiff, .ico
- Videos: .mp4, .avi, .mov, .mkv, .wmv, .flv, .webm
- Documents: .pdf, .doc, .docx, .ppt, .pptx, .txt, .rtf
- Spreadsheets: .csv, .xls, .xlsx, .ods
- Archives: .zip, .rar, .7z, .tar.gz
- Code Files: .py, .js, .html, .css, .json, .xml
- Audio: .mp3, .wav, .ogg, .m4a
- And many more...
Key Points
- Always keep your API key confidential and never expose it in client-side code.
- Ensure your API key is included in the header (X-API-Key) of every request for authentication.
- The API supports files up to your plan's limit (check your dashboard for details).
- All uploaded files are securely stored and accessible via unique URLs.
- Follow the official documentation for detailed endpoint specifications and advanced features.
Support
If you encounter any issues or have questions:
- Visit our Documentation
- Check our Dashboard for API usage
License
This package is licensed under the MIT License.
Thank you for choosing CloudPrime for your file management needs!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cloudprime-1.1.1.tar.gz.
File metadata
- Download URL: cloudprime-1.1.1.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f03fedf8f23888a140b12916dfdd7c802166c3dae2c2bf189859e147bee23580
|
|
| MD5 |
d866486f38009cdbef649857df969335
|
|
| BLAKE2b-256 |
648a7e04be39744ef387f8d035911321a5331ceee75e8aac45b531d7df009e84
|
File details
Details for the file cloudprime-1.1.1-py3-none-any.whl.
File metadata
- Download URL: cloudprime-1.1.1-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d160eb4bd263617694a9e246cf3a935683f5ceddda7ddb257dcaddcd667f739d
|
|
| MD5 |
e12264aad8b237c032ef16780616f1fb
|
|
| BLAKE2b-256 |
827882774b6c15109605b1d2a68a8a2641fe3e14bc1d80dbeb5302e3a8db3015
|