atlaspi-client
Official Python client for the AtlasPI Historical Geography API — free, public, no-auth REST API with 862 historical entities, 490 events, 94 dynasty chains from 4500 BCE to 2024.
Install
pip install atlaspi-client
Quick start
from atlaspi import AtlasPI
client = AtlasPI() # defaults to https://atlaspi.it
# What was happening in 1250?
snapshot = client.snapshot(year=1250)
for period in snapshot["periods"]["items"]:
print(f"{period['name']} ({period['region']})")
# Find similar entities
similar = client.entities.similar(entity_id=1, limit=5)
for ent in similar["similar"]:
print(ent["name_original"], ent["similarity_score"])
# Events on a specific calendar day
today = client.events.on_this_day("07-14") # Bastille Day
for event in today["events"]:
print(f"{event['year']}: {event['name_original']}")
# Batch fetch (N entities in one round-trip)
batch = client.entities.batch([1, 2, 3, 42, 100])
print(f"Got {batch['found']} of {batch['requested']} entities")
# Full detail with all fields
entity = client.entities.get(1)
print(f"{entity['name_original']} ({entity['year_start']}-{entity['year_end']})")
print(f"Boundary: {entity['boundary_source']} ({entity['confidence_score']})")
Async support
import asyncio
from atlaspi import AsyncAtlasPI
async def main():
async with AsyncAtlasPI() as client:
snap = await client.snapshot(year=1500)
similar = await client.entities.similar(entity_id=1)
asyncio.run(main())
Key endpoints
The client mirrors AtlasPI's endpoint taxonomy:
client.entities.*— entities (list, get, batch, similar, periods, events, etc.)client.events.*— events (list, get, on_this_day, at_date, periods)client.periods.*— periods (list, get, by_slug, at_year)client.chains.*— dynasty chainsclient.cities.*— citiesclient.routes.*— trade routesclient.search.*— fuzzy + advanced searchclient.snapshot()— world snapshot at yearclient.stats()— aggregate statisticsclient.export.*— GeoJSON, CSV bulk export
See API docs for the full endpoint catalog.
License
Apache 2.0.
Source
Metadata
Release files for atlaspi-client 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| atlaspi_client-0.3.0.tar.gz | 11.4 kB | With provenance | Details for atlaspi_client-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| atlaspi_client-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for atlaspi_client-0.3.0-py3-none-any.whl |
Total release size: 22.2 kB
Release files / atlaspi_client-0.3.0.tar.gz
| Download URL | atlaspi_client-0.3.0.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2929b2f3b02e48108744add667b69b7471b5685d089e91845201b9036e42d9c5
|
|
BLAKE2b-256 checksum How to use checksums |
0a3479e6a09d335dfd4c80593620abbe812e8954f66d72b00d682b9f1df74115
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 4, 2026.
Transparency logRelease files / atlaspi_client-0.3.0-py3-none-any.whl
| Download URL | atlaspi_client-0.3.0-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
23e8fa9bd9fe7c63ab2499e76c315a680b04609f6c21ac1813a7e59318bd5951
|
|
BLAKE2b-256 checksum How to use checksums |
b7a7e77a73c62622d6ff81c0c4227e29991cc8d583bb628b52758290550abe58
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 4, 2026.
Transparency logSecurity for atlaspi-client 0.3.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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for atlaspi_client-0.3.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 Jul 4, 2026.
Transparency logA 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.