A typed, handwrited and powerful library for spacetraders.io game.
SpaceTraders is an API-based game where you acquire and manage a fleet of ships to explore, trade, and fight your way across the galaxy.
This client based on HTTPX and Pydantic.
pip install astrotraders
Currently, you can use API wrapper which represented by AstroTradersClient
class:
from astrotraders import AstroTradersClient
client = AstroTradersClient.set_up(
"token_here",
)
After initializing client you can use API resources, for example:
agent = client.agents.info()
systems = client.systems.list()
contracts = client.contracts.list()
factions = client.factions.list()
# you can use undocumented endpoints!
stats = client.server.stats()
universe = client.systems.all()
- "Game objects" with data caching and more pythonic usage
- CLI tool for manage fleet (and as example)