You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d020efb
Browse filesBrowse the repository at this point in the historyBrowse files
Notes for AI coding agents working with the DocSpring Python SDK (`docspring`), in this repository or
4
+
as a dependency of an app.
5
+
6
+
## This code is generated
7
+
8
+
Every file here is generated from DocSpring's OpenAPI spec by
9
+
[DocSpring's fork of OpenAPI Generator](https://github.com/DocSpring/openapi-generator/tree/docspring/all_patches), and each release replaces
10
+
all of it. Don't edit it or open pull requests that change it, and don't patch an installed copy: the next release
11
+
overwrites the change. Report bugs at https://github.com/DocSpring/docspring-python/issues or to support@docspring.com, and DocSpring fixes them in
12
+
the generator.
13
+
14
+
## Where to look
15
+
16
+
-[README.md](README.md): install, configuration, an example and how errors and API changes are handled.
17
+
-[docs/Client.md](https://github.com/DocSpring/docspring-python/blob/main/docs/Client.md): every method, with its parameters and return type.
18
+
-[docs/](https://github.com/DocSpring/docspring-python/tree/main/docs): every model and its fields.
19
+
-https://docspring.com/docs/llms.txt: DocSpring's documentation for LLMs (`llms-small.txt`, `llms-full.txt`).
20
+
-https://docspring.com/docs/api/: the API reference, with Python code for every method.
21
+
-https://docspring.com/api-docs/v1/openapi.json: the OpenAPI spec this SDK is generated from.
22
+
23
+
## Using it in an app
24
+
25
+
- Credentials come from `DOCSPRING_TOKEN_ID` and `DOCSPRING_TOKEN_SECRET`. Keep them in the environment or a secret
26
+
store, never in code. Accounts in the EU region also need `DOCSPRING_REGION=EU`.
27
+
- Template IDs look like `tpl_...` and submission IDs like `sub_...`.
28
+
- Pass `test: true` when you generate PDFs during development: test PDFs are free and watermarked.
29
+
- Generating a PDF waits for it, for up to 95 seconds. For many PDFs or slow templates, set `wait` to false and use
30
+
webhooks or check the submission later (https://docspring.com/docs/api-guide/synchronous-requests/).
31
+
- Errors: Methods raise `docspring.ApiException` for an error response (or a subclass from `docspring.exceptions`, such as `NotFoundException`), with the HTTP status in `status` and the body in `body`.
32
+
- Responses can be newer than this SDK, because DocSpring adds fields and enum values to API v1 without a new
33
+
version. The model keeps a response field added to the API after this release in its `additional_properties` dict. An enum value added to the API after this release comes back as a string, so handle values you don't recognize.
0 commit comments