sapling-py 4.0.2__tar.gz → 4.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,104 @@
1
+ Metadata-Version: 2.4
2
+ Name: sapling-py
3
+ Version: 4.2.0
4
+ Summary: Sapling Python Client
5
+ Home-page: https://sapling.ai
6
+ Author: Sapling Intelligence
7
+ Author-email: info@sapling.ai
8
+ License: Apache License 2.0
9
+ Classifier: Development Status :: 5 - Production/Stable
10
+ Classifier: License :: OSI Approved :: Apache Software License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3 :: Only
13
+ Requires-Python: >=3.7
14
+ Description-Content-Type: text/markdown
15
+ License-File: LICENSE
16
+ Requires-Dist: requests
17
+ Provides-Extra: test
18
+ Requires-Dist: pytest; extra == "test"
19
+ Requires-Dist: responses; extra == "test"
20
+ Dynamic: author
21
+ Dynamic: author-email
22
+ Dynamic: classifier
23
+ Dynamic: description
24
+ Dynamic: description-content-type
25
+ Dynamic: home-page
26
+ Dynamic: license
27
+ Dynamic: license-file
28
+ Dynamic: provides-extra
29
+ Dynamic: requires-dist
30
+ Dynamic: requires-python
31
+ Dynamic: summary
32
+
33
+ # Sapling Python Client
34
+
35
+ Python SDK wrapper for the [Sapling.ai API](https://sapling.ai/docs).
36
+
37
+ Try our [grammar check demo](https://sapling.ai/grammar-check).
38
+ Compare against leading grammar checking tools and APIs like Grammarly (Grammerly), LanguageTool, ProWritingAid and Ginger.
39
+
40
+ ## Overview
41
+
42
+ Sapling is a toolkit for helping developers build language model-powered applications.
43
+ The API provides spelling and grammar checking, autocomplete, tone detection, rephrasing, AI detection,
44
+ zero-shot text classification, structured data extraction, PII detection and redaction, content safety
45
+ scoring, SEO analysis, and more.
46
+
47
+ Key Features:
48
+ - **60% More Corrections**: Outperforms [competing solutions](https://sapling.ai/comparison/api#sapling) at similar accuracy levels using state-of-the-art generative AI models.
49
+ - **Real-Time Performance**: Experience the same low-latency corrections as Sapling's native integrations.
50
+ - **Comprehensive Error Detection**: Identifies over 20 error types including prepositions, noun forms, verb tense, with both high-level and fine-grained error information.
51
+ - **Domain-Specific Models**: Get corrections optimized for your content type, from academic writing, to doctors notes, to user-generated reviews.
52
+ - **Enterprise-Grade Security**: Features include no data retention policies, [self-hosted/on-premises](https://sapling.ai/onprem) deployment options, and enterprise-grade [security policies and procedures](https://sapling.ai/security).
53
+ - **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](https://sapling.ai/docs/sdk/JavaScript/quickstart) for display UI components.
54
+
55
+ ## Installation
56
+
57
+ Install the `sapling-py` package with [pip](https://pip.pypa.io/en/stable/installation/)
58
+
59
+ ```
60
+ python -m pip install sapling-py
61
+ ```
62
+
63
+ ## Documentation
64
+ Documentation for the client is available at [Read the Docs](https://sapling.readthedocs.io/) and
65
+ documentation for the HTTP API is available at [Sapling.ai](https://sapling.ai/docs).
66
+
67
+ ## Quickstart
68
+
69
+ - Register for an account at [Sapling.ai](https://sapling.ai).
70
+ - After registering and signing in, generate a development API key in your [dashboard](https://sapling.ai/user_settings).
71
+ - Install the Python client by following the installation steps above.
72
+
73
+ ```python
74
+ from sapling import SaplingClient
75
+
76
+ API_KEY = '<YOUR_API_KEY>'
77
+ client = SaplingClient(api_key=API_KEY)
78
+ edits = client.edits('Lets get started!', session_id='test_session')
79
+ ```
80
+
81
+ The result should be an array of edits of this form:
82
+
83
+ ```json
84
+ [{
85
+ "id": "aa5ee291-a073-5146-8ebc-c9c899d01278",
86
+ "sentence": "Lets get started!",
87
+ "sentence_start": 0,
88
+ "start": 0,
89
+ "end": 4,
90
+ "replacement": "Let's",
91
+ "error_type": "R:OTHER",
92
+ "general_error_type": "Other",
93
+ }]
94
+ ```
95
+
96
+ Get a production key by following [this documentation](https://sapling.ai/docs/api/api-access).
97
+
98
+ Here's some more information on [request options and response structure](https://sapling.ai/docs/api/edits-overview).
99
+
100
+ ## License
101
+
102
+ Copyright 2024--present Sapling Intelligence, Inc.
103
+
104
+ Licensed under the Apache License, Version 2.0.
@@ -0,0 +1,72 @@
1
+ # Sapling Python Client
2
+
3
+ Python SDK wrapper for the [Sapling.ai API](https://sapling.ai/docs).
4
+
5
+ Try our [grammar check demo](https://sapling.ai/grammar-check).
6
+ Compare against leading grammar checking tools and APIs like Grammarly (Grammerly), LanguageTool, ProWritingAid and Ginger.
7
+
8
+ ## Overview
9
+
10
+ Sapling is a toolkit for helping developers build language model-powered applications.
11
+ The API provides spelling and grammar checking, autocomplete, tone detection, rephrasing, AI detection,
12
+ zero-shot text classification, structured data extraction, PII detection and redaction, content safety
13
+ scoring, SEO analysis, and more.
14
+
15
+ Key Features:
16
+ - **60% More Corrections**: Outperforms [competing solutions](https://sapling.ai/comparison/api#sapling) at similar accuracy levels using state-of-the-art generative AI models.
17
+ - **Real-Time Performance**: Experience the same low-latency corrections as Sapling's native integrations.
18
+ - **Comprehensive Error Detection**: Identifies over 20 error types including prepositions, noun forms, verb tense, with both high-level and fine-grained error information.
19
+ - **Domain-Specific Models**: Get corrections optimized for your content type, from academic writing, to doctors notes, to user-generated reviews.
20
+ - **Enterprise-Grade Security**: Features include no data retention policies, [self-hosted/on-premises](https://sapling.ai/onprem) deployment options, and enterprise-grade [security policies and procedures](https://sapling.ai/security).
21
+ - **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](https://sapling.ai/docs/sdk/JavaScript/quickstart) for display UI components.
22
+
23
+ ## Installation
24
+
25
+ Install the `sapling-py` package with [pip](https://pip.pypa.io/en/stable/installation/)
26
+
27
+ ```
28
+ python -m pip install sapling-py
29
+ ```
30
+
31
+ ## Documentation
32
+ Documentation for the client is available at [Read the Docs](https://sapling.readthedocs.io/) and
33
+ documentation for the HTTP API is available at [Sapling.ai](https://sapling.ai/docs).
34
+
35
+ ## Quickstart
36
+
37
+ - Register for an account at [Sapling.ai](https://sapling.ai).
38
+ - After registering and signing in, generate a development API key in your [dashboard](https://sapling.ai/user_settings).
39
+ - Install the Python client by following the installation steps above.
40
+
41
+ ```python
42
+ from sapling import SaplingClient
43
+
44
+ API_KEY = '<YOUR_API_KEY>'
45
+ client = SaplingClient(api_key=API_KEY)
46
+ edits = client.edits('Lets get started!', session_id='test_session')
47
+ ```
48
+
49
+ The result should be an array of edits of this form:
50
+
51
+ ```json
52
+ [{
53
+ "id": "aa5ee291-a073-5146-8ebc-c9c899d01278",
54
+ "sentence": "Lets get started!",
55
+ "sentence_start": 0,
56
+ "start": 0,
57
+ "end": 4,
58
+ "replacement": "Let's",
59
+ "error_type": "R:OTHER",
60
+ "general_error_type": "Other",
61
+ }]
62
+ ```
63
+
64
+ Get a production key by following [this documentation](https://sapling.ai/docs/api/api-access).
65
+
66
+ Here's some more information on [request options and response structure](https://sapling.ai/docs/api/edits-overview).
67
+
68
+ ## License
69
+
70
+ Copyright 2024--present Sapling Intelligence, Inc.
71
+
72
+ Licensed under the Apache License, Version 2.0.
@@ -1,8 +1,9 @@
1
1
  """Sapling Python Client"""
2
2
 
3
- from .client import SaplingClient
3
+ from .client import SaplingClient, SaplingError
4
4
  from .version import __version__
5
5
 
6
6
  __all__ = [
7
7
  "SaplingClient",
8
+ "SaplingError",
8
9
  ]