> For the complete documentation index, see [llms.txt](https://keeper-security.gitbook.io/en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://keeper-security.gitbook.io/en/release-notes/enterprise/keeper-secrets-manager/2026/python-sdk-18.0.0.md). Agents can also search and read this documentation through its [MCP server](https://keeper-security.gitbook.io/en/~gitbook/mcp).

# Python SDK 18.0.0

Released on November 23, 2026

> **Breaking changes**
>
> **KSM-1214:** The minimum Python version is 3.10 for Core 18.0.0 and Helper 1.2.0. Python 3.9 users stay on Core 17.3.0 and Helper 1.1.2, and pip selects those versions automatically. Upgrade Python before you upgrade the SDK. The fixed `requests` and `urllib3` versions need Python 3.10.
>
> **KSM-1051:** `delete_folder()` sends one `get_folders` request before the delete. `delete_secret()` and `delete_folder()` return an empty list when the response has no items, where earlier versions returned `None` or an empty dictionary. Update code that tests the return value, and test code that queues server responses.

### Updates

* **KSM-1051:** Added support for NSF (Nested Shared Folders) that are shared directly to the application. `create_secret()` and `create_secret_with_options()` write records into an NSF folder. `get_folders(include_nsf=True)` lists those folders. That call downloads every record that the application can access, and it fails above the server record limit. `KeeperError` carries the new attributes `result_code`, `status_code`, and `additional_info`.
* **KSM-1043, KSM-1059, KSM-1683:** `get_folders()` reads nested folders of any depth and top-level folder names that use AES-GCM. `update_folder()` writes the folder name with the same cipher as the folder. `Folder.is_drive`, `Record.is_drive`, and `SecretsManagerResponse.drive_folder_uids` identify NSF folders and records.
* **KSM-1271:** `get_folders()` works as the first call of a client that uses a new one-time token, and it finishes the binding of the client.
* **KSM-1877:** `update_folder()` keeps the color and other metadata of a classic subfolder when it renames the folder.
* **KSM-1019:** `KSMCache` honors an explicit `kms_cache_file_name` again, and the value takes precedence over `KSM_CACHE_DIR`. When a cache write fails after a successful request, `caching_post_function` returns the live response and logs a warning.
* **KSM-1582:** `get_secrets()` returns every record of a shared folder that it can decrypt. A record that it cannot decrypt appears in `bad_records`.
* **KSM-1145:** `get_secrets()` returns a record once when it is reachable through both a shared folder and a direct share.
* **KSM-1080:** `get_folders()` returns the folders that it can decrypt and logs an error for each folder that it skips.
* **KSM-1281:** `get_folders()` completes when folder data contains a parent cycle. The SDK raises `KeeperError` for that folder, skips it, and returns the other folders.
* **KSM-1693, KSM-1842:** Raised the dependency floors to `cryptography>=50.0.0`, `requests>=2.33.0`, and `urllib3>=2.8.0`, and added the floors `certifi>=2026.10.19` and `idna>=3.15`. These versions fix 14 advisories, listed by package below. pip upgrades older versions when it installs this release. If you pin these packages, raise the pins.
  * `cryptography`: [CVE-2026-34073](https://nvd.nist.gov/vuln/detail/CVE-2026-34073), [CVE-2026-39892](https://nvd.nist.gov/vuln/detail/CVE-2026-39892), [GHSA-537c-gmf6-5ccf](https://github.com/advisories/GHSA-537c-gmf6-5ccf), [CVE-2026-69247](https://nvd.nist.gov/vuln/detail/CVE-2026-69247), [CVE-2026-69248](https://nvd.nist.gov/vuln/detail/CVE-2026-69248), [CVE-2026-69249](https://nvd.nist.gov/vuln/detail/CVE-2026-69249)
  * `requests`: [CVE-2026-25645](https://nvd.nist.gov/vuln/detail/CVE-2026-25645)
  * `urllib3`: [CVE-2026-44431](https://nvd.nist.gov/vuln/detail/CVE-2026-44431), [CVE-2026-44432](https://nvd.nist.gov/vuln/detail/CVE-2026-44432), [CVE-2026-97687](https://nvd.nist.gov/vuln/detail/CVE-2026-97687), [CVE-2026-97688](https://nvd.nist.gov/vuln/detail/CVE-2026-97688), [CVE-2026-97689](https://nvd.nist.gov/vuln/detail/CVE-2026-97689)
  * `certifi`: [GHSA-6q48-6c7w-9gw2](https://github.com/advisories/GHSA-6q48-6c7w-9gw2)
  * `idna`: [CVE-2026-45409](https://nvd.nist.gov/vuln/detail/CVE-2026-45409)
* **KSM-1122:** Fixed the disaster recovery cache file being readable by other users. In versions before 18.0.0, `KSMCache` created `ksm_cache.bin` with the default file mode (typically 0644, readable by other users), and the file holds the transmission key. The cache file is now owner read and write only (0600), and the SDK sets this mode on an existing file at the next write. If you used the cache with an earlier version, check the permissions of the file and run `chmod 600` on it.
* **KSM-1823:** On Windows, `KSMCache` now gives the cache file an owner-only ACL before it writes the data. Only the current user and Administrators have access. At the next write, the SDK also sets this ACL on an existing cache file. Each Windows account must use its own cache file, for example its own `KSM_CACHE_DIR`. If the SDK cannot set the ACL, it removes the cache file and does not write the data.
* **KSM-1612:** Fixed the proxy password appearing in an error message. In versions before 18.0.0, a malformed proxy URL raised a `requests` error whose text could include the proxy credential. The SDK now raises `KeeperInvalidURLError` without the URL. It is both a `KeeperError` and a `requests.exceptions.InvalidURL`, so existing handlers still match. If you log these errors, check older logs for the proxy URL, and change the proxy password if a log holds it.
* **KSM-1807 (Helper 1.2.0):** Fixed `str()` of a Helper field printing the field value. In versions before 1.2.0, `str()` of a field, including a `Password` field, showed the value, so it could reach logs. It now shows `***`. If you log Helper fields, check older logs for field values, and change any secret that a log holds.
* **Helper 1.2.0:** Requires `keeper-secrets-manager-core>=18.0.0` and Python 3.10 or later. **KSM-1119:** `FieldType` handles a complex field (address, name, host, paymentCard) that the server returns with an empty value list.

### **Resources**

* [PyPI Core Package](https://pypi.org/project/keeper-secrets-manager-core/18.0.0/)
* [PyPI Helper Package](https://pypi.org/project/keeper-secrets-manager-helper/1.2.0/)
* [Python SDK Documentation](https://keeper-security.gitbook.io/en/keeperpam/secrets-manager/developer-sdk-library/python-sdk.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://keeper-security.gitbook.io/en/release-notes/enterprise/keeper-secrets-manager/2026/python-sdk-18.0.0.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
