Seam

Latest version: v1.0.1

Safety actively analyzes 641872 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 42 of 49

1.0.0

Migration guide from [seampai](https://pypi.org/project/seamapi/) to [seam](https://pypi.org/project/seam/)

Learn how to migrate from the `seamapi` package to the `seam` package. This guide includes descriptions of all breaking changes.

The new SDK has fewer dependencies and is generated daily to ensure methods and types are always up-to-date with the latest API changes. It is mostly a drop-in replacement, however some method signatures and options have changed to improve overall consistency with the Seam API.

This guide includes descriptions of all breaking changes. Please refer to the [README](https://github.com/seamapi/python/blob/main/README.md) for updated usage instructions and a complete list of new features.

New Python package name

Changed the package name from `seamapi` to `seam`.

diff
- pip install seamapi
+ pip install seam


diff
- from seamapi import Seam
+ from seam import Seam


Updated API method signatures

Keyword arguments

API method signatures now only accept keyword arguments.

diff
- seam.access_codes.get("my_access_code_id")
+ seam.access_codes.get(access_code_id="my_access_code_id")


diff
- seam.thermostats.get("my_thermostat_device_id")
+ seam.thermostats.get(device_id="my_thermostat_device_id")


Standardized resource ID arguments

Changed from accepting both resource objects and resource ID strings to accepting only resource ID strings. Includes a renaming scheme for clarity.

diff
- def get(resource: Union[str, Resource]) -> Resource
+ def get(resource_id: str) -> Resource


Usage

diff
- seam.locks.get(device=my_device)
+ seam.locks.get(device_id=my_device.device_id)


Removed method arguments

Removed `wait_for_code` from `access_codes.create`. Use the newly-created `access_code_id` to poll or watch for events.

Return value changes

Changed the return types for some methods to enhance API consistency and reliability.

The following methods now return `void`:

- `access_codes.delete`: Instead, you should wait for the `access_code.deleted` event.
- `access_codes.unmanaged.delete`
- `access_codes.update`: Instead, you should watch for relevant `access_code.*` events or poll the resource as needed.
- `noise_sensors.noise_thresholds.delete`: Instead, you should wait for the `noise_threshold.deleted` event.
- `noise_sensors.noise_thresholds.update`: Instead, you should watch for relevant `noise_threshold.*` events or poll the resource as needed.
- `thermostats.climate_setting_schedules.update`: Instead, you should watch for relevant `climate_setting_schedule.*` events or poll the resource as needed.
- `access_codes.unmanaged.convert_to_managed`: Instead, you should wait for the `access_code.unmanaged.converted_to_managed` and `access_code.unmanaged.failed_to_convert_to_managed` events.

The following methods now return a `NoiseThreshold`:

- `noise_sensors.noise_thresholds.create`: Use the newly-created `noise_threshold_id` to poll or watch for events.

The following methods now return an `ActionAttempt`:

- `workspaces.reset_sandbox`: Instead, you should use the newly-created `action_attempt_id` to poll the status of the action attempt via the `/action_attempt/get` endpoint.

Action attempt resolution

Methods returning action attempts still wait for the action attempt to resolve by default. Further, you can now configure this behavior using the [`wait_for_action_attempt` option](https://github.com/seamapi/python/blob/main/README.rst#action-attempts) on a per-request basis. You can also set the default behavior for the client.

Set per request

py
Wait for the action attempt to be ready with a default timeout of 5.0 seconds and a default polling interval of 0.5 seconds.
seam.locks.lock_door(
device_id="my_device_id",
wait_for_action_attempt=True
)

Wait up to 10 seconds for the action attempt to be ready, checking every 2 seconds.
seam.locks.lock_door(
device_id="my_device_id",
wait_for_action_attempt={
"timeout": 10.0, Up to 10 seconds
"polling_interval": 2.0 Every 2 seconds
}
)


Set default behavior

py
seam = Seam(wait_for_action_attempt=True)


Environment variables

Added support for the `SEAM_ENDPOINT` environment variable.

Third-party component support and version changes

- Updated the minimum supported Python version to 3.9.
- Updated the `dataclasses-json` version to 0.6.
- Removed Sentry support.
- Replaced `requests` with `niquests` version 3.

1.0.0rc0

[0.15.0](https://github.com/seamapi/python/compare/v0.14.0...v0.15.0) (2024-06-27)


Features

* **deps-dev:** Bump seamapi/types from 1.186.0 to 1.187.0 in the seam group ([100](https://github.com/seamapi/python/issues/100)) ([4cc1967](https://github.com/seamapi/python/commit/4cc1967bf8ba35af3190665be89b17760cde2aca))

0.31.0

Features

* Add dormakaba_oracode ([101](https://github.com/seamapi/types/issues/101)) ([0fd9e16](https://github.com/seamapi/types/commit/0fd9e16a8710dfd90b488ba6e5b962419da405fc))

0.30.1

Bug Fixes

* Simplify generated_code ([98](https://github.com/seamapi/types/issues/98)) ([ae92ea6](https://github.com/seamapi/types/commit/ae92ea61eef8ce4268771dd44be16cae168b45d0))

0.30.0

Features

* add `/client_sessions/grant_access` ([94](https://github.com/seamapi/types/issues/94)) ([87bad83](https://github.com/seamapi/types/commit/87bad838362a270c1b2875073ab3813e57cc810e))

0.29.0

Features

* Add dormakaba_oracode ([91](https://github.com/seamapi/types/issues/91)) ([6702219](https://github.com/seamapi/types/commit/670221911d03b93d17745ab014e2dc3fc920ffc0))

Page 42 of 49

Links

Releases

Has known vulnerabilities

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.