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

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.0.tar.gz (10.6 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.0-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: draftkit-0.1.0.tar.gz
  • Upload date:
  • Size: 10.6 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.0.tar.gz
Algorithm Hash digest
SHA256 ceeda2d55903167e6c1c18138663cbee0fd834e164024734cc390972ac280087
MD5 ad0eba8c44540843a44c748abdc7c177
BLAKE2b-256 81e19bfdd65f013981e3ca71ef6a5c4a37c2da0ce164227afc3d357f90a0fead

See more details on using hashes here.

File details

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

File metadata

  • Download URL: draftkit-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.2 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a290436c710ec136a1e12c81fa0b353f0a4c70b61bcb03f45de0a470a2fa8f0e
MD5 4370396f50b2f13a2ad0d8b98b67bd8b
BLAKE2b-256 4d769150cb2c1f050bffde36e32dbc5f93600d4b43a81d97cb64bb2c13c5db58

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.1

2 files

This release

0.1.0 This release

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