You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: usage.md
+8-6Lines changed: 8 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,10 +41,10 @@ In the netatmo philosophy, both the application itself and the user have to be r
41
41
42
42
Copy the lnetatmo.py file in your work directory (or use pip install lnetatmo).
43
43
44
-
Authentication data can be supplied with 4 different methods :
44
+
Authentication data can be supplied with 4 different methods (each method override any settings of previous methods) :
45
45
46
46
1. Some or all values can be hard coded in the library source (and default to empty strings). If you use this method, you are back to the initial suggested method. It would be nice to switch to other methods to isolate credentials and ease library upgrades.
47
-
2. Some or all values can be overriden in a ~/.netatmo.credentials file containing the keys in JSON format
47
+
2. Some or all values can be overriden in a ~/.netatmo.credentials (in your platform home directory) file containing the keys in JSON format
48
48
49
49
$ cat .netatmo.credentials # Here all values are defined but it is not mandatory
50
50
{
@@ -55,7 +55,7 @@ Authentication data can be supplied with 4 different methods :
55
55
}
56
56
$
57
57
58
-
3. Some or all values can be overriden by environment variables. This is the easiest method if your are packaging your application with Docker
58
+
3. Some or all values can be overriden by environment variables. This is the easiest method if your are packaging your application with Docker. It also allow you to do some testing with other accounts without touching your current ~/.netatmo.credentials file
59
59
60
60
$ export USERNAME=newUsername
61
61
$ export PASSWORD=password
@@ -64,9 +64,9 @@ Authentication data can be supplied with 4 different methods :
64
64
65
65
4. Some or all values can be overriden by explicit call to initializer of ClientAuth class
66
66
67
-
# Example: CLIENT_ID and CLIENT_SECRET supposed to be defined by one of the previous methods
If you provide all the values, using any method or mix except 4, you can test that everything is working properly by simply running the package as a standalone program.
72
72
@@ -79,6 +79,8 @@ $ echo $?
79
79
0
80
80
```
81
81
82
+
Whatever is your choice for the library authentication setup, your application code if you were using previous library version, will not be affected.
0 commit comments