Skip to main content

A Python port of MapSCII's vector-tile terminal renderer

Project description

mapscii-py

A Python port of MapSCII for rendering OpenStreetMap vector tiles in terminals. It provides both an interactive CLI and a Rich-compatible MapView renderable for embedding maps in terminal applications.

Installation

python3 -m pip install mapscii-py

The distribution name is mapscii-py; the Python import package is mapscii_py.

Command line

Start the interactive map:

mapscii

Arrow keys or hjkl move the map, a zooms in, z zooms out, and q exits. Render one non-interactive frame with:

mapscii --once --width 80 --height 24

The module entry point is equivalent:

python3 -m mapscii_py --once

Rich integration

MapView adapts its width to the surrounding Rich layout and keeps a fixed number of terminal rows:

from rich.console import Console

from mapscii_py import MapView

map_view = MapView(
    latitude=47.4979,
    longitude=19.0402,
    zoom=8,
    height=16,
)

Console().print(
    map_view.panel(title="Budapest airspace")
)

Markers can be overlaid without modifying the underlying map tiles:

from mapscii_py import MapMarker

map_view.set_markers([
    MapMarker(
        latitude=47.4979,
        longitude=19.0402,
        label="Budapest",
        symbol="●",
    ),
])

Development and publishing

Build and validate both the source distribution and wheel:

python3 -m pip install build twine
python3 -m build
python3 -m twine check dist/*

Upload a release to PyPI:

python3 -m twine upload dist/*

Increase the version in pyproject.toml and mapscii_py/__init__.py before building a new release. PyPI does not allow an existing release file or version to be replaced.

Attribution and license

This implementation is derived from MapSCII, originally created by Michael Straßburger and the MapSCII contributors. Map data is © OpenStreetMap contributors.

The project is distributed under the MIT License; see LICENSE.

Project details


Download files

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

Source Distribution

mapscii_py-0.1.1.tar.gz (21.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mapscii_py-0.1.1-py3-none-any.whl (23.1 kB view details)

Uploaded Python 3

File details

Details for the file mapscii_py-0.1.1.tar.gz.

File metadata

  • Download URL: mapscii_py-0.1.1.tar.gz
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mapscii_py-0.1.1.tar.gz
Algorithm Hash digest
SHA256 b99aff4fd5bb6e9c8f58f546f6be5ee993879286123daf2e2ba5d2435734bb24
MD5 9412fa913e87a165ee45e9326b1d18ef
BLAKE2b-256 f4aab1dd1325ac1611dbf71f1cd1fa9e72d724b0b01c37cff364116b8074bbe6

See more details on using hashes here.

Provenance

The following attestation bundles were made for mapscii_py-0.1.1.tar.gz:

Publisher: publish.yml on encse/mapscii-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mapscii_py-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: mapscii_py-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 23.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mapscii_py-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 67723f6650b5bdce8baa5781152e39171edbe31358b3e5761a2f1c31a3770ead
MD5 ef2fc5aa24d0a3791ce48958acda007c
BLAKE2b-256 6a5582ee7fa93a72fbe17b75152d3b0262edd14756ceb78f019601987a3a0975

See more details on using hashes here.

Provenance

The following attestation bundles were made for mapscii_py-0.1.1-py3-none-any.whl:

Publisher: publish.yml on encse/mapscii-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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