Skip to main content

A Python wrapper for the Notesnook Inbox API.

Project description

A Python Handler for the Notesnook Inbox API.

Features

  • Encrypts items locally before they leave your machine.
  • Supports self-hosted notesnook servers, even those that do not host an Inbox API server. (This library replaces the need to use the Inbox API server.)
  • Supports multiple Notesnook accounts & servers at once.

Installation

Installation via pip is simple:

pip install nn-inbox-api

Usage

from nn_inbox_api import Notesnook_Inbox
inbox = Notesnook_Inbox(apikey="yourapikey")
inbox_on_selfhosted = Notesnook_Inbox(apikey="yourapikey",server="https://nn-api-server.your-server.tld/inbox/") # the sync server has the functionality to allow users to send pre-encrypted messages at the /inbox/ endpoint.

##########
# The most basic create note is shown below:
# create_note("Title", "Content (html)", "Note Source")
# A full list of attributes is available here: https://help.notesnook.com/inbox-api/getting-started#3-send-data-to-the-inbox

# A realistic example of a note might be...
inbox.create_note("Title", "<h1>Paragraphs are cool!</h1><p>I'm a paragraph!</p>", "from the nn-inbox-api python script", archived=True)

Usage on Windows

Because Windows (and other OSes) may have gpg installed in a non-standard place at times (for example, maybe you use the scoop package manager), this tool now supports passing in a string object in Notesnook_Inbox() creation.

from nn_inbox_api import Notesnook_Inbox
inbox = Notesnook_Inbox(apikey="yourapikey", gpgbinary="/path/to/binary/gpg.exe")

Sending Large Content to Notesnook.

This tool allows you to send slightly more content to Notesnook (About 12 megabytes of text) than the official Inbox server would allow normally. This may result in items being discarded, rejected by the server, or you being unable to sync these items after opening them in Notesnook. You should try to stay within the recommended 10 megabyte limit, but I won't stop items that are slightly over this limit from being sent to Notesnook. Do so at your own risk.

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

nn_inbox_api-0.1.5.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

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

nn_inbox_api-0.1.5-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file nn_inbox_api-0.1.5.tar.gz.

File metadata

  • Download URL: nn_inbox_api-0.1.5.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for nn_inbox_api-0.1.5.tar.gz
Algorithm Hash digest
SHA256 6299bd0fdd41217e2d60966aebba759cf8462e2eb0c7e6092468e6418cf74ed6
MD5 89b408d9f20a19bfccc350dc81fee854
BLAKE2b-256 968a61558fa6a2a22cfdb3231bb76aa58620b007acb5317864a9ff9c76b0c8b5

See more details on using hashes here.

File details

Details for the file nn_inbox_api-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: nn_inbox_api-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for nn_inbox_api-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 6b8773c550aa02f29586f1bd5fec5a6d1c68857ba0db261e73bc1cb4267bfc5f
MD5 ba6c2fd7ce94f552aadff680bdf4f1d1
BLAKE2b-256 a42186156a0a9d2deb3c7de4badc375f20276a3686fb3a0fe9487c7a2d99a36a

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