Skip to main content

A Braille and ASCII OpenStreetMap renderer for Python terminals

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.

Based on MapsCII v0.3.1.

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.3.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.3.1-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mapscii_py-0.3.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.3.1.tar.gz
Algorithm Hash digest
SHA256 c86c7355a03b82a3b1d2226f43349944f3c32fa757aacd87b8df059bc23ade29
MD5 b4a65ef0ea89882fdceaed484e2a81cc
BLAKE2b-256 de563ee8fd65c097caddc25b962af738c9917742b545daf24640f9ee4a5d3f2f

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: mapscii_py-0.3.1-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.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e8b2c60b9e5cfd61a0b5ed8eb781ff1ad0d7f70dda493f70fd2eb9c2cf475463
MD5 6fda0b41c5929afbff9af4b080aaef8b
BLAKE2b-256 a59584dc6abaeb4e480b309d01a733c4e896cb48c1ce8a92708a7acd9819bb8b

See more details on using hashes here.

Provenance

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