apple-maps-api 0.2.0__tar.gz → 0.2.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: apple-maps-api
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: A modern Python client for the Apple Maps Server API with automatic JWT management and type safety
5
5
  Keywords: apple-maps,geocoding,search,geolocation
6
6
  Author: Michael Bianco
@@ -12,6 +12,7 @@ Requires-Dist: httpx2>=2.7.0
12
12
  Requires-Dist: funcy>=2.0
13
13
  Requires-Python: >=3.11
14
14
  Project-URL: Repository, https://github.com/iloveitaly/apple-maps-api
15
+ Project-URL: Documentation, https://iloveitaly.github.io/python-apple-maps-api/
15
16
  Description-Content-Type: text/markdown
16
17
 
17
18
  [![Release Notes](https://img.shields.io/github/release/iloveitaly/apple-maps-api)](https://github.com/iloveitaly/apple-maps-api/releases)
@@ -49,7 +50,7 @@ uv add apple-maps-api
49
50
 
50
51
  ### Basic Setup
51
52
 
52
- You'll need your Team ID, Key ID, and the private key from your Apple Developer account.
53
+ You'll need your Team ID, Key ID, and the private key from your Apple Developer account. Step-by-step portal setup (Maps ID, MapKit JS key, domains/localhost): [`docs/mapkit-js-credential-setup.md`](docs/mapkit-js-credential-setup.md).
53
54
 
54
55
  ```python
55
56
  from apple_maps_api import AppleMapsClient
@@ -59,7 +60,7 @@ client = AppleMapsClient(
59
60
  key_id="YOUR_KEY_ID",
60
61
  private_key="""-----BEGIN PRIVATE KEY-----
61
62
  ...
62
- -----END PRIVATE KEY-----"""
63
+ -----END PRIVATE KEY-----""",
63
64
  )
64
65
  ```
65
66
 
@@ -33,7 +33,7 @@ uv add apple-maps-api
33
33
 
34
34
  ### Basic Setup
35
35
 
36
- You'll need your Team ID, Key ID, and the private key from your Apple Developer account.
36
+ You'll need your Team ID, Key ID, and the private key from your Apple Developer account. Step-by-step portal setup (Maps ID, MapKit JS key, domains/localhost): [`docs/mapkit-js-credential-setup.md`](docs/mapkit-js-credential-setup.md).
37
37
 
38
38
  ```python
39
39
  from apple_maps_api import AppleMapsClient
@@ -43,7 +43,7 @@ client = AppleMapsClient(
43
43
  key_id="YOUR_KEY_ID",
44
44
  private_key="""-----BEGIN PRIVATE KEY-----
45
45
  ...
46
- -----END PRIVATE KEY-----"""
46
+ -----END PRIVATE KEY-----""",
47
47
  )
48
48
  ```
49
49
 
@@ -27,11 +27,8 @@ from .models import (
27
27
  from .version import __version__
28
28
 
29
29
  __all__ = [
30
- "__version__",
31
- "AppleMapsClient",
32
- "geocode_coordinates",
33
- "geocode_postal_code",
34
30
  "AddressCategory",
31
+ "AppleMapsClient",
35
32
  "AutocompleteResult",
36
33
  "GeocodeResult",
37
34
  "Location",
@@ -47,4 +44,7 @@ __all__ = [
47
44
  "SearchResultType",
48
45
  "StructuredAddress",
49
46
  "TokenResponse",
47
+ "__version__",
48
+ "geocode_coordinates",
49
+ "geocode_postal_code",
50
50
  ]
@@ -1,14 +1,10 @@
1
1
  class AppleMapsError(Exception):
2
2
  """Base exception for all Apple Maps API errors."""
3
3
 
4
- pass
5
-
6
4
 
7
5
  class AppleMapsAuthError(AppleMapsError):
8
6
  """Raised when authentication fails (e.g., invalid JWT, expired token)."""
9
7
 
10
- pass
11
-
12
8
 
13
9
  class AppleMapsRequestError(AppleMapsError):
14
10
  """Raised when the API returns a client error (4xx besides 429)."""
@@ -22,8 +18,6 @@ class AppleMapsRequestError(AppleMapsError):
22
18
  class AppleMapsRateLimitError(AppleMapsRequestError):
23
19
  """Raised when the API returns a 429 Too Many Requests error."""
24
20
 
25
- pass
26
-
27
21
 
28
22
  class AppleMapsServerError(AppleMapsError):
29
23
  """Raised when the API returns a 5xx server error."""
@@ -0,0 +1,74 @@
1
+ [project]
2
+ name = "apple-maps-api"
3
+ version = "0.2.1"
4
+ description = "A modern Python client for the Apple Maps Server API with automatic JWT management and type safety"
5
+ keywords = [
6
+ "apple-maps",
7
+ "geocoding",
8
+ "search",
9
+ "geolocation",
10
+ ]
11
+ readme = "README.md"
12
+ requires-python = ">=3.11"
13
+ dependencies = [
14
+ "pydantic>=2.12.3",
15
+ "tenacity>=9.1.2",
16
+ "PyJWT[crypto]>=2.9.0",
17
+ "httpx2>=2.7.0",
18
+ "funcy>=2.0",
19
+ ]
20
+
21
+ [[project.authors]]
22
+ name = "Michael Bianco"
23
+ email = "mike@mikebian.co"
24
+
25
+ [project.urls]
26
+ Repository = "https://github.com/iloveitaly/apple-maps-api"
27
+ Documentation = "https://iloveitaly.github.io/python-apple-maps-api/"
28
+
29
+ [build-system]
30
+ requires = ["uv_build>=0.11.17,<0.13"]
31
+ build-backend = "uv_build"
32
+
33
+ [tool.uv.build-backend]
34
+ module-root = ""
35
+
36
+ [tool.pyright]
37
+ exclude = [
38
+ "examples/",
39
+ "playground/",
40
+ "tmp/",
41
+ ".venv/",
42
+ ]
43
+ reportCallIssue = "error"
44
+
45
+ [tool.pytest.ini_options]
46
+ addopts = "--cov --cov-report=term-missing --cov-report=html:tmp/htmlcov"
47
+
48
+ [tool.coverage.run]
49
+ plugins = ["covdefaults"]
50
+ source = ["apple_maps_api"]
51
+
52
+ [tool.coverage.report]
53
+ fail_under = 50
54
+
55
+ [dependency-groups]
56
+ dev = [
57
+ "pytest>=8.3.4",
58
+ "pyright[nodejs]>=1.1.408",
59
+ "ruff>=0.15.15",
60
+ "coverage>=7.14.1",
61
+ "pytest-cov>=7.0.0",
62
+ "covdefaults>=2.3.0",
63
+ "pytest-httpx2>=1.0.0",
64
+ ]
65
+ docs = [
66
+ "sphinx>=7.1.2",
67
+ "shibuya",
68
+ "myst-parser>=2.0.0",
69
+ "sphinx-design>=0.5.0",
70
+ "sphinx-copybutton>=0.5.2",
71
+ "sphinx-autobuild",
72
+ "sphinx-autoapi",
73
+ "sphinx-llm",
74
+ ]
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "apple-maps-api"
3
- version = "0.2.0"
3
+ version = "0.2.1"
4
4
  description = "A modern Python client for the Apple Maps Server API with automatic JWT management and type safety"
5
5
  keywords = ["apple-maps", "geocoding", "search", "geolocation"]
6
6
  readme = "README.md"
@@ -14,10 +14,10 @@ dependencies = [
14
14
  ]
15
15
 
16
16
  authors = [{ name = "Michael Bianco", email = "mike@mikebian.co" }]
17
- urls = { "Repository" = "https://github.com/iloveitaly/apple-maps-api" }
17
+ urls = { "Repository" = "https://github.com/iloveitaly/apple-maps-api", "Documentation" = "https://iloveitaly.github.io/python-apple-maps-api/" }
18
18
 
19
19
  [build-system]
20
- requires = ["uv_build>=0.11.17,<0.12"]
20
+ requires = ["uv_build>=0.11.17,<0.13"]
21
21
  build-backend = "uv_build"
22
22
 
23
23
  [tool.uv.build-backend]
@@ -34,6 +34,17 @@ dev = [
34
34
  "covdefaults>=2.3.0",
35
35
  "pytest-httpx2>=1.0.0",
36
36
  ]
37
+ # Sphinx toolchain for local/CI docs builds — not a published package extra
38
+ docs = [
39
+ "sphinx>=7.1.2",
40
+ "shibuya",
41
+ "myst-parser>=2.0.0",
42
+ "sphinx-design>=0.5.0",
43
+ "sphinx-copybutton>=0.5.2",
44
+ "sphinx-autobuild",
45
+ "sphinx-autoapi",
46
+ "sphinx-llm",
47
+ ]
37
48
 
38
49
  [tool.pyright]
39
50
  exclude = ["examples/", "playground/", "tmp/", ".venv/"]