Official Python SDK
Build text humanization into your Python workflow.
The Ryter Pro Python SDK wraps authentication, request formatting, and the humanization endpoint in a small, direct client.
Install
pip install ryterproOverview
Use the SDK when your application, data pipeline, or automation is already written in Python.
The client sends requests to the Ryter Pro text humanization API and returns the complete JSON response as a Python dictionary. You keep control of when requests run and how the rewritten text is stored or displayed.
Installation
Install the package from PyPI in your application environment.
pip install ryterproTo pin the current release for reproducible deployments, install ryterpro==0.1.0.
Authentication
Create an API key in your Ryter Pro account and load it from an environment variable.
export RYTERPRO_API_KEY="YOUR_API_KEY"Keep API keys outside source control. You can create and manage keys from the API Keys page.
Quick start
Create a client and call humanize with the text you want to rewrite.
import os
from ryterpro import RyterPro
client = RyterPro(api_key=os.environ["RYTERPRO_API_KEY"])
result = client.humanize(
text="AI tools can help teams draft content more efficiently."
)
print(result["data"]["beautified_text"])The optional mode argument can be used when you want to select a supported humanizer mode.
Read the response
The SDK returns the API response without hiding useful request information.
if result.get("success"):
humanized_text = result["data"]["beautified_text"]
credits_used = result.get("credits_used")
print(humanized_text)
print(f"Credits used: {credits_used}")
else:
print(result.get("error"))See the text humanization API reference for the full request and response format.
Handle errors
Network and non-success HTTP responses are raised by the underlying requests client.
import requests
try:
result = client.humanize(text="Text to rewrite")
except requests.HTTPError as error:
print(f"Ryter Pro returned {error.response.status_code}")
print(error.response.text)
except requests.RequestException as error:
print(f"Request could not be completed: {error}")