Skip to main content

PyWorldAtlas: offline world geography for Python

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

PyPI Python 3.10–3.14 CI Documentation License: MIT

248 profiles · 200,000 places built in · 11 million with packs · 248 optional 3D maps · 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.

Find any place on Earth

from pyworldatlas import Atlas

with Atlas() as atlas:
    print(atlas.place("Lake Titicaca"))
    print([str(item) for item in atlas.lookup("Georgia", limit=2)])  # the country, then the US state
    for result in atlas.places_near("Nairobi", category="water", limit=3):
        print(f"{result.distance:.0f} km  {result.place}")

Every install includes a school atlas of about 200,000 places chosen by educational value: every country, region, and town of 5,000 people or more, and the mountains, volcanoes, lakes, rivers, deserts, islands, and landmarks that people around the world know. It adds about 2 MB, under a minute on a slow 3G connection. Search by local or English name, best known first, and ask what is near any point in a few milliseconds.

Want everything? pyworldatlas get places-explorer places-world adds every other village, stream, and hill in the GeoNames gazetteer, 11 million places in all. Read the places guide.

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 About 200,000 places built in (11 million with packs) and 6,265 detailed city profiles, with search by local or English name, nearest-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.11.1 includes dataset 2026.10.27.1 and schema 8.

Dataset area Coverage
Countries and areas 248
Primary capitals 241 / 248
Populated places with detailed profiles 6,265
Places in the built-in school atlas 207,664
Places with the explorer and world packs 11,112,657
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.11.1

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.11.1
File Size Uploaded Provenance Actions
pyworldatlas-0.11.1.tar.gz 2.7 MB With provenance Details for pyworldatlas-0.11.1.tar.gz

Built distribution (wheel)

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

Total release size: 5.3 MB

Release files / pyworldatlas-0.11.1.tar.gz

Download URL pyworldatlas-0.11.1.tar.gz
Size 2.7 MB
Tags Source
SHA-256 checksum
How to use checksums
ff0976ccf8ca1b84bda91b39c90db07004fef9d4d1700efec48c943dd8b146b3
BLAKE2b-256 checksum
How to use checksums
d6491dc02c2839d99ab8ec6a9f0e43d49e41333b4dabe3df39461d3f60654c04
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 28, 2026.

Transparency log

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

Download URL pyworldatlas-0.11.1-py3-none-any.whl
Size 2.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
ad22a163dfe1885abf2908d460509b89d58f8ee723fe5e86d90219ed3dac46cc
BLAKE2b-256 checksum
How to use checksums
a806a4df817111de5a234520bbca9b50f0d3f5b35c19c8357d18271c54326772
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 28, 2026.

Transparency log

Security for pyworldatlas 0.11.1

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.11.1.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 28, 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.11.1 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