A Python 3 library built on the Mapillary API v4 to facilitate retrieving and working with Mapillary data
Project description
Mapillary Python SDK
Mapillary's official Python SDK for GeoSpatial Data
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
·
See Documentation
Table Of Contents
About
Mapillary's Python SDK provides an easy mechanism for accessing and retrieving information from Mapillary's web application.
For more information, please visit Mapillary and Mapillary's Blog.
Getting Started
Installation
To get started, simply install mapillary by running,
pip install mapillary
A quick demo,
"""
Getting image coordinates from a nearby set of coordinates
"""
# Importing mapillary
import mapillary.interface as mly
# JSON import
import json
# Get image points close to in the given coordinates
data = mly.get_image_close_to(longitude=31, latitude=30).to_dict()
# Save the data as JSON
file_name = "get_image_close_to_1.json"
with open(file_name, mode="w") as f:
json.dump(data, f, indent=4)
You can check out all the implemented functionality from the demo.
Or you can check out the documentation!
Development
Formatting/Linting
To run the formatter black, and the linter flake8, run,
flake8 mapillary & black mapillary
Or, if you are on Linux, you can simply run,
make style
This runs the style policy from the Makefile.
Dev Setup
Aliases for setting up the environment have been provided in Makefile to reduce burden of replication.
The steps to execute are, in order of running them,
make setup-dev: Install developer dependenciesmake build: Build the packagemake local-install: Install package locally in the dev environment
To use the new package installed locally, first use pipenv to change into the environment that the package was installed into by running,
pipenv shell
Then run,
python # assuming running python opens the Python3 shell
Then import and use as required,
# import package here
import mapillary.interface as mly
# more code to follow here
Trouble shooting
If you get messed up dependencies, feel free to delete the Pipfile.lock file with rm Pipfile.lock, then start again with the first step in Dev Setup.
If you ever need to start with a clean build, you can always run make clean which will clean the dist directory, then you can simply start again from the second step in Dev Setup.
Upgrading A Package
If you upgrade any package in Pipfile, be sure to run pipenv install to update the Pipfile.lock as well.
Possible Issues
Failed installation/dev setup because of libgeos_c.so or libgeos_c_1.so
With UNIX based systems, you would to install the `geos` package with you package manager.
In debian systems, sudo apt install geos.
In arch based systems, sudo pacman -S geos.
Contributing
We welcome contributions! See CONTRIBUTING for details on how to get started, and our code of conduct.
Acknowledgements
- Christopher Beddow - for leading the project
- Saif Ul Islam - for developing the SDK under MLH fellowship
- Omar Ali - for developing the SDK under MLH fellowship
Links
More About Mapillary
Legal
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mapillary-1.0.15.tar.gz.
File metadata
- Download URL: mapillary-1.0.15.tar.gz
- Upload date:
- Size: 111.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4bfb9cd5ef50aa4d371a2006c1528e2adfa9bf44314e65577681967e9c7d9622
|
|
| MD5 |
88e851448b0d441539c5e75a585706cc
|
|
| BLAKE2b-256 |
1f4e43c54ec1a2801e2c31f79be1f9129f0d268f759aa698de26dcbc2006de95
|
Provenance
The following attestation bundles were made for mapillary-1.0.15.tar.gz:
Publisher:
pypi-publish.yml on mapillary/mapillary-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mapillary-1.0.15.tar.gz -
Subject digest:
4bfb9cd5ef50aa4d371a2006c1528e2adfa9bf44314e65577681967e9c7d9622 - Sigstore transparency entry: 298425906
- Sigstore integration time:
-
Permalink:
mapillary/mapillary-python-sdk@28f36b65394e890042229627ec0d8ef8fa34f632 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mapillary
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@28f36b65394e890042229627ec0d8ef8fa34f632 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mapillary-1.0.15-py3-none-any.whl.
File metadata
- Download URL: mapillary-1.0.15-py3-none-any.whl
- Upload date:
- Size: 69.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a1c614783dae0f9659e6c86151e1d6f533521fd84230d11d45d981d28abf0321
|
|
| MD5 |
8a997b627faa72f2b3ba05063b1184c4
|
|
| BLAKE2b-256 |
2dcef396f50fd0a0b2d24320266d8747c1e137ce204bc9d8181127647aec7cec
|
Provenance
The following attestation bundles were made for mapillary-1.0.15-py3-none-any.whl:
Publisher:
pypi-publish.yml on mapillary/mapillary-python-sdk
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mapillary-1.0.15-py3-none-any.whl -
Subject digest:
a1c614783dae0f9659e6c86151e1d6f533521fd84230d11d45d981d28abf0321 - Sigstore transparency entry: 298425924
- Sigstore integration time:
-
Permalink:
mapillary/mapillary-python-sdk@28f36b65394e890042229627ec0d8ef8fa34f632 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mapillary
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@28f36b65394e890042229627ec0d8ef8fa34f632 -
Trigger Event:
push
-
Statement type: