fmd-api 2.0.8__tar.gz → 2.0.10__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.
fmd_api-2.0.10/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Devin Slick
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -1,27 +1,27 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fmd_api
3
- Version: 2.0.8
3
+ Version: 2.0.10
4
4
  Summary: A Python client for the FMD (Find My Device) server API
5
5
  Author: devinslick
6
+ License-Expression: MIT
6
7
  Project-URL: Homepage, https://github.com/devinslick/fmd_api
7
8
  Project-URL: Repository, https://github.com/devinslick/fmd_api
8
9
  Project-URL: Issues, https://github.com/devinslick/fmd_api/issues
9
10
  Project-URL: Documentation, https://github.com/devinslick/fmd_api#readme
10
11
  Keywords: fmd,find-my-device,location,tracking,device-tracking,api-client
11
12
  Classifier: Programming Language :: Python :: 3
12
- Classifier: Programming Language :: Python :: 3.8
13
13
  Classifier: Programming Language :: Python :: 3.9
14
14
  Classifier: Programming Language :: Python :: 3.10
15
15
  Classifier: Programming Language :: Python :: 3.11
16
16
  Classifier: Programming Language :: Python :: 3.12
17
- Classifier: License :: OSI Approved :: MIT License
18
17
  Classifier: Operating System :: OS Independent
19
18
  Classifier: Development Status :: 4 - Beta
20
19
  Classifier: Intended Audience :: Developers
21
20
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
21
  Classifier: Topic :: System :: Monitoring
23
- Requires-Python: >=3.8
22
+ Requires-Python: >=3.9
24
23
  Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
25
  Requires-Dist: argon2-cffi
26
26
  Requires-Dist: cryptography
27
27
  Requires-Dist: aiohttp
@@ -30,10 +30,12 @@ Requires-Dist: pytest>=7.0; extra == "dev"
30
30
  Requires-Dist: pytest-asyncio; extra == "dev"
31
31
  Requires-Dist: pytest-cov; extra == "dev"
32
32
  Requires-Dist: aioresponses>=0.7.0; extra == "dev"
33
+ Requires-Dist: aiohttp<3.14; extra == "dev"
33
34
  Requires-Dist: black; extra == "dev"
34
35
  Requires-Dist: flake8; extra == "dev"
35
36
  Requires-Dist: mypy; extra == "dev"
36
37
  Requires-Dist: pre-commit; extra == "dev"
38
+ Dynamic: license-file
37
39
 
38
40
  # fmd_api: Python client for FMD (Find My Device)
39
41
 
@@ -79,7 +81,7 @@ asyncio.run(main())
79
81
 
80
82
  ### TLS and self-signed certificates
81
83
 
82
- Find My Device always requires HTTPS; plain HTTP is not allowed by this client. If you need to connect to a server with a self-signed certificate, you have two options:
84
+ HTTPS is strongly recommended for all connections to FMD server. HTTP is permitted for local development or trusted private networks, but should not be used in production. If you need to connect to a server with a self-signed certificate, you have two options:
83
85
 
84
86
  - Preferred (secure): provide a custom SSLContext that trusts your CA or certificate
85
87
  - Last resort (not for production): disable certificate validation explicitly
@@ -105,13 +107,13 @@ insecure_client = FmdClient("https://fmd.example.com", ssl=False)
105
107
  ```
106
108
 
107
109
  Notes:
108
- - HTTP (http://) is rejected. Use only HTTPS URLs.
110
+ - HTTPS is strongly recommended. Use HTTP only on trusted local networks or for development.
109
111
  - Prefer a custom SSLContext over disabling verification.
110
112
  - For higher security, consider pinning the server cert in your context.
111
113
 
112
114
  > Warning
113
115
  >
114
- > Passing `ssl=False` disables TLS certificate validation and should only be used in development. For production, use a custom `ssl.SSLContext` that trusts your CA/certificate or pin the server certificate. The client enforces HTTPS and rejects `http://` URLs.
116
+ > Passing `ssl=False` disables TLS certificate validation and should only be used in development. For production, use a custom `ssl.SSLContext` that trusts your CA/certificate or pin the server certificate. Using `http://` URLs sends credentials and data in plaintext — only use HTTP on trusted local networks or for development purposes.
115
117
 
116
118
  #### Pinning the exact server certificate (recommended for self-signed)
117
119
 
@@ -42,7 +42,7 @@ asyncio.run(main())
42
42
 
43
43
  ### TLS and self-signed certificates
44
44
 
45
- Find My Device always requires HTTPS; plain HTTP is not allowed by this client. If you need to connect to a server with a self-signed certificate, you have two options:
45
+ HTTPS is strongly recommended for all connections to FMD server. HTTP is permitted for local development or trusted private networks, but should not be used in production. If you need to connect to a server with a self-signed certificate, you have two options:
46
46
 
47
47
  - Preferred (secure): provide a custom SSLContext that trusts your CA or certificate
48
48
  - Last resort (not for production): disable certificate validation explicitly
@@ -68,13 +68,13 @@ insecure_client = FmdClient("https://fmd.example.com", ssl=False)
68
68
  ```
69
69
 
70
70
  Notes:
71
- - HTTP (http://) is rejected. Use only HTTPS URLs.
71
+ - HTTPS is strongly recommended. Use HTTP only on trusted local networks or for development.
72
72
  - Prefer a custom SSLContext over disabling verification.
73
73
  - For higher security, consider pinning the server cert in your context.
74
74
 
75
75
  > Warning
76
76
  >
77
- > Passing `ssl=False` disables TLS certificate validation and should only be used in development. For production, use a custom `ssl.SSLContext` that trusts your CA/certificate or pin the server certificate. The client enforces HTTPS and rejects `http://` URLs.
77
+ > Passing `ssl=False` disables TLS certificate validation and should only be used in development. For production, use a custom `ssl.SSLContext` that trusts your CA/certificate or pin the server certificate. Using `http://` URLs sends credentials and data in plaintext — only use HTTP on trusted local networks or for development purposes.
78
78
 
79
79
  #### Pinning the exact server certificate (recommended for self-signed)
80
80
 
@@ -0,0 +1 @@
1
+ __version__ = "2.0.10"
@@ -64,9 +64,9 @@ class FmdClient:
64
64
  conn_limit_per_host: Optional[int] = None,
65
65
  keepalive_timeout: Optional[float] = None,
66
66
  ) -> None:
67
- # Enforce HTTPS only (FindMyDevice always uses TLS)
68
- if base_url.lower().startswith("http://"):
69
- raise ValueError("HTTPS is required for FmdClient base_url; plain HTTP is not allowed.")
67
+ # Validate that the URL uses a supported scheme
68
+ if not base_url.lower().startswith(("http://", "https://")):
69
+ raise ValueError("base_url must use http:// or https://")
70
70
  self.base_url = base_url.rstrip("/")
71
71
  self.session_duration = session_duration
72
72
  self.cache_ttl = cache_ttl
@@ -127,7 +127,7 @@ class FmdClient:
127
127
  Factory method to create and authenticate an FmdClient.
128
128
 
129
129
  Args:
130
- base_url: HTTPS URL of the FMD server.
130
+ base_url: URL of the FMD server (https:// strongly recommended; http:// permitted for local/dev use).
131
131
  fmd_id: User/device identifier.
132
132
  password: Authentication password.
133
133
  session_duration: Token validity in seconds (default 3600).
@@ -143,7 +143,7 @@ class FmdClient:
143
143
  Authenticated FmdClient instance.
144
144
 
145
145
  Raises:
146
- ValueError: If base_url uses HTTP instead of HTTPS.
146
+ ValueError: If base_url does not start with http:// or https://.
147
147
  FmdApiException: If authentication fails or server returns an error.
148
148
  asyncio.TimeoutError: If the request times out.
149
149
  """
@@ -1,27 +1,27 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fmd_api
3
- Version: 2.0.8
3
+ Version: 2.0.10
4
4
  Summary: A Python client for the FMD (Find My Device) server API
5
5
  Author: devinslick
6
+ License-Expression: MIT
6
7
  Project-URL: Homepage, https://github.com/devinslick/fmd_api
7
8
  Project-URL: Repository, https://github.com/devinslick/fmd_api
8
9
  Project-URL: Issues, https://github.com/devinslick/fmd_api/issues
9
10
  Project-URL: Documentation, https://github.com/devinslick/fmd_api#readme
10
11
  Keywords: fmd,find-my-device,location,tracking,device-tracking,api-client
11
12
  Classifier: Programming Language :: Python :: 3
12
- Classifier: Programming Language :: Python :: 3.8
13
13
  Classifier: Programming Language :: Python :: 3.9
14
14
  Classifier: Programming Language :: Python :: 3.10
15
15
  Classifier: Programming Language :: Python :: 3.11
16
16
  Classifier: Programming Language :: Python :: 3.12
17
- Classifier: License :: OSI Approved :: MIT License
18
17
  Classifier: Operating System :: OS Independent
19
18
  Classifier: Development Status :: 4 - Beta
20
19
  Classifier: Intended Audience :: Developers
21
20
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
22
21
  Classifier: Topic :: System :: Monitoring
23
- Requires-Python: >=3.8
22
+ Requires-Python: >=3.9
24
23
  Description-Content-Type: text/markdown
24
+ License-File: LICENSE
25
25
  Requires-Dist: argon2-cffi
26
26
  Requires-Dist: cryptography
27
27
  Requires-Dist: aiohttp
@@ -30,10 +30,12 @@ Requires-Dist: pytest>=7.0; extra == "dev"
30
30
  Requires-Dist: pytest-asyncio; extra == "dev"
31
31
  Requires-Dist: pytest-cov; extra == "dev"
32
32
  Requires-Dist: aioresponses>=0.7.0; extra == "dev"
33
+ Requires-Dist: aiohttp<3.14; extra == "dev"
33
34
  Requires-Dist: black; extra == "dev"
34
35
  Requires-Dist: flake8; extra == "dev"
35
36
  Requires-Dist: mypy; extra == "dev"
36
37
  Requires-Dist: pre-commit; extra == "dev"
38
+ Dynamic: license-file
37
39
 
38
40
  # fmd_api: Python client for FMD (Find My Device)
39
41
 
@@ -79,7 +81,7 @@ asyncio.run(main())
79
81
 
80
82
  ### TLS and self-signed certificates
81
83
 
82
- Find My Device always requires HTTPS; plain HTTP is not allowed by this client. If you need to connect to a server with a self-signed certificate, you have two options:
84
+ HTTPS is strongly recommended for all connections to FMD server. HTTP is permitted for local development or trusted private networks, but should not be used in production. If you need to connect to a server with a self-signed certificate, you have two options:
83
85
 
84
86
  - Preferred (secure): provide a custom SSLContext that trusts your CA or certificate
85
87
  - Last resort (not for production): disable certificate validation explicitly
@@ -105,13 +107,13 @@ insecure_client = FmdClient("https://fmd.example.com", ssl=False)
105
107
  ```
106
108
 
107
109
  Notes:
108
- - HTTP (http://) is rejected. Use only HTTPS URLs.
110
+ - HTTPS is strongly recommended. Use HTTP only on trusted local networks or for development.
109
111
  - Prefer a custom SSLContext over disabling verification.
110
112
  - For higher security, consider pinning the server cert in your context.
111
113
 
112
114
  > Warning
113
115
  >
114
- > Passing `ssl=False` disables TLS certificate validation and should only be used in development. For production, use a custom `ssl.SSLContext` that trusts your CA/certificate or pin the server certificate. The client enforces HTTPS and rejects `http://` URLs.
116
+ > Passing `ssl=False` disables TLS certificate validation and should only be used in development. For production, use a custom `ssl.SSLContext` that trusts your CA/certificate or pin the server certificate. Using `http://` URLs sends credentials and data in plaintext — only use HTTP on trusted local networks or for development purposes.
115
117
 
116
118
  #### Pinning the exact server certificate (recommended for self-signed)
117
119
 
@@ -1,3 +1,4 @@
1
+ LICENSE
1
2
  README.md
2
3
  pyproject.toml
3
4
  fmd_api/__init__.py
@@ -7,6 +7,7 @@ pytest>=7.0
7
7
  pytest-asyncio
8
8
  pytest-cov
9
9
  aioresponses>=0.7.0
10
+ aiohttp<3.14
10
11
  black
11
12
  flake8
12
13
  mypy
@@ -1,18 +1,18 @@
1
1
  [project]
2
2
  name = "fmd_api"
3
- version = "2.0.8"
3
+ version = "2.0.10"
4
4
  authors = [{name = "devinslick"}]
5
5
  description = "A Python client for the FMD (Find My Device) server API"
6
6
  readme = "README.md"
7
- requires-python = ">=3.8"
7
+ license = "MIT"
8
+ license-files = ["LICENSE"]
9
+ requires-python = ">=3.9"
8
10
  classifiers = [
9
11
  "Programming Language :: Python :: 3",
10
- "Programming Language :: Python :: 3.8",
11
12
  "Programming Language :: Python :: 3.9",
12
13
  "Programming Language :: Python :: 3.10",
13
14
  "Programming Language :: Python :: 3.11",
14
15
  "Programming Language :: Python :: 3.12",
15
- "License :: OSI Approved :: MIT License",
16
16
  "Operating System :: OS Independent",
17
17
  "Development Status :: 4 - Beta",
18
18
  "Intended Audience :: Developers",
@@ -27,7 +27,7 @@ dependencies = [
27
27
  ]
28
28
 
29
29
  [build-system]
30
- requires = ["setuptools>=61.0", "wheel"]
30
+ requires = ["setuptools>=77", "wheel"]
31
31
  build-backend = "setuptools.build_meta"
32
32
 
33
33
  [project.urls]
@@ -42,6 +42,7 @@ dev = [
42
42
  "pytest-asyncio",
43
43
  "pytest-cov",
44
44
  "aioresponses>=0.7.0",
45
+ "aiohttp<3.14",
45
46
  "black",
46
47
  "flake8",
47
48
  "mypy",
@@ -1 +0,0 @@
1
- __version__ = "2.0.8"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes