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.
- {staticmap3-0.1.0 → staticmap3-0.2.1}/PKG-INFO +17 -15
- {staticmap3-0.1.0 → staticmap3-0.2.1}/README.md +5 -5
- {staticmap3-0.1.0 → staticmap3-0.2.1}/pyproject.toml +10 -9
- {staticmap3-0.1.0 → staticmap3-0.2.1}/staticmap3/staticmap.py +4 -2
- {staticmap3-0.1.0 → staticmap3-0.2.1}/LICENSE.txt +0 -0
- {staticmap3-0.1.0 → staticmap3-0.2.1}/staticmap3/__init__.py +0 -0
- {staticmap3-0.1.0 → staticmap3-0.2.1}/staticmap3/tests.py +0 -0
|
@@ -1,29 +1,31 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: staticmap3
|
|
3
|
-
Version: 0.1
|
|
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.
|
|
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
|
|
22
|
-
Requires-Dist: filelock
|
|
23
|
-
Requires-Dist: mypy (>=1.
|
|
24
|
-
Requires-Dist: pillow
|
|
25
|
-
Requires-Dist: requests
|
|
26
|
-
Requires-Dist: ruff (>=0.
|
|
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
|
-

|
|
50
|
+

|
|
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
|
-

|
|
146
|
+

|
|
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
|
-

|
|
166
|
+

|
|
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
|
-

|
|
186
|
+

|
|
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
|
-

|
|
19
|
+

|
|
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
|
-

|
|
115
|
+

|
|
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
|
-

|
|
135
|
+

|
|
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
|
-

|
|
155
|
+

|
|
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
|
|
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.
|
|
26
|
+
requires-python = ">=3.10"
|
|
26
27
|
|
|
27
28
|
dependencies = [
|
|
28
|
-
"cachecontrol
|
|
29
|
-
"pillow
|
|
30
|
-
"requests
|
|
29
|
+
"cachecontrol",
|
|
30
|
+
"pillow",
|
|
31
|
+
"requests"
|
|
31
32
|
]
|
|
32
33
|
|
|
33
34
|
[project.optional-dependencies]
|
|
34
|
-
filecache = ["filelock
|
|
35
|
+
filecache = ["filelock"]
|
|
35
36
|
dev = [
|
|
36
|
-
"mypy>=1.
|
|
37
|
-
"ruff>=0.
|
|
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
|
-
|
|
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
|
|
File without changes
|
|
File without changes
|