Debian Codegraph @

meater_python.egg-info/PKG-INFO

raw
1 Metadata-Version: 2.1
2 Name: meater-python
3 Version: 0.0.8
4 Summary: A wrapper for the Apption Labs Meater probe API v1
5 Home-page: https://github.com/Sotolotl/meater-python
6 Author: Billy Stevenson
7 Author-email: [email protected]
8 License: UNKNOWN
9 Description: # meater-python
10
11 Python wrapper for the Apption Labs Meater cooking probe using v1 of their public API.
12
13 ## Installation
14
15 `meater-python` can be installed from either PyPi or can be installed manually by cloning the GitHub repository.
16
17 ### TL;DR installation
18
19 ```pip install meater-python```
20
21 ### Manual installation
22
23 First, clone the GitHub repository:
24 ```git clone https://github.com/Sotolotl/meater-python.git```
25
26 Enter the newly created `meater-python` directory and run:
27 ```pip install .```
28
29 This should install `meater-python` on your system. You can use it in your own Python scripts like so:
30
31 ```python
32 import meater
33 ```
34
35 ## Usage
36
37 All calls to this class are flagged with async, and are awaitable.
38
39 To get started, first import the `MeaterApi` class from `meater`.
40
41 ### Initializing
42
43 ```python
44 import aiohttp
45 from meater import MeaterApi
46
47 session = aiohttp.ClientSession()
48
49 api = MeaterApi(session)
50 ```
51
52 The code above initializes the cooker into the `api` variable. The api requires an aiohttp session be passed to it. One session should be created for the whole application to use, as per the aiohttp best practices.
53
54 Before any information can be obtained, you need to authenticate with the api. In the current version of `meater-python`, only email/password authentication is supported. You can authenticate with the API like so:
55
56 ```python
57 await api.authenticate('<your email address>','<your password>')
58 ```
59
60 ### Getting Probe States
61
62 Once you have authentiated with the API, you can get information about all available probes like so:
63
64 ```python
65 devices = await api.get_all_devices()
66 ```
67
68 This will populate the `devices` variable with a list of all the available device objects.
69
70 **NOTE**: Only devices that are actively connected to Meater Cloud are available through the API. Once a probe has been disconnected for a few minutes, it is no longer returned by the API.
71
72 A specific device can be queried by the API like so:
73
74 ```python
75 device = await api.get_device('<your device ID>')
76 ```
77
78 The device ID should be a 65 character long alphanumeric string. To obtain the device ID, make a call to `api.get_all_devices` while the device is connected.
79
80 **NOTE**: This method will throw an exception if the device cannot be found. This includes if the device is currently offline.
81
82 ### MeaterProbe Object Attributes
83
84 The following arrtibutes are available on the MeaterProbe object
85 | Attribute | Type | Description |
86 | --- | --- | --- |
87 | `id` | str | The ID of the device |
88 | `internal_temperature` | float | The internal temperature reading of the probe in ℃ |
89 | `ambient_temperature` | float | The ambient temperature reading of the probe in ℃ |
90 | `time_updated` | datetime | The time that the probes values were last sent to the Meater cloud |
91 | `cook` | MeaterCook (see below) | A MeaterCook class containing information about the current cook. If no cook is running, this will be `None` |
92
93 The following attributes are available on the MeaterCook object
94 | Attribute | Type | Description |
95 | --- | --- | --- |
96 | `id` | str | The ID of the cook |
97 | `name` | str | The name of the cook |
98 | `state` | str | The current state of the cook |
99 | `target_temperature` | float | The target temperature for this cook in ℃ |
100 | `peak_temperature` | float | The peak temperature so far for this cook in ℃ |
101 | `time_remaining` | int | The time remaining for this cook in seconds |
102 | `time_elapsed` | int | How long has elapsed since the start of the cook in seconds |
103
104 ## Troubleshooting
105
106 Devices will only be returned after the following criteria is met. There may be a delay between the MEATER Cloud seeing your device and it being returned in this endpoint.
107
108 * Device must be seen by the MEATER Cloud. Ensure you've completed a cook while connected to MEATER Cloud.
109 * The MEATER app or Block must have an active Bluetooth connection with the device.
110 * The MEATER app or Block must have an active MEATER Cloud connection.
111
112 If you make requests to the Meater API too quickly, you may be subject to rate-limiting. The reccomended rate is 2 requests per 60 seconds, and the maximum is 60 requests per 60 seconds.
113
114 Requests are automatically slowed down once 10% of rate limit is reached, to 1.0 second per request.
115
116 Platform: UNKNOWN
117 Classifier: Programming Language :: Python :: 3
118 Classifier: License :: OSI Approved :: Apache Software License
119 Classifier: Operating System :: OS Independent
120 Requires-Python: >=3.6
121 Description-Content-Type: text/markdown