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.2.tar.gz (18.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.2-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: quillbot-0.1.2.tar.gz
  • Upload date:
  • Size: 18.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.2.tar.gz
Algorithm Hash digest
SHA256 6f832a8a70898acd8f682db4dd6d17350203ee2e6a8d8876f8ae761a894ab004
MD5 3cd1540706822904edc82af63b1be228
BLAKE2b-256 663ebc97822f1dc4c51c516d3f421f0a2425b20a9184a48cb69c776773a83fa3

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: quillbot-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 17.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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ead26822cd4c1b67c81efb49b46907ee73d99cfd1f8fd4b5a37f572a786d2a6c
MD5 2fad1cf9f9c9833d1e8e9c286f17c6d1
BLAKE2b-256 048f1763e50af5ef41bdd3d82a0bc2e8ac65e621c2b525852bd6035726722beb

See more details on using hashes here.

Provenance

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