simplestmaps 1.7.0__tar.gz → 1.7.2__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.
- simplestmaps-1.7.2/.gitignore +160 -0
- simplestmaps-1.7.2/CHANGELOG +59 -0
- {simplestmaps-1.7.0/simplestmaps.egg-info → simplestmaps-1.7.2}/PKG-INFO +14 -8
- {simplestmaps-1.7.0 → simplestmaps-1.7.2}/README.md +4 -0
- simplestmaps-1.7.2/pyproject.toml +39 -0
- {simplestmaps-1.7.0 → simplestmaps-1.7.2}/simplestmaps.py +12 -4
- simplestmaps-1.7.0/PKG-INFO +0 -61
- simplestmaps-1.7.0/setup.cfg +0 -4
- simplestmaps-1.7.0/setup.py +0 -24
- simplestmaps-1.7.0/simplestmaps.egg-info/SOURCES.txt +0 -9
- simplestmaps-1.7.0/simplestmaps.egg-info/dependency_links.txt +0 -1
- simplestmaps-1.7.0/simplestmaps.egg-info/requires.txt +0 -1
- simplestmaps-1.7.0/simplestmaps.egg-info/top_level.txt +0 -1
- {simplestmaps-1.7.0 → simplestmaps-1.7.2}/LICENSE +0 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py,cover
|
|
50
|
+
.hypothesis/
|
|
51
|
+
.pytest_cache/
|
|
52
|
+
cover/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Django stuff:
|
|
59
|
+
*.log
|
|
60
|
+
local_settings.py
|
|
61
|
+
db.sqlite3
|
|
62
|
+
db.sqlite3-journal
|
|
63
|
+
|
|
64
|
+
# Flask stuff:
|
|
65
|
+
instance/
|
|
66
|
+
.webassets-cache
|
|
67
|
+
|
|
68
|
+
# Scrapy stuff:
|
|
69
|
+
.scrapy
|
|
70
|
+
|
|
71
|
+
# Sphinx documentation
|
|
72
|
+
docs/_build/
|
|
73
|
+
|
|
74
|
+
# PyBuilder
|
|
75
|
+
.pybuilder/
|
|
76
|
+
target/
|
|
77
|
+
|
|
78
|
+
# Jupyter Notebook
|
|
79
|
+
.ipynb_checkpoints
|
|
80
|
+
|
|
81
|
+
# IPython
|
|
82
|
+
profile_default/
|
|
83
|
+
ipython_config.py
|
|
84
|
+
|
|
85
|
+
# pyenv
|
|
86
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
87
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
88
|
+
# .python-version
|
|
89
|
+
|
|
90
|
+
# pipenv
|
|
91
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
92
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
93
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
94
|
+
# install all needed dependencies.
|
|
95
|
+
#Pipfile.lock
|
|
96
|
+
|
|
97
|
+
# poetry
|
|
98
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
99
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
100
|
+
# commonly ignored for libraries.
|
|
101
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
102
|
+
#poetry.lock
|
|
103
|
+
|
|
104
|
+
# pdm
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
106
|
+
#pdm.lock
|
|
107
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
108
|
+
# in version control.
|
|
109
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
110
|
+
.pdm.toml
|
|
111
|
+
|
|
112
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
113
|
+
__pypackages__/
|
|
114
|
+
|
|
115
|
+
# Celery stuff
|
|
116
|
+
celerybeat-schedule
|
|
117
|
+
celerybeat.pid
|
|
118
|
+
|
|
119
|
+
# SageMath parsed files
|
|
120
|
+
*.sage.py
|
|
121
|
+
|
|
122
|
+
# Environments
|
|
123
|
+
.env
|
|
124
|
+
.venv
|
|
125
|
+
env/
|
|
126
|
+
venv/
|
|
127
|
+
ENV/
|
|
128
|
+
env.bak/
|
|
129
|
+
venv.bak/
|
|
130
|
+
|
|
131
|
+
# Spyder project settings
|
|
132
|
+
.spyderproject
|
|
133
|
+
.spyproject
|
|
134
|
+
|
|
135
|
+
# Rope project settings
|
|
136
|
+
.ropeproject
|
|
137
|
+
|
|
138
|
+
# mkdocs documentation
|
|
139
|
+
/site
|
|
140
|
+
|
|
141
|
+
# mypy
|
|
142
|
+
.mypy_cache/
|
|
143
|
+
.dmypy.json
|
|
144
|
+
dmypy.json
|
|
145
|
+
|
|
146
|
+
# Pyre type checker
|
|
147
|
+
.pyre/
|
|
148
|
+
|
|
149
|
+
# pytype static type analyzer
|
|
150
|
+
.pytype/
|
|
151
|
+
|
|
152
|
+
# Cython debug symbols
|
|
153
|
+
cython_debug/
|
|
154
|
+
|
|
155
|
+
# PyCharm
|
|
156
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
157
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
158
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
159
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
160
|
+
#.idea/
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# v1.7.2
|
|
2
|
+
|
|
3
|
+
- New "tiles_key" argument to be able to specify map providers API keys.
|
|
4
|
+
|
|
5
|
+
# v1.7.1
|
|
6
|
+
|
|
7
|
+
- Change default tiles to OpenStreetMap tiles, since the previous one now requires an API key to work.
|
|
8
|
+
|
|
9
|
+
# v1.7.0
|
|
10
|
+
|
|
11
|
+
- Add native support for Position objects from Orbit-predictor.
|
|
12
|
+
|
|
13
|
+
# v1.6.0
|
|
14
|
+
|
|
15
|
+
- Add support for multi polygons inside geojsons.
|
|
16
|
+
|
|
17
|
+
# v1.5.0
|
|
18
|
+
|
|
19
|
+
- No more _set helpers to work with element sets! (including internal refactor for readability)
|
|
20
|
+
|
|
21
|
+
# v1.4.0
|
|
22
|
+
|
|
23
|
+
- Added support for Telluric geo features and geo vectors out of the box!
|
|
24
|
+
- Fix: when converting sequences of coordinates, if the result is another type of object that needs
|
|
25
|
+
to be converted, keep converting them.
|
|
26
|
+
- Fix: suppport older versions of shapely in which geometries can't be imported from the root
|
|
27
|
+
package.
|
|
28
|
+
- Fix: custom coordinates sequence objects that evaluate to False when treated as booleans, should
|
|
29
|
+
still be converted.
|
|
30
|
+
|
|
31
|
+
# v1.3.0
|
|
32
|
+
|
|
33
|
+
- Added suppport for Shapely geometries out of the box!
|
|
34
|
+
- Fix: custom coordinates objects was broken for coordinates sequences in the "_set" helpers.
|
|
35
|
+
|
|
36
|
+
# v1.2.0
|
|
37
|
+
|
|
38
|
+
- Added feature to automatically convert custom types of objects to coordinates or sequences of
|
|
39
|
+
coordinates, with the function `auto_convert`.
|
|
40
|
+
- More docs about the auto conversion and map customization features.
|
|
41
|
+
- Some internal small refactors for code reuse and readability.
|
|
42
|
+
|
|
43
|
+
# v1.1.0
|
|
44
|
+
|
|
45
|
+
- Added support for element sets with the new helpers: marker_set, dot_set, label_set, html_set,
|
|
46
|
+
line_set, area_set and geojson_set.
|
|
47
|
+
- New and improved docs and examples.
|
|
48
|
+
|
|
49
|
+
# v1.0.2
|
|
50
|
+
|
|
51
|
+
- Hotfix: support for custom coordinates objects with known attributes was broken.
|
|
52
|
+
|
|
53
|
+
# v1.0.1
|
|
54
|
+
|
|
55
|
+
- Hotfix: package description was broken in PyPI.
|
|
56
|
+
|
|
57
|
+
# v1.0.0
|
|
58
|
+
|
|
59
|
+
- Initial version! Markers, dots, labels, htmls, areas, lines and geojsons supported.
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: simplestmaps
|
|
3
|
-
Version: 1.7.
|
|
3
|
+
Version: 1.7.2
|
|
4
4
|
Summary: Super simple on-liner maps in python.
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Author-email: fisadev@gmail.com
|
|
8
|
-
License: MIT
|
|
5
|
+
Project-URL: Homepage, http://github.com/fisadev/simplestmaps
|
|
6
|
+
Project-URL: Documentation, https://simplestmaps.fisadev.com/
|
|
7
|
+
Author-email: Juan Pedro Fisanotti <fisadev@gmail.com>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
9
10
|
Classifier: Intended Audience :: Developers
|
|
10
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
11
11
|
Classifier: Natural Language :: English
|
|
12
12
|
Classifier: Operating System :: OS Independent
|
|
13
13
|
Classifier: Programming Language :: Python
|
|
14
14
|
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Requires-Python: >=3.8
|
|
16
|
+
Requires-Dist: folium>=0.15.0
|
|
17
|
+
Requires-Dist: xyzservices
|
|
15
18
|
Description-Content-Type: text/markdown
|
|
16
|
-
License-File: LICENSE
|
|
17
19
|
|
|
18
20
|
# Simplest Maps
|
|
19
21
|
|
|
@@ -59,3 +61,7 @@ And every element plotted into the map is also customizable (colors, fonts, size
|
|
|
59
61
|
Here are a good set of examples that showcase (and document) all of the supported features:
|
|
60
62
|
|
|
61
63
|
## [Take a look at everything that's possible with so little code!](https://simplestmaps.fisadev.com/)
|
|
64
|
+
|
|
65
|
+
# Development
|
|
66
|
+
|
|
67
|
+
The project uses [uv](https://docs.astral.sh/uv/). Run `uv sync` to create the virtualenv with all the dev dependencies, `make build_docs` to rebuild the docs, and `make release` to build and publish a new version to PyPI.
|
|
@@ -42,3 +42,7 @@ And every element plotted into the map is also customizable (colors, fonts, size
|
|
|
42
42
|
Here are a good set of examples that showcase (and document) all of the supported features:
|
|
43
43
|
|
|
44
44
|
## [Take a look at everything that's possible with so little code!](https://simplestmaps.fisadev.com/)
|
|
45
|
+
|
|
46
|
+
# Development
|
|
47
|
+
|
|
48
|
+
The project uses [uv](https://docs.astral.sh/uv/). Run `uv sync` to create the virtualenv with all the dev dependencies, `make build_docs` to rebuild the docs, and `make release` to build and publish a new version to PyPI.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "simplestmaps"
|
|
3
|
+
version = "1.7.2"
|
|
4
|
+
description = "Super simple on-liner maps in python."
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
license = "MIT"
|
|
7
|
+
license-files = ["LICENSE"]
|
|
8
|
+
authors = [{ name = "Juan Pedro Fisanotti", email = "fisadev@gmail.com" }]
|
|
9
|
+
requires-python = ">=3.8"
|
|
10
|
+
dependencies = ["folium>=0.15.0", "xyzservices"]
|
|
11
|
+
classifiers = [
|
|
12
|
+
"Intended Audience :: Developers",
|
|
13
|
+
"Natural Language :: English",
|
|
14
|
+
"Operating System :: OS Independent",
|
|
15
|
+
"Programming Language :: Python",
|
|
16
|
+
"Programming Language :: Python :: 3",
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
[project.urls]
|
|
20
|
+
Homepage = "http://github.com/fisadev/simplestmaps"
|
|
21
|
+
Documentation = "https://simplestmaps.fisadev.com/"
|
|
22
|
+
|
|
23
|
+
[dependency-groups]
|
|
24
|
+
dev = [
|
|
25
|
+
"jupyter",
|
|
26
|
+
"nbconvert",
|
|
27
|
+
"ipykernel",
|
|
28
|
+
"shapely",
|
|
29
|
+
]
|
|
30
|
+
|
|
31
|
+
[build-system]
|
|
32
|
+
requires = ["hatchling>=1.27"]
|
|
33
|
+
build-backend = "hatchling.build"
|
|
34
|
+
|
|
35
|
+
[tool.hatch.build.targets.wheel]
|
|
36
|
+
only-include = ["simplestmaps.py"]
|
|
37
|
+
|
|
38
|
+
[tool.hatch.build.targets.sdist]
|
|
39
|
+
only-include = ["simplestmaps.py", "README.md", "LICENSE", "CHANGELOG"]
|
|
@@ -5,6 +5,7 @@ from types import GeneratorType
|
|
|
5
5
|
import json
|
|
6
6
|
|
|
7
7
|
import folium
|
|
8
|
+
import xyzservices
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
Point = namedtuple("Point", "lat lon")
|
|
@@ -307,17 +308,24 @@ def geojson(path_or_data, points_as=marker, lines_as=line, areas_as=area):
|
|
|
307
308
|
)
|
|
308
309
|
|
|
309
310
|
|
|
310
|
-
def draw_map(*things, center=(0, 0), zoom=1.5, tiles="
|
|
311
|
+
def draw_map(*things, center=(0, 0), zoom=1.5, tiles="OpenStreetMap", tiles_key=None):
|
|
311
312
|
"""
|
|
312
|
-
Draw a simple map with elements on it.
|
|
313
|
-
|
|
314
|
-
|
|
313
|
+
Draw a simple map with elements on it.
|
|
314
|
+
|
|
315
|
+
Some tile providers (like "CartoDB.Positron") require an API key, which can be specified with
|
|
316
|
+
tiles_key.
|
|
315
317
|
|
|
316
318
|
More info on tiles:
|
|
317
319
|
https://python-visualization.github.io/folium/latest/user_guide/raster_layers/tiles.html
|
|
318
320
|
"""
|
|
319
321
|
center = to_points(center)
|
|
320
322
|
|
|
323
|
+
if tiles_key:
|
|
324
|
+
tiles = xyzservices.providers.query_name(tiles)
|
|
325
|
+
# each provider names its key field differently (apikey, key, accessToken, ...)
|
|
326
|
+
tiles = tiles(**{field: tiles_key for field, value in tiles.items()
|
|
327
|
+
if isinstance(value, str) and value.startswith("<insert your")})
|
|
328
|
+
|
|
321
329
|
map_ = folium.Map(location=(center.lat, center.lon), zoom_start=zoom, attr=".", tiles=tiles)
|
|
322
330
|
|
|
323
331
|
# consume all the things to display, and use inverted order so the user can easily understand
|
simplestmaps-1.7.0/PKG-INFO
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: simplestmaps
|
|
3
|
-
Version: 1.7.0
|
|
4
|
-
Summary: Super simple on-liner maps in python.
|
|
5
|
-
Home-page: http://github.com/fisadev/simplestmaps
|
|
6
|
-
Author: Juan Pedro Fisanotti
|
|
7
|
-
Author-email: fisadev@gmail.com
|
|
8
|
-
License: MIT
|
|
9
|
-
Classifier: Intended Audience :: Developers
|
|
10
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
-
Classifier: Natural Language :: English
|
|
12
|
-
Classifier: Operating System :: OS Independent
|
|
13
|
-
Classifier: Programming Language :: Python
|
|
14
|
-
Classifier: Programming Language :: Python :: 3
|
|
15
|
-
Description-Content-Type: text/markdown
|
|
16
|
-
License-File: LICENSE
|
|
17
|
-
|
|
18
|
-
# Simplest Maps
|
|
19
|
-
|
|
20
|
-
Super simple on-liner maps in python.
|
|
21
|
-
|
|
22
|
-
# Installation
|
|
23
|
-
|
|
24
|
-
`pip3 install simplestmaps`
|
|
25
|
-
|
|
26
|
-
# Usage
|
|
27
|
-
|
|
28
|
-
This lib aims to be super simple to use. For instance, to draw a markers and an area, you could do something like this:
|
|
29
|
-
|
|
30
|
-
```python
|
|
31
|
-
from simplestmaps import draw_map, area, marker
|
|
32
|
-
|
|
33
|
-
draw_map(
|
|
34
|
-
marker(-31.2526, -61.4917, popup="my hometown"),
|
|
35
|
-
area([(-31.2741, -61.5105), (-31.2872, -61.5137), (-31.2895, -61.5003), (-31.2764, -61.4973)], color="green", popup="our airfield"),
|
|
36
|
-
)
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-

|
|
40
|
-
|
|
41
|
-
It can even do more advanced stuff, like plotting the contents of a geojson file (points, areas, lines):
|
|
42
|
-
|
|
43
|
-
```python
|
|
44
|
-
from simplestmaps import draw_map, geojson
|
|
45
|
-
|
|
46
|
-
draw_map(
|
|
47
|
-
geojson("./docs/readme_example.geojson"),
|
|
48
|
-
)
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-

|
|
52
|
-
|
|
53
|
-
SimplestMaps can plot markers, dots, labels (text), custom html, lines, areas and geojsons, and all of that can be combined in every map.
|
|
54
|
-
|
|
55
|
-
And every element plotted into the map is also customizable (colors, fonts, sizes, popups, etc).
|
|
56
|
-
|
|
57
|
-
# More demos and docs
|
|
58
|
-
|
|
59
|
-
Here are a good set of examples that showcase (and document) all of the supported features:
|
|
60
|
-
|
|
61
|
-
## [Take a look at everything that's possible with so little code!](https://simplestmaps.fisadev.com/)
|
simplestmaps-1.7.0/setup.cfg
DELETED
simplestmaps-1.7.0/setup.py
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
from setuptools import setup
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
setup(
|
|
5
|
-
name="simplestmaps",
|
|
6
|
-
version="1.7.0",
|
|
7
|
-
description="Super simple on-liner maps in python.",
|
|
8
|
-
long_description=open("README.md").read(),
|
|
9
|
-
long_description_content_type="text/markdown",
|
|
10
|
-
author="Juan Pedro Fisanotti",
|
|
11
|
-
author_email="fisadev@gmail.com",
|
|
12
|
-
url="http://github.com/fisadev/simplestmaps",
|
|
13
|
-
py_modules=["simplestmaps"],
|
|
14
|
-
license="MIT",
|
|
15
|
-
install_requires=["folium>=0.14.0"],
|
|
16
|
-
classifiers=[
|
|
17
|
-
"Intended Audience :: Developers",
|
|
18
|
-
"License :: OSI Approved :: MIT License",
|
|
19
|
-
"Natural Language :: English",
|
|
20
|
-
"Operating System :: OS Independent",
|
|
21
|
-
"Programming Language :: Python",
|
|
22
|
-
"Programming Language :: Python :: 3",
|
|
23
|
-
],
|
|
24
|
-
)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
folium>=0.14.0
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
simplestmaps
|
|
File without changes
|