Skip to main content

A comprehensive Python SDK for the QuillBot API.

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.3.tar.gz (19.3 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.3-py3-none-any.whl (18.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: quillbot-0.1.3.tar.gz
  • Upload date:
  • Size: 19.3 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.3.tar.gz
Algorithm Hash digest
SHA256 9d03e8883943b9c3c93174e9c59f94d73477d0d29af4a2db804afb9d33745dd8
MD5 d9bb9e48afcb1c120ade4bbc455ef0ac
BLAKE2b-256 752022f9a0dc5d3125a7b779606ae9b4ac5a323b076e498bddaa96908fbdfa50

See more details on using hashes here.

Provenance

The following attestation bundles were made for quillbot-0.1.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: quillbot-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 18.7 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9b1a6a11271f8a29f29c886b5813439e498f17bc4853b29b6f7abd88b78879df
MD5 0a78439833d0e18fb166a9907608e433
BLAKE2b-256 4abd7c35cb7d38dc7b80d0aa3d1261d67ecf8f1759659e5e86d3084c6cf00955

See more details on using hashes here.

Provenance

The following attestation bundles were made for quillbot-0.1.3-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