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.0.tar.gz (27.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.0-py3-none-any.whl (34.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: onenote_connector-1.0.0.tar.gz
  • Upload date:
  • Size: 27.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.0.tar.gz
Algorithm Hash digest
SHA256 a625624726207d03747bb1996530b8f55f4ccfd68a6bfd2332be166319271f33
MD5 ce9a79825d6ca4a5158aed7e82a97e94
BLAKE2b-256 6144207bb4c37206ec72e87209746971f3a9afa09a3c9c40bd17d45cd627391a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for onenote_connector-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9e8b5ef9487685976c56c37adab81d10dff9490f3ca8a3d758632888f2bd2a0a
MD5 267bd415b4799d226bd2b7b41d582336
BLAKE2b-256 21614b7039407186aba0fc78090f32f7ad4c8939f52a181fe6f402007b86a64b

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