pySpaceTrader is a Python-based SDK for the space trading game, SpaceTraders, where you can trade goods, explore space, and manage resources. This project is designed to provide a convenient way to access the game's API to play the game.
-
Clone the repository:
git clone https://github.com/chatterchats/pySpaceTraders.git
-
Navigate to the project directory:
cd pySpaceTraders -
Install poetry:
Poetry Install Documentation -
Install packages
poetry install
To utilize the SDK:
pip install pySpaceTradersfrom pySpaceTraders import SpaceTraderClient, FactionSymbol
client = SpaceTraderClient(
agent_symbol="NEWUSER",
agent_faction=FactionSymbol.COSMIC,
agent_email="",
log=True,
debug=True
)
player = client.my_agent()
>>> player
Agent(
symbol="NEWUSER",
headquarters="AA-BBBB-CC",
credits=175000,
startingFaction=<FactionSymbol.COSMIC: 'COSMIC'>,
shipCount=2,
accountId="abcdefghijklmnopqrstuvwxy"
)
>>> player.symbol
"NEWUSER"We welcome contributions! Please see our Contributing Guide for detailed instructions on how to get started.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
This project is licensed under the MIT License - see the LICENSE file for details.
For questions or suggestions, open an issue on GitHub.