Skip to main content

Monolithic research CLI powered by Perplexity Sonar API with auto-classification and iterative gap analysis

Project description

PPLX Research

A monolithic, versatile research CLI powered by Perplexity's Sonar API. Features auto-classification, iterative gap analysis, multi-perspective synthesis, and comprehensive output formats.

CI Python 3.9+ License: MIT

Why This Exists

Other Perplexity wrappers are simple API clients. PPLX Research is a research orchestration layer that adds:

  • Auto-classification: Analyzes your query and picks the optimal mode/depth/sources
  • Gap analysis: Iteratively identifies and fills knowledge gaps (deep mode)
  • Multi-perspective synthesis: Gathers insights from academic, news, forums, docs, and code sources
  • Full API coverage: All Perplexity features including search_domain_filter, reasoning_effort, return_images, etc.

Installation

pip install pplx-research

Quick Start

# Set your API key
export PERPLEXITY_API_KEY="pplx-..."

# Basic research
pplx-research "what is quantum computing"

# Let AI pick the best approach
pplx-research "React vs Vue performance" --auto

# Deep academic research
pplx-research "transformer architecture" --mode deep --sources academic --depth 4

# Multi-perspective analysis
pplx-research "microservices pros and cons" --mode synthesis

Modes

Mode Description Best For
quick Single query, fast response Facts, definitions, current events
deep Iterative gap analysis Complex topics, research reports
synthesis Multi-source perspectives Comparisons, debates, pros/cons

Options

pplx-research <query> [options]

Modes:
  -m, --mode {quick,deep,synthesis}  Research mode (default: quick)

Scope:
  -s, --site DOMAIN         Constrain to specific domain
  -e, --exclude DOMAIN      Exclude domain (can use multiple times)
  -t, --time-range {hour,day,week,month,year}
                           Time range for results
  -r, --region CODE        Country/region code (US, UK, JP, etc.)
  -l, --language CODE      Language filter (en, de, ja, etc.)
  --sources TYPES          Comma-separated: academic,news,docs,forums,code,all

Output:
  -f, --format {markdown,json,summary,plain}
                           Output format (default: markdown)
  -d, --depth 1-5          Iteration depth (default: 3)

Automation:
  -a, --auto               Auto-classify query and select optimal settings
  -o, --output PATH        Save output to file
  -w, --webhook URL        POST results to webhook on completion
  -q, --quiet              Suppress progress (for piping)

Python API

from pplx_research import ResearchEngine, PerplexitySDK

# High-level research
engine = ResearchEngine(
    query="quantum computing applications",
    mode="deep",
    sources=["academic"],
    depth=4
)
report = engine.run()

# Low-level SDK
sdk = PerplexitySDK(api_key="pplx-...")
result = sdk.chat("Hello", model="sonar-pro")

License

MIT License - see LICENSE for details.

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

pplx_research-1.0.0.tar.gz (18.2 kB view details)

Uploaded Source

Built Distribution

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

pplx_research-1.0.0-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file pplx_research-1.0.0.tar.gz.

File metadata

  • Download URL: pplx_research-1.0.0.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for pplx_research-1.0.0.tar.gz
Algorithm Hash digest
SHA256 aca75573041bebfe5e6c5b131ab9f00bcedf4bbcf57b4dfef99169a7849ef290
MD5 59037f4a96afee6296bbc581f8990912
BLAKE2b-256 8e3966c7f6052ab4253b2d7fcc8116c00fcde0821e42a997ce74a615f41060a7

See more details on using hashes here.

File details

Details for the file pplx_research-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: pplx_research-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for pplx_research-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4952277d28b70f3d1e920e630780211ae8f0ea8e15706fd768548af4e666cfca
MD5 a610172e9c7e443cef30368de8e011f9
BLAKE2b-256 a1ab3a4d59956894974d20af913276e027e338bc0e63bb89c3ec73e7c4482c41

See more details on using hashes here.

Supported by

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