Skip to main content

Library-first Python client for the reMarkable cloud API

Project description

remarkapy

A Python package for interacting with the reMarkable Cloud API.

Quickstart

from remarkapy import Client

client = Client()
items = client.list_items()
for item in items[:5]:
    print(item.type, item.visibleName, item.id, item.hash)

Download a raw bundle:

from remarkapy import Client

client = Client()
first = client.list_items()[0]
client.download_raw_bundle(first.hash, "bundle.zip")

Upload a PDF:

from remarkapy import Client

client = Client()
with open("example.pdf", "rb") as handle:
    created = client.put_pdf("Example.pdf", handle.read())
print(created)

CLI examples:

uv run remarkapy init
uv run rkpy ls
uv run rkpy ls Papers/
uv run rkpy ls -r Papers/
uv run rkpy get Papers/Example.pdf
uv run rkpy get Papers/Example.pdf --output ./Example.pdf
uv run rkpy get "Meeting Notes" --format bundle
uv run rkpy export "Meeting Notes" ./exports --format pdf
uv run rkpy info Papers/Example.pdf
uv run remarkapy get-id <item-id-or-hash>
uv run rkpy put-pdf ./example.pdf --parent Papers/
uv run rkpy mkdir Inbox
uv run rkpy rename Papers/Example.pdf "New Name"
uv run rkpy move Papers/Example.pdf Inbox/
uv run rkpy trash Papers/Old Draft.pdf

Why another

As far as I can tell, the major reMarkable client SDKs have all suffered from API churn.

  • rmapy is archived.
  • rmapi is archived (but resurrected??)
  • reMarkable continues to change endpoints and backend behavior.

remarkapy aims to stay useful by:

  • discovering the current public webapp/raw hosts at runtime,
  • supporting the current immutable-manifest sync protocol,
  • exposing a clean Python library API first,
  • keeping real integration tests available behind an explicit opt-in flag.

Optional export backends

  • remarkapy does not render annotations itself.
  • Install the remarks command separately if you want export support (for example: uv tool install git+https://github.com/avncharlie/remarks.git).
  • rkpy export shells out to that installed remarks executable by default, but --remarks-cmd still lets you override it.
  • For single-file PDF/Markdown exports, you can pass an exact output file path like ./notes.pdf; otherwise pass an output directory.
  • remarks needs the system Cairo library for PDF rendering; on macOS install it with brew install cairo.
  • Export output is staged in a temporary bundle and copied back into your requested output directory.

Features

  • Base authentication and device-token reuse
  • Endpoint discovery
  • List documents and folders
  • Download original PDFs and EPUBs
  • Download raw item bundles as zip archives
  • Upload PDFs and EPUBs
  • Create folders
  • Rename items
  • Move items
  • Delete items by moving them to trash
  • Mock-backed pytest suite
  • Read-only live-account smoke tests

Roadmap

  • Download annotated PDFs rendered by the service, if available
  • Add a small CLI wrapper for common operations
  • Add safer live mutation tests using temporary fixtures
  • Add sync-to-directory and sync-from-directory helpers
  • Add device registration from a dedicated command-line flow

Testing

Dangerzone Safety

There are live tests in this repo that interact with the real reMarkable Cloud API. These tests are marked with the live pytest marker and are skipped by default to prevent accidental mutations of real accounts.

The live tests in this repo are intentionally read-only by default.

To run them, opt in explicitly:

REMARKAPY_RUN_LIVE=1 uv run pytest -q -m live

The destructive paths (rename, move, delete, put_*) are covered by the mock test suite. Before adding live destructive tests, use temporary folders or dummy uploads that are safe to clean up.

Injected or mock-backed clients should use in-memory tokens or an explicit test config path; they must not fall back to the default rmapi config location.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

remarkapy-0.1.0.tar.gz (37.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

remarkapy-0.1.0-py3-none-any.whl (30.3 kB view details)

Uploaded Python 3

File details

Details for the file remarkapy-0.1.0.tar.gz.

File metadata

  • Download URL: remarkapy-0.1.0.tar.gz
  • Upload date:
  • Size: 37.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for remarkapy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ba5d75a7cf57d92370290128f6874fc51edbe8fc523c36c831a55bbb1fe7e3cc
MD5 ae67c6f46592c71ea701c067746febf0
BLAKE2b-256 1a430e4164e10a5087569a7b52963fef60b8063d7df8798ded4c6a3722f3c0f0

See more details on using hashes here.

File details

Details for the file remarkapy-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: remarkapy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 30.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for remarkapy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0ea89bf0b81792e4ac4553a1a8b8ff383c4b874f6b169125c2a0ab3ed27dea46
MD5 f5093d5e1af13d87e34a806a15cdf037
BLAKE2b-256 e278ca7a1b2aa2be184b6687c6c279b8bf6dca5da0880fe2c2af0bbb454af79f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page