Shops Package
Provides data about shoplike objecs in a given location, based on OpenStreetMap data.
Remember about license, see https://www.openstreetmap.org/copyright
See actual use in say https://codeberg.org/matkoniecz/list_how_openstreetmap_can_be_improved_with_alltheplaces_data/src/branch/master/4_process_planet_file.py
If you are interested in more clear example without cruft specific to that other project: please create an issue.
It will provide filtered OSM data, in a form of yielded dicts, each with tags, center and osm_link fields, center being a dict with lat and lon fields:
...
{'tags': {'amenity': 'restaurant', 'building': 'yes', 'name': "Vermutería Arrosseria del Poble D'Auvinya"}, 'center': {'lat': 42.45450165, 'lon': 1.4926907}, 'osm_link': 'https://www.openstreetmap.org/way/1236442460'}
{'tags': {'access': 'yes', 'amenity': 'charging_station', 'capacity': '8', 'fee': 'yes', 'name': '313 Aparcament telecabina del Tarter', 'operator': "Forces Elèctriques d'Andorra", 'payment:app': 'yes', 'payment:electromaps': 'yes'}, 'center': {'lat': 42.57838705, 'lon': 1.6470569}, 'osm_link': 'https://www.openstreetmap.org/way/1270600406'}
{'tags': {'building': 'commercial', 'shop': 'car_repair'}, 'center': {'lat': 42.5531873, 'lon': 1.50726665}, 'osm_link': 'https://www.openstreetmap.org/way/1276422261'}
{'tags': {'addr:city': 'Incles', 'addr:postcode': 'AD100', 'addr:street': "Camí Pont D'Incles", 'amenity': 'restaurant', 'building': 'yes', 'name': 'Lamont'}, 'center': {'lat': 42.5831009, 'lon': 1.6640846}, 'osm_link': 'https://www.openstreetmap.org/way/1286995487'}
{'tags': {'addr:city': 'El Tarter', 'addr:postcode': 'AD100', 'addr:street': 'CG-2', 'amenity': 'restaurant', 'building': 'yes', 'cuisine': 'bar&grill', 'name': 'The Boss', 'name:ca': 'The Boss'}, 'center': {'lat': 42.57929245, 'lon': 1.64093665}, 'osm_link': 'https://www.openstreetmap.org/way/1288987664'}
{'tags': {'building': 'yes', 'office': 'government', 'type': 'multipolygon'}, 'center': {'lat': 42.50669325, 'lon': 1.5222641000000001}, 'osm_link': 'https://www.openstreetmap.org/relation/14084224'}
{'tags': {'amenity': 'bank', 'building': 'yes', 'name': 'Andbank', 'name:ca': 'Andbank', 'type': 'multipolygon'}, 'center': {'lat': 42.51118895, 'lon': 1.5346714750000001}, 'osm_link': 'https://www.openstreetmap.org/relation/14119424'}
Installation
pip install shops
It is uploaded to pypi.org
Behind scenes
Data is downloaded, preprocessed and output cached within specified folder.
First run will take long time especially for longer datasets.
Run tests
python3 -m unittest
Contributions
Bug reports, benchmarks, ideas, pull requests, suggestions and maybe thanks are welcome on the issue tracker!
I am especially looking for ways to make this code faster.
Note that for larger code changes opening issue first, before sending patch, may be a good idea.
Metadata
Release files for shops 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| shops-0.0.4.tar.gz | 6.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| shops-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.3 kB
Release files / shops-0.0.4.tar.gz
| Download URL | shops-0.0.4.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
17227e00e3a137b4d1f31e285afce113f5b6990c9e23349491911660eaf0a796
|
|
BLAKE2b-256 checksum How to use checksums |
116c4f9e12cb1dcc075c68b44db08b2956e9e0c33cc5b01820f45e43988118af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Release files / shops-0.0.4-py3-none-any.whl
| Download URL | shops-0.0.4-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
562141f304d27ab8f8fb31c418f3b12b0b2e3952217a4e9ad80e2988a83bc003
|
|
BLAKE2b-256 checksum How to use checksums |
f64ebe87d182543eaf627c858e6c19438e52c55ea787cf9a6d84f1ff351f230c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.10
|
Security for shops 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.