Skip to content
This repository was archived by the owner on Jun 28, 2024. It is now read-only.

Commit 5921211

Browse files
committed
support for python 3.7 unlock door fix
1 parent 0aed6ed commit 5921211

File tree

4 files changed

+89
-17
lines changed

4 files changed

+89
-17
lines changed

poetry.lock

+83-11
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[tool.poetry]
22
name = "seamapi"
3-
version = "0.1.1"
3+
version = "0.1.2"
44
description = "A Python Library for Seam's API https://getseam.com"
55
authors = ["Severin Ibarluzea <[email protected]>"]
66
license = "MIT"
77

88
[tool.poetry.dependencies]
9-
python = "^3.10"
9+
python = "^3.7"
1010
requests = "^2.26.0"
1111
python-dotenv = "^0.19.2"
1212
dataclasses-json = "^0.5.6"

seamapi/locks.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def lock_door(self, device: Union[DeviceId, Device]) -> ActionAttempt:
5757
def unlock_door(self, device: Union[DeviceId, Device]) -> ActionAttempt:
5858
device_id = to_device_id(device)
5959
res = requests.post(
60-
f"{self.seam.api_url}/locks/lock_door",
60+
f"{self.seam.api_url}/locks/unlock_door",
6161
headers={"Authorization": f"Bearer {self.seam.api_key}"},
6262
json={"device_id": device_id},
6363
)

seamapi/types.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# TODO this file should eventually be generated by looking at openapi.json
22

33
import abc
4-
from typing import List, Optional, Union, Literal, Dict, Any
4+
from typing import List, Optional, Union, Dict, Any
55
from dataclasses import dataclass
66
from dataclasses_json import dataclass_json
77

88
DeviceId = str
9-
AcceptedProvider = Union[Literal["noiseaware"], Literal["august"]]
9+
AcceptedProvider = str # e.g. august or noiseaware
1010

1111

1212
@dataclass_json
@@ -22,7 +22,7 @@ class Device:
2222
@dataclass
2323
class ActionAttempt:
2424
action_attempt_id: str
25-
status: Union[Literal["pending"], Literal["error"], Literal["complete"]]
25+
status: str
2626

2727

2828
@dataclass_json

0 commit comments

Comments
 (0)