Skip to main content

PyWorldAtlas: offline world geography for Python

Offline country profiles, physical geography, optional 3D maps, distances, and learning tools for Python.

PyPI Python 3.10–3.14 CI Documentation License: MIT

248 profiles · 248 optional 3D maps · 6,265 populated places · 0 core runtime dependencies

Documentation · Quickstart · Playground · 3D maps · Examples · API reference

No installation needed: open the browser playground and run the guided Python examples.

PyWorldAtlas is an offline world-geography Python package built around one bundled, source-aware database. It turns country profiles, physical geography, cities, distances, borders, optional 3D maps, and learning tools into ordinary Python objects for developers, classrooms, and curious learners. No API key is required, and installed features work offline.

Animated PyWorldAtlas Standard 3D elevation map of Iceland

One complete rotation of Iceland rendered by the Standard map edition with elevation, coastline, Reykjavík, a river overlay, and source notes. Select the animation for the map guide.

Install

python -m pip install pyworldatlas

PyWorldAtlas supports Python 3.10 through 3.14. The installed package works offline and has no third-party runtime dependencies.

Confirm the installation or make a quick terminal lookup:

pyworldatlas --version
pyworldatlas country Japan
pyworldatlas search guinea

The command is a small companion to the Python API. It reads the same bundled database and prints concise messages instead of Python tracebacks for ordinary lookup errors. Run pyworldatlas --help for every command.

Add interactive 3D terrain maps with one command. Maps need no extra Python packages, only their data:

pyworldatlas get maps

Use pyworldatlas get maps-lite for the smaller Overview edition. Packs are checked against fingerprints pinned in the library, and pyworldatlas add FILE installs a copied pack on a machine without internet. To replace an older installation of the package, add --upgrade to the pip command.

Meet a country

from pyworldatlas import Atlas

with Atlas() as atlas:
    brazil = atlas.country("Brazil")
    print(brazil.summary())
🇧🇷 Brazil · Brasil
Formal name: Federative Republic of Brazil
Capital: Brasília
Location: Americas · South America
Population snapshot: 209,469,333
Currency: Brazilian Real (BRL, R$)
Languages: English (en), Spanish (es), French (fr), Portuguese (pt-BR)
Anthem title: Hino Nacional Brasileiro · Brazilian National Anthem
Motto: Ordem e Progresso · Order and Progress
Highest point: Pico da Neblina (2,994 m)
Dominant climate class: Aw · Tropical, savannah
Source-listed rivers: Amazon, Río de la Plata/Paraná, Tocantins
Source-listed lakes: Lagoa dos Patos, Lagoa Mirim

Atlas opens a bundled, read-only SQLite database. Results are immutable, typed models rather than loosely structured dictionaries, and loaded records remain usable after the atlas is closed.

Open the terrain

from pyworldatlas import Atlas

with Atlas() as atlas:
    atlas.map("Iceland").show(auto_rotate=True)

The one-line call opens a local, rotatable 3D map in the default browser with elevation, Köppen-Geiger climate coloring, rivers, the country outline, and the primary capital. Adjust terrain height, show every bundled river name, or hide labels for a clean presentation view. Play or pause rotation, adjust its speed, and download a high-resolution PNG of the current angle. The viewer and data remain offline after installation. Use atlas.map("Iceland").write_html("iceland-map.html", auto_rotate=True) to create a standalone rotating document for a lesson or presentation.

Compare the map editions and learn the API.

What you can explore

Area Included capabilities
Country profiles Codes, names, capitals, population, currencies, languages, timezones, postal formats, anthem titles, reviewed mottos, and demonyms
Names and writing systems English identities, selected local-language names, scripts, reviewed official forms, and source-provided romanization
Physical geography Land and water area, coastline, elevation extremes, rivers, lakes, and climate summaries
Interactive maps Optional offline 3D elevation and climate surfaces for all 248 profiles, with rotation and speed controls, crisp PNG export, terrain-height settings, and selectable labels
Places and measurement 6,265 cities and capitals with search, nearby-place discovery, readable coordinates, distance, compass direction, bearing, and midpoint calculations
Land connections Reviewed neighbors, shared neighbors, shortest border paths, crossings, and connected components
Learning tools Readable profiles, stable samples, flashcards, deterministic multiple-choice questions, rankings, discovery cards, and Unicode-preserving JSON

Explore with small, readable programs

Look up countries by familiar name or standard code:

with Atlas() as atlas:
    assert atlas.country("Japan") == atlas.country("JP")
    assert atlas.country("JPN") == atlas.country("392")
    print(atlas.country("Japan").name_in("ja"))

Measure and connect places:

with Atlas() as atlas:
    tokyo = atlas.city("Tokyo", country="JP")
    paris = atlas.city("Paris", country="FR")

    print(tokyo.coordinates.format())
    print(tokyo.coordinates.dms())
    print(f"{atlas.distance_between(tokyo, paris):,.0f} km")
    print(tokyo.coordinates.compass_direction_to(paris.coordinates))

    nearby = atlas.nearest_cities(tokyo, within_country="JP", limit=3)
    print([result.city.name for result in nearby])

    route = atlas.border_path("Portugal", "China")
    print(" → ".join(route.names))

Build a repeatable lesson:

with Atlas() as atlas:
    questions = atlas.quiz(topic="local_names", count=5, seed=42)

    for question in questions:
        print(question.prompt)
        for number, choice in enumerate(question.choices, 1):
            print(f"  {number}. {choice}")
        print("Answer:", question.answer_number)

Distances are great-circle surface measurements, not road or flight routes. Border paths use the reviewed land-border graph and do not infer maritime or boundary geometry.

Built for learning

  • Offline: lessons and programs do not depend on an external service.
  • Repeatable: seeded samples, flashcards, and quizzes produce stable results.
  • Source-aware: provenance and coverage limits are documented.
  • Beginner-friendly: common tasks use small Python objects and methods.
  • Honest about missing data: unavailable values remain None or empty tuples.

The project provides factual geography and transparent calculations, not political commentary or opinion. Read the educational and neutrality policy for the formal publication standard.

Coverage at a glance

Library 0.10.0 includes dataset 2026.10.26.1 and schema 7.

Dataset area Coverage
Countries and areas 248
Primary capitals 241 / 248
Populated places 6,265
Selected local-language identities 248 / 248
Anthem titles 234 / 248
Reviewed land-border relationships 319
Highest and lowest points 240 / 248
Köppen-Geiger climate profiles 241 / 248
Overview and Standard map coverage 248 / 248 each

See the generated project status for complete coverage and data quality for interpretation limits.

Data and trust

Field families use defined source roles rather than one unreviewed compilation. The builder retains source snapshots, checksums, review decisions, and exact coverage gates. Sources include United Nations M49, GeoNames, Unicode CLDR, UNGEGN, Natural Earth, the CIA World Factbook, Wikidata, IANA registries, the Beck et al. Köppen-Geiger dataset, and NOAA NCEI ETOPO 2022.

Documentation and community

Questions, factual corrections, documentation improvements, and focused code contributions are welcome. Start with CONTRIBUTING.md, follow the code of conduct, and report security concerns through SECURITY.md.

Development

python maintain.py bootstrap
python maintain.py check

maintain.py check runs tests, builds the core and optional-map distributions, installs the wheels in isolation, renders an offline map, executes examples, builds strict documentation and doctests, and audits the release contents.

License

PyWorldAtlas code is available under the MIT License. Bundled data retains its original terms and attribution; see THIRD_PARTY_NOTICES.md.

Metadata

Release files for pyworldatlas 0.10.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyworldatlas 0.10.0
File Size Uploaded Provenance Actions
pyworldatlas-0.10.0.tar.gz 635.6 kB With provenance Details for pyworldatlas-0.10.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyworldatlas 0.10.0
File Interpreter ABI Platform Actions
pyworldatlas-0.10.0-py3-none-any.whl Python 3 none any Details for pyworldatlas-0.10.0-py3-none-any.whl

Total release size: 1.2 MB

Release files / pyworldatlas-0.10.0.tar.gz

Download URL pyworldatlas-0.10.0.tar.gz
Size 635.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c9cf3c9e23ffd07806036d570ddec065db8f5b3ce1d2c363cd1ce617e66f153a
BLAKE2b-256 checksum
How to use checksums
cb4b925b7fb9ece4c7fce98b50b5570c78e15c16986ce5f16a67668aeda0681f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Release files / pyworldatlas-0.10.0-py3-none-any.whl

Download URL pyworldatlas-0.10.0-py3-none-any.whl
Size 598.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3c64509bbcaa8c266e138082521aae7800572f80b0af1ffe5d2e457611e6311e
BLAKE2b-256 checksum
How to use checksums
6a8bb689866913327135be97e7eae675082bf47a650f2c76c639a887c5b1880d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

Security for pyworldatlas 0.10.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for pyworldatlas-0.10.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.10.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page