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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

draftkit-0.1.1.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

draftkit-0.1.1-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file draftkit-0.1.1.tar.gz.

File metadata

  • Download URL: draftkit-0.1.1.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.6

File hashes

Hashes for draftkit-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b38a8fc0f4021f5ffdd18f4f5338a8db41cbb398944e9c497a140a27c38e1dba
MD5 ac95d902b31960b7b9b8bdab7fa06bc1
BLAKE2b-256 4759e8fe3dde7948722c0530d1aa6d32ec547e2c4cfe41f496165cc9edcf498e

See more details on using hashes here.

File details

Details for the file draftkit-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: draftkit-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.11.6

File hashes

Hashes for draftkit-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 92968d67cac56d0e614ec42b9e73a0e51375514d7c3b1854cabe44aeb59e5307
MD5 a00cf120d0f4e87497be36f1536f1f32
BLAKE2b-256 3fb61449bdd427a3e7e492f3ee74691ce72d12d5da12acdf468706c03fcff6c3

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 files

0.1.0

2 files

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