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, 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

sapling_py-4.2.0.tar.gz (24.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sapling_py-4.2.0-py3-none-any.whl (17.7 kB view details)

Uploaded Python 3

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

Hashes for sapling_py-4.2.0.tar.gz
Algorithm Hash digest
SHA256 35744b70cda114912a84433d123129a3d4dd0c64e6e8cf6edf3bacf8733f1317
MD5 4bb4d7dbc90630df14e6505385859ef6
BLAKE2b-256 740680a11744637a6bb63f9d8383c0dc3656d2dd2b6943cb91f8279c5962e4a7

See more details on using hashes here.

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

Hashes for sapling_py-4.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8d80bb6e84233f4984bc48ed65caf4e49f1f90addfb20066c28312ad7200f834
MD5 736f901a40949e59a9ac78b4d28475d6
BLAKE2b-256 066a8eccb7d1ec0ce755449e0b8e005191d0a9c82c0520e0c997f9a9cbc31611

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

4.2.0 This release

2 files

4.1.0

2 files

4.0.2

1 file

4.0.1

1 file

4.0.0

2 files

3.0.1

1 file

2.0.2

1 file

2.0.1

1 file

1.0.0

1 file

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