Metadata-Version: 2.4
Name: langchain-google-classroom
Version: 0.2.0
Summary: An integration package connecting Google Classroom and LangChain
Project-URL: Homepage, https://github.com/ayanokojix21/langchain-google-classroom
Project-URL: Source Code, https://github.com/ayanokojix21/langchain-google-classroom/tree/main/libs/google-classroom
Project-URL: Repository, https://github.com/ayanokojix21/langchain-google-classroom
Project-URL: Issues, https://github.com/ayanokojix21/langchain-google-classroom/issues
Project-URL: Documentation, https://github.com/ayanokojix21/langchain-google-classroom#readme
Project-URL: Changelog, https://github.com/ayanokojix21/langchain-google-classroom/blob/main/CHANGELOG.md
Author: Nishchal Chandel
License: MIT
Keywords: document-loader,education,google-classroom,langchain,rag
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: Pydantic :: 2
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Education
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: <4.0.0,>=3.10.0
Requires-Dist: google-api-python-client<3.0.0,>=2.100.0
Requires-Dist: google-auth-httplib2<1.0.0,>=0.2.0
Requires-Dist: google-auth-oauthlib<2.0.0,>=1.2.0
Requires-Dist: google-auth<3.0.0,>=2.25.0
Requires-Dist: langchain-core<1.0.0,>=0.3.0
Requires-Dist: pydantic<3.0.0,>=2.0.0
Provides-Extra: dev
Requires-Dist: mypy<2.0.0,>=1.10.0; extra == 'dev'
Requires-Dist: pypdf<5.0.0,>=4.0.0; extra == 'dev'
Requires-Dist: pytest-asyncio<2.0.0,>=0.21.1; extra == 'dev'
Requires-Dist: pytest-cov<8.0.0,>=4.0.0; extra == 'dev'
Requires-Dist: pytest-mock<4.0.0,>=3.10.0; extra == 'dev'
Requires-Dist: pytest-socket<1.0.0,>=0.7.0; extra == 'dev'
Requires-Dist: pytest<10.0.0,>=7.3.0; extra == 'dev'
Requires-Dist: python-docx<2.0.0,>=1.0.0; extra == 'dev'
Requires-Dist: ruff<1,>=0.5.0; extra == 'dev'
Provides-Extra: lint
Requires-Dist: ruff<1,>=0.5.0; extra == 'lint'
Provides-Extra: parsers
Requires-Dist: pypdf<5.0.0,>=4.0.0; extra == 'parsers'
Requires-Dist: python-docx<2.0.0,>=1.0.0; extra == 'parsers'
Provides-Extra: test
Requires-Dist: langchain-tests<1.0.0,>=0.3.0; extra == 'test'
Requires-Dist: pytest-asyncio<2.0.0,>=0.21.1; extra == 'test'
Requires-Dist: pytest-cov<8.0.0,>=4.0.0; extra == 'test'
Requires-Dist: pytest-mock<4.0.0,>=3.10.0; extra == 'test'
Requires-Dist: pytest-socket<1.0.0,>=0.7.0; extra == 'test'
Requires-Dist: pytest<10.0.0,>=7.3.0; extra == 'test'
Provides-Extra: typing
Requires-Dist: mypy<2.0.0,>=1.10.0; extra == 'typing'
Description-Content-Type: text/markdown

# langchain-google-classroom

[![PyPI - Version](https://img.shields.io/pypi/v/langchain-google-classroom?label=%20)](https://pypi.org/project/langchain-google-classroom/#history)
[![PyPI - License](https://img.shields.io/pypi/l/langchain-google-classroom)](https://opensource.org/licenses/MIT)
[![PyPI - Downloads](https://img.shields.io/pepy/dt/langchain-google-classroom)](https://pypistats.org/packages/langchain-google-classroom)
[![CI](https://github.com/ayanokojix21/langchain-google-classroom/actions/workflows/ci.yml/badge.svg)](https://github.com/ayanokojix21/langchain-google-classroom/actions/workflows/ci.yml)

An integration package connecting **Google Classroom** and **LangChain**.

Load courses, assignments, announcements, materials, student submissions, rubrics,
topics, rosters, and file attachments as structured LangChain `Document` objects
— ready for RAG pipelines, AI teaching assistants, and educational analytics.

## Installation

```bash
pip install langchain-google-classroom
```

With optional parsers for PDF and DOCX attachments:

```bash
pip install "langchain-google-classroom[parsers]"
```

## Quick Start

```python
from langchain_google_classroom import GoogleClassroomLoader

# OAuth (opens browser on first run)
loader = GoogleClassroomLoader(
    course_ids=["123456789"],
)
docs = loader.load()

for doc in docs:
    print(f"[{doc.metadata['content_type']}] {doc.metadata.get('title', '')}")
```

### Service Account

```python
loader = GoogleClassroomLoader(
    service_account_file="service_account.json",
)
```

### With Attachments and Vision LLM

```python
from langchain_google_genai import ChatGoogleGenerativeAI

loader = GoogleClassroomLoader(
    course_ids=["123456789"],
    load_attachments=True,
    vision_model=ChatGoogleGenerativeAI(model="gemini-2.0-flash"),
)
```

### Student Submissions, Topics, and Roster

```python
loader = GoogleClassroomLoader(
    course_ids=["123456789"],
    load_submissions=True,
    load_topics=True,
    load_roster=True,
)
```

## Features

- **Full Classroom API coverage** — assignments, announcements, materials,
  submissions, rubrics, topics, and roster
- **Drive attachments** — PDF, DOCX, CSV, text, and image parsing with
  Google Docs/Slides/Sheets export
- **Vision LLM** — embedded images described by Gemini, GPT-4V, or any
  vision-capable `BaseChatModel`
- **YouTube and link attachments** — metadata captured as structured documents
- **Pluggable parsers** — bring your own `BaseBlobParser` (PyMuPDF, Unstructured, etc.)
- **File size guard** — configurable `max_file_size` to skip oversized attachments
- **Retry with backoff** — exponential backoff with jitter on HTTP 429/500/503
- **Flexible auth** — service accounts, OAuth, cached tokens, or pre-built credentials
- **Rich metadata** — course info, timestamps, due dates, grades, links on every document
- **Lazy and async loading** — `lazy_load()` and `alazy_load()` for memory efficiency
- **Pydantic v2** — fully typed `BaseModel` with `model_dump()`, JSON schema, and
  automatic scope injection

For full documentation and API reference, see the
[GitHub repository](https://github.com/ayanokojix21/langchain-google-classroom).
