pCloud SDK for Python¶
A modern Python SDK for the pCloud API with automatic token management and real-time progress tracking.
ð Quick Start¶
from pcloud_sdk import PCloudSDK
# Simple login with automatic token management (RECOMMENDED)
sdk 💾PCloudSDK() # Defaults: EU server, direct auth, token manager enabled
sdk.login("your_email@example.com", "your_password")
# Immediate usage
user_info 💾sdk.user.get_info()
print(f"Welcome, {user_info['email']}!")
# Upload a file with progress tracking
result 💾sdk.file.upload("./local_file.pdf", folder_id=0)
print(f"File uploaded: {result['metadata'][0]['name']}")
# Download a file
sdk.file.download(file_id=12345, path="./downloads/")
✅¨ Key Features¶
- ð Automatic Token Management - Never worry about token expiration again
- ð Real-time Progress Tracking - Built-in progress bars and custom callbacks
- ð Multi-region Support - US and EU server support with auto-detection
- ð¡ï¸ Type Safety - Full type hints for better IDE support
- ✅¡ Modern Architecture - Clean, Pythonic API design
- 𧪠Comprehensive Testing - 95%+ test coverage with integration tests
- ð Rich Documentation - Detailed guides, examples, and API reference
ð¯ Perfect For¶
- File Management Applications - Upload, download, organize files in pCloud
- Backup Solutions - Automated backup scripts with progress monitoring
- Data Migration Tools - Move data to/from pCloud with reliable error handling
- Cloud Integration - Integrate pCloud into existing Python applications
ð Why This SDK?¶
| Feature | pCloud SDK | Other Solutions |
|---|---|---|
| Token Management | ✅ Automatic | ✅ Manual |
| Progress Tracking | ✅ Built-in | ✅ Custom implementation |
| Type Safety | ✅ Full type hints | ✅ Limited |
| Error Handling | ✅ Comprehensive | ✅ Basic |
| Documentation | ✅ Extensive | ✅ Minimal |
| Testing | ✅ 95%+ coverage | ✅ Limited |
ð Documentation Structure¶
- Installation - Get up and running quickly
- Authentication - Login methods and token management
- Examples - Common use cases and code samples
- API Reference - Complete API documentation
- Progress Callbacks - Track upload/download progress
- Troubleshooting - Common issues and solutions
- Development - Contributing and development setup
ð¤ Contributing¶
We welcome contributions! Please see our Development Guide for details on:
- Setting up the development environment
- Running tests and linting
- Submitting pull requests
- Reporting issues
ð License¶
This project is licensed under the MIT License - see the LICENSE file for details.