Skip to main content

EmpireCore

A fully typed Python client for Goodgame Empire.

PyPI Python versions CI Docs

A run of the quick start: logged in, one castle listed, and the Green kingdom's 8,862 castles scanned in 15.4 seconds

Why EmpireCore

  • Fully typed. Every request and reply is a pydantic model with readable field names, so your editor completes them and your type checker checks them.
  • Behaves like the real game client. Logins, requests and their checks follow the game's own client code, so the server sees what it expects.
  • Fast. One account scans the Green kingdom's roughly 8,900 castles in 15 to 17 seconds; split across 8 accounts, it takes 2.9 seconds.

What it covers

Service What it does
client.castle Castles, buildings, resources, horses, tax, sending goods and troops
client.army Units, recruitment and the hospital
client.attack Sending attacks, attack presets, and filling waves like the game does
client.commanders Commanders and castellans
client.skills Generals, abilities and skill trees
client.equipment The equipment inventory
client.spy Spy missions, sabotage and spy reports
client.map Kingdom scans and map lookups
client.movements Army movements, recalls and incoming attacks
client.alliance Chat, help requests, members and the treasury
client.messages The mailbox, mail and battle reports
client.defense Reading and setting castle defense
client.player, ranking, events Players, highscores and events

Install

uv add empire-core        # or: pip install empire-core

Python 3.10 or newer. EmpireCore is pre-1.0, so a minor release may change the API; the changelog lists every change that does.

Quick start

from empire_core import EmpireClient, Kingdom, MapItemType

with EmpireClient(username="you", password="...") as client:
    client.login()

    castles = client.castle.get_all()
    print(f"{len(castles)} castle(s)")

    scan = client.map.scan_kingdom(Kingdom.GREEN, item_types=[MapItemType.CASTLE])
    print(f"Green kingdom: {len(scan.items):,} castles")

Documentation: https://eschnitzler.github.io/EmpireCore/, with a guide for each part of the game and the full API reference.

Contributing

Contributions are welcome; see CONTRIBUTING.md. Bugs and feature requests are best filed as issues.

Contact

MIT licensed. Not affiliated with Goodgame Studios. For educational purposes only; use responsibly.

Metadata

Release files for empire-core 0.45.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 empire-core 0.45.0
File Size Uploaded
empire_core-0.45.0.tar.gz 1.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for empire-core 0.45.0
File Interpreter ABI Platform
empire_core-0.45.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.7 MB

Release files / empire_core-0.45.0.tar.gz

Download URL empire_core-0.45.0.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
a2c14a3a73268dd43c9462bb7d73bd71e22ccad2c2daec06ab0e7cd42d41fc82
BLAKE2b-256 checksum
How to use checksums
028f2756ddcdd6677fc9840e125903eed49d7851d63d763b5683c56659859ff0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 5, 2026.

Transparency log

Release files / empire_core-0.45.0-py3-none-any.whl

Download URL empire_core-0.45.0-py3-none-any.whl
Size 592.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dc3a0352522c890b634178e22c5430db626cac0d1dc780b7500d9d974b55a645
BLAKE2b-256 checksum
How to use checksums
143c74d1c18fb5139004a9aa0b3a28d455cad1361a014fafe39f417037df7d0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 5, 2026.

Transparency log

Release history Release notifications | RSS feed

0.54.0

2 release files

0.53.0

2 release files

0.52.0

2 release files

0.51.2

2 release files

This release

0.45.0 This release

2 release files

0.42.0

2 release files

0.41.0

2 release files

0.40.0

2 release files

0.39.0

2 release files

0.38.0

2 release files

0.37.0

2 release files

0.36.0

2 release files

0.35.3

2 release files

0.35.2

2 release files

0.35.1

2 release files

0.35.0

2 release files

0.33.0

2 release files

0.32.1

2 release files

0.32.0

2 release files

0.31.0

2 release files

0.30.3

2 release files

0.30.2

2 release files

0.30.1

2 release files

0.30.0

2 release files

0.29.0

2 release files

0.27.0

2 release files

0.26.0

2 release files

0.25.3

2 release files

0.25.2

2 release files

0.25.0

2 release files

0.24.2

2 release files

0.24.1

2 release files

0.24.0

2 release files

0.23.1

2 release files

0.22.1

2 release files

0.20.0

2 release files

0.19.2

2 release files

0.19.1

2 release files

0.19.0

2 release files

0.18.0

2 release files

0.17.1

2 release files

0.17.0

2 release files

0.16.0

2 release files

0.15.0

2 release files

0.14.0

2 release files

0.13.0

2 release files

0.12.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.3

2 release files

0.7.2

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.6

2 release files

0.6.5

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.5

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

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