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="●",
    ),
])

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.2.tar.gz (20.9 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.2-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mapscii_py-0.1.2.tar.gz
  • Upload date:
  • Size: 20.9 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.2.tar.gz
Algorithm Hash digest
SHA256 444d8c19b9f77e1ba9a1c5245d1466c0c97082350335b8285c01105a7b71a8d1
MD5 58f2f64204757fa75caccfe861ed441a
BLAKE2b-256 fad24311c731e7a811b1367cc0b2c6b5372a6d7d20aa706898ad0c1b5dddad57

See more details on using hashes here.

Provenance

The following attestation bundles were made for mapscii_py-0.1.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: mapscii_py-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 23.0 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 325cab6f8c8b16a95d09da729982c28feb94b668311c413e42f073218db567d9
MD5 adf2624937b5c76c7abaf7edd267e142
BLAKE2b-256 47a95aafd570ce3b485965d55fd672a10c7c2343cb03d6030592e64ad99b9f48

See more details on using hashes here.

Provenance

The following attestation bundles were made for mapscii_py-0.1.2-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