nblm


Namenblm JSON
Version 0.1.5 PyPI version JSON
download
home_pagehttps://github.com/K-dash/nblm-rs
SummaryPython bindings for NotebookLM Enterprise API client
upload_time2025-10-26 09:48:50
maintainerNone
docs_urlNone
authorK-dash
requires_python>=3.14
licenseMIT
keywords notebooklm api google-cloud gemini
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # nblm - Python SDK for NotebookLM Enterprise API

Python bindings for the NotebookLM Enterprise API, powered by Rust via PyO3.

> **Warning**: This is an unofficial tool and is not affiliated with or endorsed by Google. Use at your own risk.

## Installation

```bash
pip install nblm
```

Or with uv:

```bash
uv add nblm
```

**Requirements**: Python 3.14 or later

## Quick Start

```python
from nblm import NblmClient, GCloudTokenProvider

# Initialize client
client = NblmClient(
    token_provider=GCloudTokenProvider(),
    project_number="123456789012"
)

# Create a notebook
notebook = client.create_notebook("My Notebook")
print(f"Created: {notebook.title}")

# Add sources
from nblm import WebSource

client.add_sources(
    notebook_id=notebook.notebook_id,
    web_sources=[WebSource(url="https://example.com", name="Example")]
)

# Create audio overview
audio = client.create_audio_overview(notebook.notebook_id)
print(f"Audio status: {audio.status}")
```

## Features

- **Notebooks**: Create, list, and delete notebooks
- **Sources**: Add web, text, video sources; upload files; manage sources
- **Audio Overviews**: Create podcast-style discussions from notebook content
- **Type Safety**: Full type hints for IDE autocomplete and static analysis
- **Fast**: Powered by Rust for high performance

## Authentication

### gcloud CLI (Recommended)

```python
from nblm import NblmClient, GCloudTokenProvider

client = NblmClient(
    token_provider=GCloudTokenProvider(),
    project_number="123456789012"
)
```

### Environment Variable

```python
import os
from nblm import NblmClient, EnvTokenProvider

os.environ["NBLM_ACCESS_TOKEN"] = "your-access-token"

client = NblmClient(
    token_provider=EnvTokenProvider(),
    project_number="123456789012"
)
```

## Documentation

**Complete Python SDK documentation:**

- [Getting Started Guide](https://github.com/K-dash/nblm-rs/blob/main/docs/getting-started/installation.md)
- [Quickstart Tutorial](https://github.com/K-dash/nblm-rs/blob/main/docs/python/quickstart.md)
- [API Reference](https://github.com/K-dash/nblm-rs/blob/main/docs/python/api-reference.md)
- [Notebooks API](https://github.com/K-dash/nblm-rs/blob/main/docs/python/notebooks.md)
- [Sources API](https://github.com/K-dash/nblm-rs/blob/main/docs/python/sources.md)
- [Audio API](https://github.com/K-dash/nblm-rs/blob/main/docs/python/audio.md)
- [Error Handling](https://github.com/K-dash/nblm-rs/blob/main/docs/python/error-handling.md)

## Examples

### Create Notebook and Add Sources

```python
from nblm import NblmClient, GCloudTokenProvider, WebSource, TextSource

client = NblmClient(
    token_provider=GCloudTokenProvider(),
    project_number="123456789012"
)

# Create notebook
notebook = client.create_notebook("Research: Python Best Practices")

# Add sources
client.add_sources(
    notebook_id=notebook.notebook_id,
    web_sources=[
        WebSource(url="https://peps.python.org/pep-0008/", name="PEP 8"),
        WebSource(url="https://docs.python-guide.org/")
    ],
    text_sources=[
        TextSource(content="Focus on code quality", name="Notes")
    ]
)
```

### Upload Files

```python
# Upload a PDF
response = client.upload_source_file(
    notebook_id=notebook.notebook_id,
    path="/path/to/document.pdf",
    display_name="Research Paper"
)
print(f"Uploaded: {response.source_id}")
```

### Error Handling

```python
from nblm import NblmError

try:
    notebook = client.create_notebook("My Notebook")
except NblmError as e:
    print(f"Error: {e}")
```

## Type Hints

The library includes full type hints:

```python
from nblm import (
    NblmClient,
    Notebook,
    NotebookSource,
    AudioOverviewResponse,
    WebSource,
    TextSource,
    VideoSource,
)

# All operations are fully typed
client: NblmClient
notebook: Notebook = client.create_notebook("Title")
audio: AudioOverviewResponse = client.create_audio_overview("abc123")
```

## Supported Operations

| Category           | Operations                                        | Status        |
| ------------------ | ------------------------------------------------- | ------------- |
| **Notebooks**      | Create, list, delete                              | Available     |
| **Sources**        | Add (web, text, video), upload files, get, delete | Available     |
| **Audio Overview** | Create, delete                                    | Available     |
| **Sharing**        | Share with users                                  | Not available |

## Links

- [GitHub Repository](https://github.com/K-dash/nblm-rs)
- [Full Documentation](https://github.com/K-dash/nblm-rs/tree/main/docs)
- [CLI Tool](https://crates.io/crates/nblm-cli)
- [Issue Tracker](https://github.com/K-dash/nblm-rs/issues)

## Contributing

See [CONTRIBUTING.md](https://github.com/K-dash/nblm-rs/blob/main/CONTRIBUTING.md) for development setup and guidelines.

## License

MIT


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/K-dash/nblm-rs",
    "name": "nblm",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.14",
    "maintainer_email": null,
    "keywords": "notebooklm, api, google-cloud, gemini",
    "author": "K-dash",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/00/5d/74b589e93d131492603860701898168f01fb882958731a9f931a6e362080/nblm-0.1.5.tar.gz",
    "platform": null,
    "description": "# nblm - Python SDK for NotebookLM Enterprise API\n\nPython bindings for the NotebookLM Enterprise API, powered by Rust via PyO3.\n\n> **Warning**: This is an unofficial tool and is not affiliated with or endorsed by Google. Use at your own risk.\n\n## Installation\n\n```bash\npip install nblm\n```\n\nOr with uv:\n\n```bash\nuv add nblm\n```\n\n**Requirements**: Python 3.14 or later\n\n## Quick Start\n\n```python\nfrom nblm import NblmClient, GCloudTokenProvider\n\n# Initialize client\nclient = NblmClient(\n    token_provider=GCloudTokenProvider(),\n    project_number=\"123456789012\"\n)\n\n# Create a notebook\nnotebook = client.create_notebook(\"My Notebook\")\nprint(f\"Created: {notebook.title}\")\n\n# Add sources\nfrom nblm import WebSource\n\nclient.add_sources(\n    notebook_id=notebook.notebook_id,\n    web_sources=[WebSource(url=\"https://example.com\", name=\"Example\")]\n)\n\n# Create audio overview\naudio = client.create_audio_overview(notebook.notebook_id)\nprint(f\"Audio status: {audio.status}\")\n```\n\n## Features\n\n- **Notebooks**: Create, list, and delete notebooks\n- **Sources**: Add web, text, video sources; upload files; manage sources\n- **Audio Overviews**: Create podcast-style discussions from notebook content\n- **Type Safety**: Full type hints for IDE autocomplete and static analysis\n- **Fast**: Powered by Rust for high performance\n\n## Authentication\n\n### gcloud CLI (Recommended)\n\n```python\nfrom nblm import NblmClient, GCloudTokenProvider\n\nclient = NblmClient(\n    token_provider=GCloudTokenProvider(),\n    project_number=\"123456789012\"\n)\n```\n\n### Environment Variable\n\n```python\nimport os\nfrom nblm import NblmClient, EnvTokenProvider\n\nos.environ[\"NBLM_ACCESS_TOKEN\"] = \"your-access-token\"\n\nclient = NblmClient(\n    token_provider=EnvTokenProvider(),\n    project_number=\"123456789012\"\n)\n```\n\n## Documentation\n\n**Complete Python SDK documentation:**\n\n- [Getting Started Guide](https://github.com/K-dash/nblm-rs/blob/main/docs/getting-started/installation.md)\n- [Quickstart Tutorial](https://github.com/K-dash/nblm-rs/blob/main/docs/python/quickstart.md)\n- [API Reference](https://github.com/K-dash/nblm-rs/blob/main/docs/python/api-reference.md)\n- [Notebooks API](https://github.com/K-dash/nblm-rs/blob/main/docs/python/notebooks.md)\n- [Sources API](https://github.com/K-dash/nblm-rs/blob/main/docs/python/sources.md)\n- [Audio API](https://github.com/K-dash/nblm-rs/blob/main/docs/python/audio.md)\n- [Error Handling](https://github.com/K-dash/nblm-rs/blob/main/docs/python/error-handling.md)\n\n## Examples\n\n### Create Notebook and Add Sources\n\n```python\nfrom nblm import NblmClient, GCloudTokenProvider, WebSource, TextSource\n\nclient = NblmClient(\n    token_provider=GCloudTokenProvider(),\n    project_number=\"123456789012\"\n)\n\n# Create notebook\nnotebook = client.create_notebook(\"Research: Python Best Practices\")\n\n# Add sources\nclient.add_sources(\n    notebook_id=notebook.notebook_id,\n    web_sources=[\n        WebSource(url=\"https://peps.python.org/pep-0008/\", name=\"PEP 8\"),\n        WebSource(url=\"https://docs.python-guide.org/\")\n    ],\n    text_sources=[\n        TextSource(content=\"Focus on code quality\", name=\"Notes\")\n    ]\n)\n```\n\n### Upload Files\n\n```python\n# Upload a PDF\nresponse = client.upload_source_file(\n    notebook_id=notebook.notebook_id,\n    path=\"/path/to/document.pdf\",\n    display_name=\"Research Paper\"\n)\nprint(f\"Uploaded: {response.source_id}\")\n```\n\n### Error Handling\n\n```python\nfrom nblm import NblmError\n\ntry:\n    notebook = client.create_notebook(\"My Notebook\")\nexcept NblmError as e:\n    print(f\"Error: {e}\")\n```\n\n## Type Hints\n\nThe library includes full type hints:\n\n```python\nfrom nblm import (\n    NblmClient,\n    Notebook,\n    NotebookSource,\n    AudioOverviewResponse,\n    WebSource,\n    TextSource,\n    VideoSource,\n)\n\n# All operations are fully typed\nclient: NblmClient\nnotebook: Notebook = client.create_notebook(\"Title\")\naudio: AudioOverviewResponse = client.create_audio_overview(\"abc123\")\n```\n\n## Supported Operations\n\n| Category           | Operations                                        | Status        |\n| ------------------ | ------------------------------------------------- | ------------- |\n| **Notebooks**      | Create, list, delete                              | Available     |\n| **Sources**        | Add (web, text, video), upload files, get, delete | Available     |\n| **Audio Overview** | Create, delete                                    | Available     |\n| **Sharing**        | Share with users                                  | Not available |\n\n## Links\n\n- [GitHub Repository](https://github.com/K-dash/nblm-rs)\n- [Full Documentation](https://github.com/K-dash/nblm-rs/tree/main/docs)\n- [CLI Tool](https://crates.io/crates/nblm-cli)\n- [Issue Tracker](https://github.com/K-dash/nblm-rs/issues)\n\n## Contributing\n\nSee [CONTRIBUTING.md](https://github.com/K-dash/nblm-rs/blob/main/CONTRIBUTING.md) for development setup and guidelines.\n\n## License\n\nMIT\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python bindings for NotebookLM Enterprise API client",
    "version": "0.1.5",
    "project_urls": {
        "Bug Tracker": "https://github.com/K-dash/nblm-rs/issues",
        "Homepage": "https://github.com/K-dash/nblm-rs",
        "Repository": "https://github.com/K-dash/nblm-rs"
    },
    "split_keywords": [
        "notebooklm",
        " api",
        " google-cloud",
        " gemini"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d55192ed361d079982fd038c6274cb392c019eeb6abeaade898354f5d7e9f1c3",
                "md5": "36bdde99094fe160fc12ce68f392b57d",
                "sha256": "5283bfe9e048bb7e0c9e8a9ab2f0003c40872f1eaba8785863d29bc1e6808d0c"
            },
            "downloads": -1,
            "filename": "nblm-0.1.5-cp312-abi3-macosx_10_12_x86_64.whl",
            "has_sig": false,
            "md5_digest": "36bdde99094fe160fc12ce68f392b57d",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.14",
            "size": 2519563,
            "upload_time": "2025-10-26T09:48:43",
            "upload_time_iso_8601": "2025-10-26T09:48:43.443622Z",
            "url": "https://files.pythonhosted.org/packages/d5/51/92ed361d079982fd038c6274cb392c019eeb6abeaade898354f5d7e9f1c3/nblm-0.1.5-cp312-abi3-macosx_10_12_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "1b22ddf57affc53c508a6c70885da013a939e93d872b9674714609cd8cd946d5",
                "md5": "5220a7fa70e42ab140741bafb863b7fd",
                "sha256": "4e7cbfdbe92174c41229fbfd9eef045dc116ea5fe6b3915b1db238e61d4bee4d"
            },
            "downloads": -1,
            "filename": "nblm-0.1.5-cp312-abi3-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "5220a7fa70e42ab140741bafb863b7fd",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.14",
            "size": 2394858,
            "upload_time": "2025-10-26T09:48:44",
            "upload_time_iso_8601": "2025-10-26T09:48:44.970788Z",
            "url": "https://files.pythonhosted.org/packages/1b/22/ddf57affc53c508a6c70885da013a939e93d872b9674714609cd8cd946d5/nblm-0.1.5-cp312-abi3-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "73ca45c8d61e6bc865d0bc75d034d3ef574d1c7047698aac8661a55be25dfcbf",
                "md5": "8fe7169f80f1265954312ffebab1abe6",
                "sha256": "2a2665caa5d9fb2ee11b9b559444c616f3a279477587036f6440d742ce1ba2b8"
            },
            "downloads": -1,
            "filename": "nblm-0.1.5-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "has_sig": false,
            "md5_digest": "8fe7169f80f1265954312ffebab1abe6",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.14",
            "size": 2685671,
            "upload_time": "2025-10-26T09:48:46",
            "upload_time_iso_8601": "2025-10-26T09:48:46.814624Z",
            "url": "https://files.pythonhosted.org/packages/73/ca/45c8d61e6bc865d0bc75d034d3ef574d1c7047698aac8661a55be25dfcbf/nblm-0.1.5-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b79c059b7e27a5059e516626dd150f30217e00fc1547e2d497ffae64674d73a8",
                "md5": "3c08638031f2ec156c5b5f7218f664f9",
                "sha256": "1d7767d082b603e4f9cb0f1bfdb9bf893f61d2ace16235342e2fd52d77d88964"
            },
            "downloads": -1,
            "filename": "nblm-0.1.5-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "3c08638031f2ec156c5b5f7218f664f9",
            "packagetype": "bdist_wheel",
            "python_version": "cp312",
            "requires_python": ">=3.14",
            "size": 2672316,
            "upload_time": "2025-10-26T09:48:48",
            "upload_time_iso_8601": "2025-10-26T09:48:48.597926Z",
            "url": "https://files.pythonhosted.org/packages/b7/9c/059b7e27a5059e516626dd150f30217e00fc1547e2d497ffae64674d73a8/nblm-0.1.5-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "005d74b589e93d131492603860701898168f01fb882958731a9f931a6e362080",
                "md5": "7574318304268a59e6ce5c9a7778a65d",
                "sha256": "0b71c58d8cac964c58bb3e13d8ac1db0d2b090b2390d10709c129d7c85b03f04"
            },
            "downloads": -1,
            "filename": "nblm-0.1.5.tar.gz",
            "has_sig": false,
            "md5_digest": "7574318304268a59e6ce5c9a7778a65d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.14",
            "size": 47080,
            "upload_time": "2025-10-26T09:48:50",
            "upload_time_iso_8601": "2025-10-26T09:48:50.329532Z",
            "url": "https://files.pythonhosted.org/packages/00/5d/74b589e93d131492603860701898168f01fb882958731a9f931a6e362080/nblm-0.1.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-10-26 09:48:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "K-dash",
    "github_project": "nblm-rs",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "nblm"
}
        
Elapsed time: 1.41126s