Skip to main content

Unofficial Python API client that allows you to access your Supernote files through the Supernote Cloud

Project description

Supernote Cloud API Client for Python

Unofficial Python API client that allows you to access your Supernote files through the Supernote Cloud.

This is a maintained continuation of julianprester/sncloud, carrying fixes for the Supernote Cloud API. It is published to PyPI as supernote-cloud and imported as supernote_cloud. Licensed under Apache-2.0; original work © Julian Prester.

supernote-cloud makes Supernote Cloud files programmatically accessible, so notes captured on a Supernote device can flow into the applications, automations, and workflows that rely on them. Supernote syncs to several cloud providers, but only Supernote Cloud offers automatic sync — making it the integration point that keeps that data current without manual exports.

The library focuses on the operations teams reach for most — listing, downloading, uploading, and managing files — rather than exhaustively wrapping the service. Need an endpoint it doesn't cover yet? Open an issue or a pull request.

Core Features

  • 🔑 Login to the Supernote Cloud
  • 🔍 List the files and folders for a parent directory
  • 💾 Get a file and save it locally
  • 📄 Get a note file and convert it to PDF
  • 🖼 Get a note file and convert it to PNG
  • 🔼 Put a file and upload it to the cloud
  • 📂 Make a directory on the cloud
  • 🗑 Delete a file or folder
  • ✏️ Rename a file or folder
  • 📦 Move files/folders to a new directory
  • 📋 Copy files/folders to a new directory
  • 🔍 Walk the directory tree recursively

Installation

pip install supernote-cloud

Usage

Python API

from supernote_cloud import SNClient

client = SNClient()
client.login("test@example.com", "1234") # login with email and password
files = client.ls() # returns a list of the files/directories on the Supernote
print(files)
client.get("/Note/notes.note") # downloads the file with the given path

Command Line Interface

The package also provides a command line interface:

# Login to your Supernote Cloud account
supernote-cloud login

# List files in the root directory
supernote-cloud ls

# List files in a specific directory
supernote-cloud ls /Notes

# Download a file
supernote-cloud get /Notes/document.note

# Download a note as PDF
supernote-cloud get /Notes/document.note --pdf

# Download a note as PNG
supernote-cloud get /Notes/document.note --png

# Download specific pages (works with both PDF and PNG)
supernote-cloud get /Notes/document.note --pdf --pages "1,3,5"

# Set output directory
supernote-cloud get /Notes/document.note --output /path/to/directory

# Create a new folder
supernote-cloud mkdir NewFolder --parent /Notes

# Upload a file
supernote-cloud put /path/to/file.txt --parent /Notes

# Delete a file
supernote-cloud rm /Notes/document.note

# Rename a file or folder
supernote-cloud rename /Notes/old-name.note new-name.note

# Move a file to another directory
supernote-cloud mv /Notes/document.note --destination /Archive

# Move multiple files
supernote-cloud mv /Notes/a.note /Notes/b.note --destination /Archive

# Copy a file to another directory
supernote-cloud cp /Notes/document.note --destination /Backup

# Recursively list all files and folders
supernote-cloud walk
supernote-cloud walk /Notes

The CLI will store your access token in ~/.config/supernote-cloud/config.json and automatically refresh it when needed.

Examples

Runnable scripts for common workflows live in examples/ — backing up a folder tree, batch-exporting notes to PDF, and reorganizing files. See the examples README.

Contributing

PRs are welcome. For anything beyond a small fix, open an issue first so we can make sure it fits the direction of the library before you put in the work.

Acknowledgements

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

supernote_cloud-0.4.0.tar.gz (37.8 kB view details)

Uploaded Source

Built Distribution

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

supernote_cloud-0.4.0-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file supernote_cloud-0.4.0.tar.gz.

File metadata

  • Download URL: supernote_cloud-0.4.0.tar.gz
  • Upload date:
  • Size: 37.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for supernote_cloud-0.4.0.tar.gz
Algorithm Hash digest
SHA256 b9b9c6a1560cb8cf9930ff3e634883b54a303197212f0bb0722a85a338b9aca5
MD5 27edc8fade7d2a3b97d6f8a283b38aa6
BLAKE2b-256 3ca7bafc3450c59c91e98b6ef44641e0ca6f6cfa1ed0e744accae465fe6c7864

See more details on using hashes here.

File details

Details for the file supernote_cloud-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: supernote_cloud-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.19 {"installer":{"name":"uv","version":"0.11.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for supernote_cloud-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d7cd91074831420e1f1e2c04d2513498961d7946e84f24e6fb5007b08778e121
MD5 14741bc08a459d18b1208c411ae128a1
BLAKE2b-256 97a339ee1e7c94415936dc0722755690cfcfd46a81f90e66668626b76e59957a

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