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 with pip
python -m pip install 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.
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 sapling_py-4.2.0.tar.gz.
File metadata
- Download URL: sapling_py-4.2.0.tar.gz
- Upload date:
- Size: 24.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
35744b70cda114912a84433d123129a3d4dd0c64e6e8cf6edf3bacf8733f1317
|
|
| MD5 |
4bb4d7dbc90630df14e6505385859ef6
|
|
| BLAKE2b-256 |
740680a11744637a6bb63f9d8383c0dc3656d2dd2b6943cb91f8279c5962e4a7
|
File details
Details for the file sapling_py-4.2.0-py3-none-any.whl.
File metadata
- Download URL: sapling_py-4.2.0-py3-none-any.whl
- Upload date:
- Size: 17.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d80bb6e84233f4984bc48ed65caf4e49f1f90addfb20066c28312ad7200f834
|
|
| MD5 |
736f901a40949e59a9ac78b4d28475d6
|
|
| BLAKE2b-256 |
066a8eccb7d1ec0ce755449e0b8e005191d0a9c82c0520e0c997f9a9cbc31611
|