Skip to main content

Production-grade Microsoft OneNote connector via Graph API

Project description

onenote_connector

Production-grade Python module for extracting content from Microsoft OneNote via Microsoft Graph API.

Installation

pip install -r requirements.txt

Quick Start

from onenote_connector import OneNoteConnector

connector = OneNoteConnector(access_token="your_bearer_token") result = connector.get_content_from_url("https://...sharepoint.com/...")

Methods

  • get_content_from_url(url) → list[dict]
  • get_all_notebooks() → list[dict]
  • get_notebook_by_name(name) → list[dict]

Output Fields Per Page

Field Type Description
id str Graph API page ID
title str Page title
content str Plain text content
paragraphs list Text paragraphs
headings list h1-h6 headings
blocks list Ordered text blocks with type and heading level when applicable
tables list Tables with rows
lists list ul and ol lists
tags list OneNote tags
hyperlinks list Links
attachments list File attachments
loop_components list Loop / Fluid placeholders pointing to separate .loop files
images list Base64 images
permissions list Who has access

Error Handling

Exception When
AuthenticationError Token expired or invalid
InvalidURLError URL cannot be parsed
NotFoundError Notebook/page not found
RateLimitError Graph API throttling
ParseError HTML parsing failed
NetworkError Connection timeout

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

onenote_connector-1.0.2.tar.gz (29.0 kB view details)

Uploaded Source

Built Distribution

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

onenote_connector-1.0.2-py3-none-any.whl (36.1 kB view details)

Uploaded Python 3

File details

Details for the file onenote_connector-1.0.2.tar.gz.

File metadata

  • Download URL: onenote_connector-1.0.2.tar.gz
  • Upload date:
  • Size: 29.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.0

File hashes

Hashes for onenote_connector-1.0.2.tar.gz
Algorithm Hash digest
SHA256 092654f67a9a4cad6b2b69c569138217bf82912341cea2005edee291ad88a5cc
MD5 3f06d768f84a35913e0742612a34c2c1
BLAKE2b-256 14d2d8b822a63a9cec98719fff45b29d0bede7b27ceb34e53d40357d72aca596

See more details on using hashes here.

File details

Details for the file onenote_connector-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for onenote_connector-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3b63fccb072207d0e81ede9de1db98a0d6ce014f0d94086c6f90ad0a36b835f7
MD5 cda81086e94c08e051210a63e798b22a
BLAKE2b-256 5a64a451e73ae67e525e21ef393eedb5beb3e5c08aae54d56edf94ca68168cc8

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