Sapling Python Client
Python SDK wrapper for the Sapling.ai API.
Try our grammar check demo. Compare against leading grammar checking tools and APIs like Grammarly (Grammerly), LanguageTool, ProWritingAid and Ginger.
Overview
Sapling is a toolkit for helping developers build language model-powered applications. The API provides spelling and grammar checking, autocomplete, tone detection, rephrasing, AI detection, zero-shot text classification, structured data extraction, PII detection and redaction, content safety scoring, SEO analysis, and more.
Key Features:
- 60% More Corrections: Outperforms competing solutions at similar accuracy levels using state-of-the-art generative AI models.
- Real-Time Performance: Experience the same low-latency corrections as Sapling's native integrations.
- Comprehensive Error Detection: Identifies over 20 error types including prepositions, noun forms, verb tense, with both high-level and fine-grained error information.
- Domain-Specific Models: Get corrections optimized for your content type, from academic writing, to doctors notes, to user-generated reviews.
- Enterprise-Grade Security: Features include no data retention policies, self-hosted/on-premises deployment options, and enterprise-grade security policies and procedures.
- Rich Text Editor Integration: Supports TinyMCE, CKEditor, QuillJS, Trix, ProseMirror, WordPress, Draft.js, Froala, Lexical and more. For web-based editors, consider using our JavaScript SDK for display UI components.
Installation
Install the sapling-py package from PyPI with
pip:
python -m pip install sapling-py
Or add it to a uv project:
uv add sapling-py
Documentation
Documentation for the client is available at Read the Docs and documentation for the HTTP API is available at Sapling.ai.
Quickstart
- Register for an account at Sapling.ai.
- After registering and signing in, generate a development API key in your dashboard.
- Install the Python client by following the installation steps above.
from sapling import SaplingClient
API_KEY = '<YOUR_API_KEY>'
client = SaplingClient(api_key=API_KEY)
edits = client.edits('Lets get started!', session_id='test_session')
The result should be an array of edits of this form:
[{
"id": "aa5ee291-a073-5146-8ebc-c9c899d01278",
"sentence": "Lets get started!",
"sentence_start": 0,
"start": 0,
"end": 4,
"replacement": "Let's",
"error_type": "R:OTHER",
"general_error_type": "Other",
}]
Get a production key by following this documentation.
Here's some more information on request options and response structure.
License
Copyright 2024--present Sapling Intelligence, Inc.
Licensed under the Apache License, Version 2.0.
Metadata
Release files for sapling-py 4.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| sapling_py-4.3.0.tar.gz | 25.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sapling_py-4.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 43.2 kB
Release files / sapling_py-4.3.0.tar.gz
| Download URL | sapling_py-4.3.0.tar.gz |
|---|---|
| Size | 25.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
537ee622bf72266a555f361d76baf5d776ad32dc4951ed6abfe2bb36d51cd29d
|
|
BLAKE2b-256 checksum How to use checksums |
517d2ab8e3af4fe4330a85aae53e92ed3a33a5bd26af3082fbfadf9bedc85593
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.4
|
Release files / sapling_py-4.3.0-py3-none-any.whl
| Download URL | sapling_py-4.3.0-py3-none-any.whl |
|---|---|
| Size | 17.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
56e765ea3b8faf8666a8f6deaf71e9c9fdd58c9ab4999389d52848ea148c0d84
|
|
BLAKE2b-256 checksum How to use checksums |
8ea503df0b46ed134bb1eb5ded2cbc7762bf90d3cbbff504d3aa81e870629af9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.4
|
Security for sapling-py 4.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.