Metadata-Version: 2.4
Name: draftkit
Version: 0.1.1
Summary: Reusable contexts for LLMs
Author-email: Isaac Flath <isaac.flath@gmail.com>
License-Expression: Apache-2.0
Project-URL: Issues, https://github.com/isaac-flath/draftkit/issues
Project-URL: Repository, https://github.com/isaac-flath/draftkit
Keywords: llm,context,markdown,python
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: beautifulsoup4
Requires-Dist: html2text
Requires-Dist: httpx
Requires-Dist: pypdf
Requires-Dist: requests
Provides-Extra: browser
Requires-Dist: playwright; extra == "browser"
Provides-Extra: test
Requires-Dist: pytest; extra == "test"
Dynamic: license-file

# draftkit

Reusable helpers for gathering LLM context from URLs, files, PDFs, Google
documents, arXiv papers, and GitHub repositories.

## Installation

```bash
pip install draftkit
```

Browser-backed reading is optional:

```bash
pip install "draftkit[browser]"
playwright install
```

The browser extra uses Playwright's official Python package.

## Usage

```python
import draftkit.read as rd

markdown = rd.read_link("https://example.org")
files = rd.read_dir("src", as_dict=True)
paper = rd.read_arxiv("1801.06146")
```

Each `read_*` function accepts the location of a resource and returns either
its text or, for resources containing multiple files, a dictionary mapping
paths to contents.

See [`examples/usage.ipynb`](examples/usage.ipynb) for a notebook walkthrough.
