petsafe-api 3.0.1__tar.gz → 3.0.3__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.
- {petsafe_api-3.0.1 → petsafe_api-3.0.3}/PKG-INFO +1 -1
- petsafe_api-3.0.3/petsafe/__main__.py +46 -0
- {petsafe_api-3.0.1 → petsafe_api-3.0.3}/petsafe_api.egg-info/PKG-INFO +1 -1
- {petsafe_api-3.0.1 → petsafe_api-3.0.3}/setup.py +1 -1
- petsafe_api-3.0.1/petsafe/__main__.py +0 -36
- {petsafe_api-3.0.1 → petsafe_api-3.0.3}/LICENSE +0 -0
- {petsafe_api-3.0.1 → petsafe_api-3.0.3}/README.md +0 -0
- {petsafe_api-3.0.1 → petsafe_api-3.0.3}/petsafe/__init__.py +0 -0
- {petsafe_api-3.0.1 → petsafe_api-3.0.3}/petsafe/client.py +0 -0
- {petsafe_api-3.0.1 → petsafe_api-3.0.3}/petsafe/const.py +0 -0
- {petsafe_api-3.0.1 → petsafe_api-3.0.3}/petsafe/devices.py +0 -0
- {petsafe_api-3.0.1 → petsafe_api-3.0.3}/petsafe/general.py +0 -0
- {petsafe_api-3.0.1 → petsafe_api-3.0.3}/petsafe/pets.py +0 -0
- {petsafe_api-3.0.1 → petsafe_api-3.0.3}/petsafe_api.egg-info/SOURCES.txt +0 -0
- {petsafe_api-3.0.1 → petsafe_api-3.0.3}/petsafe_api.egg-info/dependency_links.txt +0 -0
- {petsafe_api-3.0.1 → petsafe_api-3.0.3}/petsafe_api.egg-info/requires.txt +0 -0
- {petsafe_api-3.0.1 → petsafe_api-3.0.3}/petsafe_api.egg-info/top_level.txt +0 -0
- {petsafe_api-3.0.1 → petsafe_api-3.0.3}/setup.cfg +0 -0
- {petsafe_api-3.0.1 → petsafe_api-3.0.3}/tests/test_smartdoor_modes.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: petsafe-api
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.3
|
|
4
4
|
Summary: Provides ability to connect and control a PetSafe Smart Feed, Scoopfree, and Smart Door devices using the PetSafe API.
|
|
5
5
|
Home-page: https://github.com/ThomasHFWright/petsafe-api
|
|
6
6
|
Author: Jordan Stremming & Dominick Meglio & Thomas Wright
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
import argparse
|
|
3
|
+
import asyncio
|
|
4
|
+
|
|
5
|
+
from petsafe import PetSafeClient
|
|
6
|
+
|
|
7
|
+
# create parser for arguments
|
|
8
|
+
parser = argparse.ArgumentParser(
|
|
9
|
+
usage="python -m petsafe email [-t email_code]"
|
|
10
|
+
)
|
|
11
|
+
parser.add_argument("email", help="account email address")
|
|
12
|
+
|
|
13
|
+
# if no arguments specified, show help
|
|
14
|
+
if len(sys.argv) < 2:
|
|
15
|
+
parser.print_help()
|
|
16
|
+
sys.exit(1)
|
|
17
|
+
|
|
18
|
+
# parse for arguments
|
|
19
|
+
args = parser.parse_args()
|
|
20
|
+
|
|
21
|
+
async def main() -> None:
|
|
22
|
+
client = PetSafeClient(email=args.email)
|
|
23
|
+
await client.request_code()
|
|
24
|
+
print("Code requested, please check your email.")
|
|
25
|
+
print("")
|
|
26
|
+
|
|
27
|
+
try:
|
|
28
|
+
code = input("Enter email code: ")
|
|
29
|
+
except EOFError:
|
|
30
|
+
print("\nNo code entered (EOF). Exiting.")
|
|
31
|
+
return
|
|
32
|
+
|
|
33
|
+
await client.request_tokens_from_code(code)
|
|
34
|
+
|
|
35
|
+
print("")
|
|
36
|
+
print("IdToken:")
|
|
37
|
+
print(client.id_token)
|
|
38
|
+
print("")
|
|
39
|
+
print("AccessToken:")
|
|
40
|
+
print(client.access_token)
|
|
41
|
+
print("")
|
|
42
|
+
print("RefreshToken:")
|
|
43
|
+
print(client.refresh_token)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
asyncio.run(main())
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: petsafe-api
|
|
3
|
-
Version: 3.0.
|
|
3
|
+
Version: 3.0.3
|
|
4
4
|
Summary: Provides ability to connect and control a PetSafe Smart Feed, Scoopfree, and Smart Door devices using the PetSafe API.
|
|
5
5
|
Home-page: https://github.com/ThomasHFWright/petsafe-api
|
|
6
6
|
Author: Jordan Stremming & Dominick Meglio & Thomas Wright
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import sys
|
|
2
|
-
import argparse
|
|
3
|
-
|
|
4
|
-
from petsafe import PetSafeClient
|
|
5
|
-
|
|
6
|
-
# create parser for arguments
|
|
7
|
-
parser = argparse.ArgumentParser(
|
|
8
|
-
usage="python -m petsafe email [-t email_code]"
|
|
9
|
-
)
|
|
10
|
-
parser.add_argument("email", help="account email address")
|
|
11
|
-
|
|
12
|
-
# if no arguments specified, show help
|
|
13
|
-
if len(sys.argv) < 2:
|
|
14
|
-
parser.print_help()
|
|
15
|
-
sys.exit(1)
|
|
16
|
-
|
|
17
|
-
# parse for arguments
|
|
18
|
-
args = parser.parse_args()
|
|
19
|
-
|
|
20
|
-
client = PetSafeClient(email=args.email)
|
|
21
|
-
client.request_code()
|
|
22
|
-
print("Code requested, please check your email.")
|
|
23
|
-
print("")
|
|
24
|
-
|
|
25
|
-
code = input("Enter email code: ")
|
|
26
|
-
client.request_tokens_from_code(code)
|
|
27
|
-
|
|
28
|
-
print("")
|
|
29
|
-
print("IdToken:")
|
|
30
|
-
print(client.id_token)
|
|
31
|
-
print("")
|
|
32
|
-
print("AccessToken:")
|
|
33
|
-
print(client.access_token)
|
|
34
|
-
print("")
|
|
35
|
-
print("RefreshToken:")
|
|
36
|
-
print(client.refresh_token)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|