staticmap3 0.1.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,29 +1,31 @@
1
- Metadata-Version: 2.3
1
+ Metadata-Version: 2.4
2
2
  Name: staticmap3
3
- Version: 0.1.0
3
+ Version: 0.2.1
4
4
  Summary: Fork of staticmap, a small, python-based library for creating map images with lines and markers.
5
5
  License: Apache Software License
6
+ License-File: LICENSE.txt
6
7
  Keywords: static,map,image,osm
7
8
  Author: Christoph Lingg
8
9
  Author-email: christoph@komoot.de
9
10
  Maintainer: SamR1
10
- Requires-Python: >=3.9
11
+ Requires-Python: >=3.10
11
12
  Classifier: License :: OSI Approved :: Apache Software License
12
13
  Classifier: Operating System :: POSIX :: Linux
13
14
  Classifier: Programming Language :: Python :: 3
14
- Classifier: Programming Language :: Python :: 3.9
15
15
  Classifier: Programming Language :: Python :: 3.10
16
16
  Classifier: Programming Language :: Python :: 3.11
17
17
  Classifier: Programming Language :: Python :: 3.12
18
18
  Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Programming Language :: Python :: 3.14
20
+ Classifier: Programming Language :: Python :: 3.15
19
21
  Provides-Extra: dev
20
22
  Provides-Extra: filecache
21
- Requires-Dist: cachecontrol (>=0.14.3)
22
- Requires-Dist: filelock (>=3.8.0) ; extra == "filecache"
23
- Requires-Dist: mypy (>=1.15.0) ; extra == "dev"
24
- Requires-Dist: pillow (>=11.2.1)
25
- Requires-Dist: requests (>=2.32.3)
26
- Requires-Dist: ruff (>=0.11.10) ; extra == "dev"
23
+ Requires-Dist: cachecontrol
24
+ Requires-Dist: filelock ; extra == "filecache"
25
+ Requires-Dist: mypy (>=1.19.1) ; extra == "dev"
26
+ Requires-Dist: pillow
27
+ Requires-Dist: requests
28
+ Requires-Dist: ruff (>=0.15.5) ; extra == "dev"
27
29
  Requires-Dist: types-requests ; extra == "dev"
28
30
  Description-Content-Type: text/markdown
29
31
 
@@ -32,7 +34,7 @@ Description-Content-Type: text/markdown
32
34
  Static Map 3 is a fork of [Static Map](https://github.com/komoot/staticmap), a small, python-based library for creating map images with lines and markers.\
33
35
  The main purpose of this fork is to fix error handling on tile requests, to allow interrupting the execution (see [PR](https://github.com/komoot/staticmap/pull/39) on the original repository).
34
36
 
35
- Changes since the fork are detailed in [CHANGELOG.md](CHANGELOG.md).
37
+ Changes since the fork are detailed in [CHANGELOG.md](https://github.com/SamR1/staticmap/blob/main/CHANGELOG.md).
36
38
 
37
39
  ## Example
38
40
  ```python
@@ -45,7 +47,7 @@ image.save('map.png')
45
47
  ```
46
48
  This will create a 300px x 400px map with a blue line drawn from Berlin to Paris.
47
49
 
48
- ![Map with Line from Berlin to Paris](/samples/berlin_paris.png?raw=true)
50
+ ![Map with Line from Berlin to Paris](https://raw.githubusercontent.com/SamR1/staticmap/refs/heads/main/samples/berlin_paris.png?raw=true)
49
51
 
50
52
 
51
53
  ## Installation
@@ -141,7 +143,7 @@ image = m.render(zoom=5)
141
143
  image.save('marker.png')
142
144
  ```
143
145
 
144
- ![Position IconMarker on a Map](/samples/marker.png?raw=true)
146
+ ![Position IconMarker on a Map](https://raw.githubusercontent.com/SamR1/staticmap/refs/heads/main/samples/marker.png?raw=true)
145
147
 
146
148
  #### Show Ferry Connection
147
149
 
@@ -161,7 +163,7 @@ image = m.render()
161
163
  image.save('ferry.png')
162
164
  ```
163
165
 
164
- ![Ferry Connection Shown on a Map](/samples/ferry.png?raw=true)
166
+ ![Ferry Connection Shown on a Map](https://raw.githubusercontent.com/SamR1/staticmap/refs/heads/main/samples/ferry.png?raw=true)
165
167
 
166
168
  #### Show Icon Marker
167
169
 
@@ -181,7 +183,7 @@ image = m.render()
181
183
  image.save('icons.png')
182
184
  ```
183
185
 
184
- ![Ferry Connection Shown on a Map](/samples/icons.png?raw=true)
186
+ ![Ferry Connection Shown on a Map](https://raw.githubusercontent.com/SamR1/staticmap/refs/heads/main/samples/icons.png?raw=true)
185
187
 
186
188
  ### Alternatives
187
189
  With [papermap](https://github.com/sgraaf/papermap) there is also a spin-off project dedicated to print maps.
@@ -3,7 +3,7 @@
3
3
  Static Map 3 is a fork of [Static Map](https://github.com/komoot/staticmap), a small, python-based library for creating map images with lines and markers.\
4
4
  The main purpose of this fork is to fix error handling on tile requests, to allow interrupting the execution (see [PR](https://github.com/komoot/staticmap/pull/39) on the original repository).
5
5
 
6
- Changes since the fork are detailed in [CHANGELOG.md](CHANGELOG.md).
6
+ Changes since the fork are detailed in [CHANGELOG.md](https://github.com/SamR1/staticmap/blob/main/CHANGELOG.md).
7
7
 
8
8
  ## Example
9
9
  ```python
@@ -16,7 +16,7 @@ image.save('map.png')
16
16
  ```
17
17
  This will create a 300px x 400px map with a blue line drawn from Berlin to Paris.
18
18
 
19
- ![Map with Line from Berlin to Paris](/samples/berlin_paris.png?raw=true)
19
+ ![Map with Line from Berlin to Paris](https://raw.githubusercontent.com/SamR1/staticmap/refs/heads/main/samples/berlin_paris.png?raw=true)
20
20
 
21
21
 
22
22
  ## Installation
@@ -112,7 +112,7 @@ image = m.render(zoom=5)
112
112
  image.save('marker.png')
113
113
  ```
114
114
 
115
- ![Position IconMarker on a Map](/samples/marker.png?raw=true)
115
+ ![Position IconMarker on a Map](https://raw.githubusercontent.com/SamR1/staticmap/refs/heads/main/samples/marker.png?raw=true)
116
116
 
117
117
  #### Show Ferry Connection
118
118
 
@@ -132,7 +132,7 @@ image = m.render()
132
132
  image.save('ferry.png')
133
133
  ```
134
134
 
135
- ![Ferry Connection Shown on a Map](/samples/ferry.png?raw=true)
135
+ ![Ferry Connection Shown on a Map](https://raw.githubusercontent.com/SamR1/staticmap/refs/heads/main/samples/ferry.png?raw=true)
136
136
 
137
137
  #### Show Icon Marker
138
138
 
@@ -152,7 +152,7 @@ image = m.render()
152
152
  image.save('icons.png')
153
153
  ```
154
154
 
155
- ![Ferry Connection Shown on a Map](/samples/icons.png?raw=true)
155
+ ![Ferry Connection Shown on a Map](https://raw.githubusercontent.com/SamR1/staticmap/refs/heads/main/samples/icons.png?raw=true)
156
156
 
157
157
  ### Alternatives
158
158
  With [papermap](https://github.com/sgraaf/papermap) there is also a spin-off project dedicated to print maps.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "staticmap3"
3
- version = "0.1.0"
3
+ version = "0.2.1"
4
4
  description = "Fork of staticmap, a small, python-based library for creating map images with lines and markers."
5
5
  authors = [
6
6
  {name = "Christoph Lingg", email = "christoph@komoot.de"}
@@ -15,26 +15,27 @@ classifiers = [
15
15
  "License :: OSI Approved :: Apache Software License",
16
16
  "Operating System :: POSIX :: Linux",
17
17
  "Programming Language :: Python :: 3",
18
- "Programming Language :: Python :: 3.9",
19
18
  "Programming Language :: Python :: 3.10",
20
19
  "Programming Language :: Python :: 3.11",
21
20
  "Programming Language :: Python :: 3.12",
22
21
  "Programming Language :: Python :: 3.13",
22
+ "Programming Language :: Python :: 3.14",
23
+ "Programming Language :: Python :: 3.15",
23
24
  ]
24
25
 
25
- requires-python = ">=3.9"
26
+ requires-python = ">=3.10"
26
27
 
27
28
  dependencies = [
28
- "cachecontrol>=0.14.3",
29
- "pillow>=11.2.1",
30
- "requests>=2.32.3"
29
+ "cachecontrol",
30
+ "pillow",
31
+ "requests"
31
32
  ]
32
33
 
33
34
  [project.optional-dependencies]
34
- filecache = ["filelock >= 3.8.0"]
35
+ filecache = ["filelock"]
35
36
  dev = [
36
- "mypy>=1.15.0",
37
- "ruff>=0.11.10",
37
+ "mypy>=1.19.1",
38
+ "ruff>=0.15.5",
38
39
  "types-requests"
39
40
  ]
40
41
 
@@ -463,13 +463,15 @@ class StaticMap:
463
463
  for tile in tiles
464
464
  ]
465
465
 
466
- for tile, future in zip(tiles, futures):
466
+ for tile, future in zip(tiles, futures, strict=True):
467
467
  x, y, url = tile
468
468
 
469
469
  try:
470
470
  response_status_code, response_content = future.result()
471
471
  except Exception:
472
- response_status_code, response_content = None, None
472
+ logger.exception("request failed")
473
+ failed_tiles.append(tile)
474
+ continue
473
475
 
474
476
  if response_status_code != 200:
475
477
  logger.error(
File without changes