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.

sncloud is intended for integrating your Supernote Cloud files into other apps. Yes, there are other cloud providers integrated into the Supernote which are easier to develop for, but only the Supernote Cloud offer "auto sync" at the moment. The Supernote APIs are extensive but this library only covers the subset that most developers will need for common filesystem actions such as list, download and upload files.

So while it doesn't currently cover every endpoint (for example you cannot delete, move or rename files) it will likely work for you. That said, PRs are weclome.

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

Installation

pip install sncloud

Usage

Python API

from sncloud 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
sncloud login

# List files in the root directory
sncloud ls

# List files in a specific directory
sncloud ls /Notes

# Download a file
sncloud get /Notes/document.note

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

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

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

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

# Create a new folder
sncloud mkdir NewFolder --parent /Notes

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

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

Roadmap

  • CLI/SHELL script
  • Example scripts
  • Advanced API calls
  • Get Supernote Cloud API complete
  • Docker container

Want to contribute?

PRs are welcome. But please open an issue first to see if the proposed feature fits with the direction of this library.

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

sncloud-0.2.0.tar.gz (21.9 kB view details)

Uploaded Source

Built Distribution

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

sncloud-0.2.0-py3-none-any.whl (13.5 kB view details)

Uploaded Python 3

File details

Details for the file sncloud-0.2.0.tar.gz.

File metadata

  • Download URL: sncloud-0.2.0.tar.gz
  • Upload date:
  • Size: 21.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.6.12

File hashes

Hashes for sncloud-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c0dfc8af37b3c03966f1ce73b4fceea16a82d75e6ddf857226feffcbab1f90e9
MD5 6162403d1b29070be318a96f90188b01
BLAKE2b-256 a7c73ef67d5ebc90e4958d97eb2a075bb0bcbec13ba8104b5fb849ca971c3d3f

See more details on using hashes here.

File details

Details for the file sncloud-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: sncloud-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.6.12

File hashes

Hashes for sncloud-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 81d015c87fef005eb0a6a6d073eb5af6553f1907cf4225596fc2842359f50f45
MD5 5e59c418b875c9204e5df131d781ccbc
BLAKE2b-256 bc179594a9971a1999dc85de7a553e85f0fc6f2cc4535e46b37bdd428d216145

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