Skip to main content

Query PDFs in natural language from the command-line

Project description

pdfathom is a command-line utility that lets you query PDF documents with natural language.

Installation

You can install it via the pip package manager:

$ pip install pdfathom

Usage

Below is the output of pdfathom --help:

usage: pdfathom [-h] [--config CONFIG] [--openai_api_key OPENAI_API_KEY]
                [--chunk_size CHUNK_SIZE] [--chunk_overlap CHUNK_OVERLAP]
                pdfs [pdfs ...]

positional arguments:
  pdfs                  Path to the pdf file(s) or URL(s)

options:
  -h, --help            show this help message and exit
  --config CONFIG, -c CONFIG
                        Path to the configuration file
  --openai_api_key OPENAI_API_KEY, -k OPENAI_API_KEY
                        OpenAI API key
  --chunk_size CHUNK_SIZE, -s CHUNK_SIZE
                        Chunk size
  --chunk_overlap CHUNK_OVERLAP, -o CHUNK_OVERLAP
                        Chunk overlap

Configuration

pdfathom looks for a configuration file called .pdfathom.json located in your home directory, and it looks like:

{"openai_api_key": "<OPENAI-API-KEY>"}

You will be prompted for an OpenAI API key upon running the program if it's not already present in the configuration file, this will also handle creating the configuration file for you.

Project details


Download files

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

Source Distribution

pdfathom-0.1.4.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

pdfathom-0.1.4-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file pdfathom-0.1.4.tar.gz.

File metadata

  • Download URL: pdfathom-0.1.4.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.3 Darwin/22.4.0

File hashes

Hashes for pdfathom-0.1.4.tar.gz
Algorithm Hash digest
SHA256 fe9169dae2710a3f65126e65c40d4fee5e191d7933722573413d04d4fefa6904
MD5 493da666d67093d45b696438ead83c41
BLAKE2b-256 bc80348eb7300f03e6fca3d7d33c13d3a1fa5ab1324cdf30b6b8bacb4ff0583c

See more details on using hashes here.

File details

Details for the file pdfathom-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: pdfathom-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.3 Darwin/22.4.0

File hashes

Hashes for pdfathom-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 152e131ca7c98655abe184f1f10a51e824b248c530d3a14224756da2f6c8cb71
MD5 d510714517ef17ce17baed06595ec2af
BLAKE2b-256 b6f65a33c1e2358ddf7456f437f934a89367c6ad2099c422a16af5c9d430c1a1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page