Country reference facts

Typed, source-aware facts make each country profile useful as a small offline reference. An optional fact is absent when it is outside the captured source scope; the package does not fill gaps with guesses.

Anthem titles

Country.anthem returns the first NationalAnthem, and Country.anthems retains the complete tuple.

>>> from pyworldatlas import Atlas
>>> atlas = Atlas()
>>> japan = atlas.country("Japan")
>>> (japan.anthem.title, japan.anthem.english_title)
('Kimigayo', 'His Majesty’s Reign')
>>> japan.anthem.source.id
'cia-world-factbook-2025'

Only titles and an optional source-provided English title are bundled. Lyrics, audio, contributor credits, and adoption histories are outside this release.

Reviewed mottos

Country.motto returns a reviewed NationalMotto when one is in the accepted source layer.

>>> brazil = atlas.country("Brazil")
>>> (brazil.motto.text, brazil.motto.english_text, brazil.motto.language_code)
('Ordem e Progresso', 'Order and Progress', 'pt')
>>> atlas.country("China").motto is None
True

Motto coverage is deliberately conservative. The model calls these source-listed national mottos and does not infer constitutional, statutory, traditional, or current legal status. Every captured Wikidata statement has an explicit include or exclude review decision.

Demonyms

English noun and adjective forms are preserved as printed by the source.

>>> (japan.demonym.noun, japan.demonym.adjective)
('Japanese (singular and plural)', 'Japanese')

Practical metadata

Currency, language, timezone, and postal records are typed objects rather than unlabelled strings.

>>> (japan.currency.code, japan.currency.name, japan.currency.symbol)
('JPY', 'Japanese Yen', '¥')
>>> japan.currency.minor_unit_digits
0
>>> [(language.code, language.name, language.script_code) for language in japan.languages]
[('ja', 'Japanese', 'Jpan')]
>>> japan.timezone_ids
('Asia/Tokyo',)
>>> (japan.postal_code.format, japan.postal_code.regex)
('###-####', '^\\d{3}-\\d{4}$')
>>> atlas.close()

Country.observed_timezones remains available for compatibility and lists zones observed on bundled cities. Country.timezones is the country-level timezone table added in 0.6, with January, July, and raw UTC offsets from the captured GeoNames file.

Coverage

Version 0.6 reference coverage

Field family

Profiles

Source boundary

Anthem titles

234 / 248

Structured Factbook field only

Reviewed mottos

32 / 248

Included item-valued Wikidata statements

English demonyms

227 / 248

Structured Factbook field only

Country timezone profiles

246 / 248

417 GeoNames timezone records

Postal-code formats

176 / 248

GeoNames display format and optional regular expression

Currency records

247 / 248

CLDR English name, symbol when available, and minor-unit digits

Country-language records

722 records across 245 profiles

CLDR names/scripts with IANA name fallback

Source inspection

Fact-bearing models expose a source object. It includes the stable source identifier, homepage, retrieval date, captured version, license information, and notes when available. Anthem, motto, and demonym records also keep the exact source locator used by the builder.

 1"""Inspect the typed reference facts attached to a country profile."""
 2
 3from pyworldatlas import Atlas
 4
 5
 6with Atlas() as atlas:
 7    japan = atlas.country("Japan")
 8
 9    print(japan.flag, japan.name, japan.name_in("ja"))
10    print(japan.anthem)
11    print(japan.demonym)
12    print(japan.currency)
13    print(japan.languages)
14    print(japan.timezones)
15    print(japan.postal_code)
16
17    # Every fact-bearing record keeps a source reference.
18    print(japan.anthem.source.name)
19    print(japan.currency.source.license_name)