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, sending goods and troops
client.army Units, recruitment and the hospital
client.attack Sending attacks, 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
client.player, defense, ranking, events Players, castle defense, 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.43.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.43.0
File Size Uploaded
empire_core-0.43.0.tar.gz 1.1 MB Details

Built distribution (wheel)

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

Total release size: 1.6 MB

Release files / empire_core-0.43.0.tar.gz

Download URL empire_core-0.43.0.tar.gz
Size 1.1 MB
Tags Source
SHA-256 checksum
How to use checksums
00f2371b0edfec68e92b5df7aa677516e8dcd9dd36c5a208b7127a2ed8b9641c
BLAKE2b-256 checksum
How to use checksums
7fda0d7fb1bdb3a1e69a9cac29201e26ea680edaf6f0cc27a42d9b059ac51a9a
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 1, 2026.

Transparency log

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

Download URL empire_core-0.43.0-py3-none-any.whl
Size 544.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d09c64d38e6092c52775363e8e918d0cea7cc12d52dbe8ced4ac73e88e133884
BLAKE2b-256 checksum
How to use checksums
e05172e1e3ffff720b0c975e6f026a0c7702ee5c0efccdb334002b328d86c864
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 1, 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.43.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