Skip to main content

Lightweight Python SDK for QuillBot's paraphrasing and summarization APIs.

Project description

QuillBot Python SDK

A lightweight, purely HTTP-based Python SDK for interacting with the QuillBot API. This SDK allows you to easily integrate QuillBot's paraphrasing and summarizing capabilities into your applications, LLM agents, or command-line tools.

Features

  • Paraphrasing: Rewrite text using QuillBot's sophisticated paraphrasing engine.
  • Bulk Thesaurus: Automatically fetch synonym suggestions for every word/phrase in the paraphrased text in a single request.
  • Summarization: Condense long texts into brief, readable summaries.
  • Frozen Words: Prevent specific words or phrases from being altered during paraphrasing.
  • Pure HTTP: No browser automation (Selenium/Playwright) required. Fast and lightweight.

Installation

This SDK requires Python 3.10+.

Clone the repository and install the dependencies (we recommend using a virtual environment):

# Example for installing with pip
pip install -r requirements.txt

If you are using pytest for running tests, install it using:

pip install pytest httpx --break-system-packages

(Note: --break-system-packages may be required on some modern Linux distributions if you are not using a virtual environment.)

Authentication

To use the SDK, you need a valid QuillBot useridtoken. You can obtain this token by logging into QuillBot in your web browser, opening Developer Tools, and inspecting the cookies or request headers for useridtoken.

Create a .env file in the root directory and add your token:

QUILLBOT_USERIDTOKEN=your_actual_token_here

Quick Start

Paraphrasing

from quillbot import QuillBot
import os

# Initialize the client with your token
token = os.getenv("QUILLBOT_USERIDTOKEN")
bot = QuillBot(token)

# Basic Paraphrasing
text = "The quick brown fox jumps over the lazy dog."
result = bot.paraphrase(text, strength=9)

print(f"Original: {result.original_text}")
print(f"Paraphrased: {result.text}")
print(f"Phrases found: {result.phrases}")

# Accessing Synonym Suggestions (Interactive Editing)
if result.synonyms:
    first_word = result.phrases[0]
    suggestions = result.available_replacements(first_word)
    print(f"Suggestions for '{first_word}': {suggestions}")

# Paraphrasing with Frozen Words
frozen_result = bot.paraphrase(
    "Python is a great programming language.",
    frozen_words=["Python"]
)

Summarization

long_text = (
    "Artificial intelligence (AI) is intelligence demonstrated by machines, "
    "as opposed to the natural intelligence displayed by animals including humans. "
    "Leading AI textbooks define the field as the study of intelligent agents: "
    "any system that perceives its environment and takes actions that maximize "
    "its chance of achieving its goals."
)

summary = bot.summarize(long_text)
print("Summary:", summary)

Core Architecture

The SDK is intentionally designed to be thin and close to the QuillBot API. QuillBot already provides the heavily optimized NLP features (synonym suggestions, phrase grouping, grammar context). The SDK exposes these capabilities rather than reinventing a local document engine.

  • The application (your script) is responsible for decision-making (e.g., deciding which word to replace with which synonym).
  • The SDK purely provides the data (rewritten text and synonym maps).

Running Tests

The test suite runs live integration tests against the actual QuillBot servers (as configured). Mocks are not used to ensure we accurately reflect the live API.

  1. Ensure your .env contains a valid QUILLBOT_USERIDTOKEN.
  2. Run the tests:
pytest tests/test_unit.py -v -s

Disclaimer

This is an unofficial SDK. Use responsibly and ensure you comply with QuillBot's Terms of Service.

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

quillbot-0.1.0.tar.gz (17.4 kB view details)

Uploaded Source

Built Distribution

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

quillbot-0.1.0-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: quillbot-0.1.0.tar.gz
  • Upload date:
  • Size: 17.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for quillbot-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5d4013af91bffed5a589ee92fded566bdd647fbc6b611443cf15685356f2358b
MD5 543474dc4f6759253cf9a4e132942806
BLAKE2b-256 4fa588ff3a383dd3d25b0e398f25e62447c5b5168641d7b76399468df9c0208c

See more details on using hashes here.

Provenance

The following attestation bundles were made for quillbot-0.1.0.tar.gz:

Publisher: publish.yml on A-Akhil/quillbot-python-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: quillbot-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for quillbot-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b6836afb82c4c4808c7324129fc2f70f56bc267bdd001ec0b8f34a0cc1dde742
MD5 667a83485c490251fc1e47dfa985bb97
BLAKE2b-256 4eec8151e7ab666ab2a4f5df8ad34dafd1d45c89b328bfc857bb5a2f25f403dd

See more details on using hashes here.

Provenance

The following attestation bundles were made for quillbot-0.1.0-py3-none-any.whl:

Publisher: publish.yml on A-Akhil/quillbot-python-sdk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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