A Python wrapper and future reimplementation of the ddvk/rmapi tool for accessing reMarkable tablet files through the Cloud API.
pyrmapi provides a Pythonic interface to manage files on your reMarkable tablet. Currently, it wraps the excellent rmapi Go application by ddvk, but the long-term goal is to gradually reimplement the functionality in pure Python.
- Automatic rmapi Setup: Downloads and configures the latest rmapi binary automatically
- File Upload: Upload PDF files and other documents to your reMarkable tablet
- Directory Management: Create and manage directory structures on your tablet
- Python API: Clean, Pythonic interface for reMarkable operations
- Configuration Management: Handles authentication and configuration seamlessly
# Clone the repository
git clone <repository-url>
cd pyrmapifrom pyrmapi import RMAPI
# Initialize the API (downloads rmapi if needed)
rm = RMAPI()
# Create directory structure
rm.ensure_directory("research")
# Upload a file
success = rm.upload(
file_path="./paper.pdf",
remote_directory="/papers/research",
remote_file_name="Important Research Paper"
)
if success:
print("File uploaded successfully!")pyrmapi uses the same configuration as the underlying rmapi tool:
-
Config Path: By default, authentication tokens are stored in
./.rmapi. You can specify a custom path:rm = RMAPI(config_path="/path/to/custom/config")
-
Environment Variables:
RMAPI_CONFIG: Custom filepath for authentication tokensRMAPI_TRACE=1: Enable trace loggingRMAPI_USE_HIDDEN_FILES=1: Include hidden files/directories
Initialize the RMAPI client with optional custom config path.
Download and set up the rmapi binary if not already present.
Create directory structure /papers/<classification> if it doesn't exist.
Parameters:
classification: Name of the subdirectory under/papers/
Returns: True if successful, False otherwise
Upload a file to the reMarkable tablet.
Parameters:
file_path: Local path to the file to uploadremote_directory: Target directory on the tabletremote_file_name: Optional custom name for the uploaded file
Returns: True if successful, False otherwise
This project is in active development with the following planned phases:
- � Wrap rmapi binary with Python interface
- � Automatic binary management and setup
- � Basic file operations (upload, directory creation)
- =� Extended file operations (download, delete, move)
- =� Complete directory management
- =� File listing and search functionality
- =� Reimplement authentication in Python
- =� Python-based file metadata operations
- =� Keep binary for complex operations temporarily
- =� Full reMarkable Cloud API implementation
- =� Native PDF handling and annotation support
- =� Remove dependency on rmapi binary
- =� Enhanced features and performance optimizations
Contributions are welcome! Whether you're interested in:
- Extending the current wrapper functionality
- Helping with the pure Python reimplementation
- Improving documentation and examples
- Adding tests and CI/CD
Please feel free to open issues and pull requests.
Currently depends on:
- The rmapi binary (automatically downloaded)
- Python 3.11+
- Standard library modules (urllib, subprocess, tarfile, pathlib)
MIT
- ddvk and contributors to rmapi for the excellent Go implementation
- juruen for the original rmapi project
- The reMarkable community for reverse engineering the Cloud API
- rmapi - The original Go implementation