Skip to main content

A Python client for connecting to a Supernote Private Cloud Instance.

Project description

Supernote Private Cloud Python Client

A Python client for connecting to a Supernote Private Cloud Instance. Useful for automating tasks like uploading content to your Supernote device.

Requires Python 3.10+

Install

pip install snpvclient

Usage and Examples

Setup the client and connect to private cloud.

import snpvclient as sn
snclient = sn.SNPClient( 'https://supernote.example.com' )
snclient.login( 'email@example.com', 'password' )

Get root folder and file list

root_folder = snclient.getList()

Get list of folders and files for a specific id

folder_list = snclient.getList( '78236046000054508' ) # id

Upload a file

upload = snclient.upload(file_path, directoryId)

Delete a file

delete = snclient.delete( 'directoryId', [ 'document id', 'document id' ] )

Get url of rendered PNG of all pages of a .note file.

png = snclient.getPNG( 'document id' )

Get url of all rendered PDF of a .note file. Pass specific page numbers as a list or a blank list for all pages.

pdf = snclient.getPDF( 'document id', [ 'pageNo' ] )

Actions

List all folders and files

sn.actions.list_folder( snclient )

Upload to a specific folder on your device. In this case, it will upload test_file.pdf to Research folder under the main Note folder.

sn.actions.upload_to_folder( snclient, 'test_file.pdf', 'Note/Research')

You can also use the shortcut action to common Supernote folders

sn.actions.upload_to_inbox( snclient, 'test_file.pdf' ) # Inbox
sn.actions.upload_to_document( snclient, 'test_file.pdf' ) # Document
sn.actions.upload_to_note( snclient, 'test_file.pdf' ) # Note

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

snpvclient-0.1.6.tar.gz (52.1 kB view details)

Uploaded Source

Built Distribution

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

snpvclient-0.1.6-py3-none-any.whl (41.7 kB view details)

Uploaded Python 3

File details

Details for the file snpvclient-0.1.6.tar.gz.

File metadata

  • Download URL: snpvclient-0.1.6.tar.gz
  • Upload date:
  • Size: 52.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for snpvclient-0.1.6.tar.gz
Algorithm Hash digest
SHA256 bb8fb62994dee80018764974d404fb6e3f2fe703030eccb4378904614ff30ab4
MD5 79be753a3aab0ee7c4c2cc5203b85c7e
BLAKE2b-256 a3b1b9e385ba91bd1dcde8586cec98b9696771d45c107ffc3fa037052521091f

See more details on using hashes here.

File details

Details for the file snpvclient-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: snpvclient-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 41.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for snpvclient-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 0813f65ba47a388f92bb9dba109035ae74566b1cc6043ff239f120c606b15379
MD5 3030fabaa5e5d4be990ec9ae2a256f2c
BLAKE2b-256 dccb6ccadb286e0d8829129021d4f544cba4d152e0b2b3b810a15f2c3b8cdc95

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