Skip to main content

draftkit

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

Installation

pip install draftkit

Browser-backed reading is optional:

pip install "draftkit[browser]"
playwright install

The browser extra uses Playwright's official Python package.

Usage

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 for a notebook walkthrough.

Metadata

Release files for draftkit 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for draftkit 0.1.1
File Size Uploaded Provenance Actions
draftkit-0.1.1.tar.gz 11.1 kB Without provenance Details for draftkit-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for draftkit 0.1.1
File Interpreter ABI Platform Actions
draftkit-0.1.1-py3-none-any.whl Python 3 none any Details for draftkit-0.1.1-py3-none-any.whl

Total release size: 21.7 kB

Release files / draftkit-0.1.1.tar.gz

Download URL draftkit-0.1.1.tar.gz
Size 11.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b38a8fc0f4021f5ffdd18f4f5338a8db41cbb398944e9c497a140a27c38e1dba
BLAKE2b-256 checksum
How to use checksums
4759e8fe3dde7948722c0530d1aa6d32ec547e2c4cfe41f496165cc9edcf498e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.6

Release files / draftkit-0.1.1-py3-none-any.whl

Download URL draftkit-0.1.1-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
92968d67cac56d0e614ec42b9e73a0e51375514d7c3b1854cabe44aeb59e5307
BLAKE2b-256 checksum
How to use checksums
3fb61449bdd427a3e7e492f3ee74691ce72d12d5da12acdf468706c03fcff6c3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.6

Security for draftkit 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page