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_enterprise-1.0.1.tar.gz (28.7 kB view details)

Uploaded Source

Built Distribution

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

onenote_enterprise-1.0.1-py3-none-any.whl (35.8 kB view details)

Uploaded Python 3

File details

Details for the file onenote_enterprise-1.0.1.tar.gz.

File metadata

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

File hashes

Hashes for onenote_enterprise-1.0.1.tar.gz
Algorithm Hash digest
SHA256 9ab09b0dc93fe37a0e6f6cf8dd4a91b0fa1236c8adb6d0a80112be032c3cf5fa
MD5 9e630e0a01a95d4d182a4bb22061c0eb
BLAKE2b-256 bbd2628624b16c228d576e3d58fcfbe8f6a426bfef3253416811ac2d484d183a

See more details on using hashes here.

File details

Details for the file onenote_enterprise-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for onenote_enterprise-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8c591e8ffe0516bbd66e5d7a3a2a8d90d58b78e3305004a42d289754a3a809d4
MD5 8671790c60889fab3bdd3dbaa19b5df1
BLAKE2b-256 f77321afe4e2b5a55aeb517250fa18f0adc30cc89abc81e77b230f4e22317551

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