Metadata-Version: 2.4
Name: onenote_enterprise
Version: 1.0.1
Summary: Production-grade Microsoft OneNote connector via Graph API
License: MIT
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.31.0
Requires-Dist: beautifulsoup4>=4.12.0
Requires-Dist: lxml>=4.9.0

# 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 |
