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.
- Ensure your
.envcontains a validQUILLBOT_USERIDTOKEN. - 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5d4013af91bffed5a589ee92fded566bdd647fbc6b611443cf15685356f2358b
|
|
| MD5 |
543474dc4f6759253cf9a4e132942806
|
|
| BLAKE2b-256 |
4fa588ff3a383dd3d25b0e398f25e62447c5b5168641d7b76399468df9c0208c
|
Provenance
The following attestation bundles were made for quillbot-0.1.0.tar.gz:
Publisher:
publish.yml on A-Akhil/quillbot-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quillbot-0.1.0.tar.gz -
Subject digest:
5d4013af91bffed5a589ee92fded566bdd647fbc6b611443cf15685356f2358b - Sigstore transparency entry: 2188207979
- Sigstore integration time:
-
Permalink:
A-Akhil/quillbot-python-sdk@0673e4dd11245215709917b00bbe248cef42f8d5 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/A-Akhil
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0673e4dd11245215709917b00bbe248cef42f8d5 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6836afb82c4c4808c7324129fc2f70f56bc267bdd001ec0b8f34a0cc1dde742
|
|
| MD5 |
667a83485c490251fc1e47dfa985bb97
|
|
| BLAKE2b-256 |
4eec8151e7ab666ab2a4f5df8ad34dafd1d45c89b328bfc857bb5a2f25f403dd
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
quillbot-0.1.0-py3-none-any.whl -
Subject digest:
b6836afb82c4c4808c7324129fc2f70f56bc267bdd001ec0b8f34a0cc1dde742 - Sigstore transparency entry: 2188207984
- Sigstore integration time:
-
Permalink:
A-Akhil/quillbot-python-sdk@0673e4dd11245215709917b00bbe248cef42f8d5 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/A-Akhil
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0673e4dd11245215709917b00bbe248cef42f8d5 -
Trigger Event:
release
-
Statement type: