Skip to main content

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, translation, 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.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sapling-py 4.4.0
File Size Uploaded Provenance
sapling_py-4.4.0.tar.gz 26.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for sapling-py 4.4.0
File Interpreter ABI Platform
sapling_py-4.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 45.0 kB

Release files / sapling_py-4.4.0.tar.gz

Download URL sapling_py-4.4.0.tar.gz
Size 26.4 kB
Tags Source
SHA-256 checksum
How to use checksums
7bfd46b9e2d7a1ab3929a064f2ae9930d204d6d359a02b7ac09e398c7648c13e
BLAKE2b-256 checksum
How to use checksums
76f0567cb61ba2eeb45b47b1023ccc1e573a269e69d47d5cb2709c85911eb96a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / sapling_py-4.4.0-py3-none-any.whl

Download URL sapling_py-4.4.0-py3-none-any.whl
Size 18.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
be547d572403fa52e13996ae5359a24b9fa3096bc92b23e52c2801c5147d085e
BLAKE2b-256 checksum
How to use checksums
523a7bcfffa8644a4c3960dbaae8a5ab7dae10444fb36efddb39fb69260715b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for sapling-py 4.4.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page