Skip to main content

A Python 3 library built on the Mapillary API v4 to facilitate retrieving and working with Mapillary data

Project description

Mapillary Python SDK

Contributors Forks Stargazers Issues MIT License


LinkedIn Email Twitter Facebook

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,

  1. make setup-dev: Install developer dependencies
  2. make build: Build the package
  3. make 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.

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

Links

More About Mapillary

Legal

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mapillary-1.0.4.tar.gz (93.8 kB view details)

Uploaded Source

Built Distribution

mapillary-1.0.4-py2.py3-none-any.whl (59.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file mapillary-1.0.4.tar.gz.

File metadata

  • Download URL: mapillary-1.0.4.tar.gz
  • Upload date:
  • Size: 93.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for mapillary-1.0.4.tar.gz
Algorithm Hash digest
SHA256 ed5e1e65bf182b38e3bd8513842a7be9d0a595c01c28748698924354f8c3b5e9
MD5 bb5d88b9eb8a421ed03d116ff797af34
BLAKE2b-256 cce113b8ff4c7e9d5ac085f9d5dcf6c97a0d5fec9e3ebaacab5ecaa2001eec44

See more details on using hashes here.

Provenance

File details

Details for the file mapillary-1.0.4-py2.py3-none-any.whl.

File metadata

  • Download URL: mapillary-1.0.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 59.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for mapillary-1.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 254d3c92f7044b79b3eb7d805e3d7506c0c1c226c17bb8b8b37faa262e29782c
MD5 80449f6fc513e461192a2bdc85377d32
BLAKE2b-256 26ee7969bc283748d73b6eb560ad0ecd5b50ec0d18bd39e015041e6c4b7e1033

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page