Skip to main content

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

Release files for onenote-enterprise 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for onenote-enterprise 1.0.1
File Size Uploaded
onenote_enterprise-1.0.1.tar.gz 28.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for onenote-enterprise 1.0.1
File Interpreter ABI Platform
onenote_enterprise-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 64.5 kB

Release files / onenote_enterprise-1.0.1.tar.gz

Download URL onenote_enterprise-1.0.1.tar.gz
Size 28.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9ab09b0dc93fe37a0e6f6cf8dd4a91b0fa1236c8adb6d0a80112be032c3cf5fa
BLAKE2b-256 checksum
How to use checksums
bbd2628624b16c228d576e3d58fcfbe8f6a426bfef3253416811ac2d484d183a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.0

Release files / onenote_enterprise-1.0.1-py3-none-any.whl

Download URL onenote_enterprise-1.0.1-py3-none-any.whl
Size 35.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8c591e8ffe0516bbd66e5d7a3a2a8d90d58b78e3305004a42d289754a3a809d4
BLAKE2b-256 checksum
How to use checksums
f77321afe4e2b5a55aeb517250fa18f0adc30cc89abc81e77b230f4e22317551
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.0

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page