Skip to main content

An API wrapper for the SpaceTraders API game

Project description

pySpaceTraders

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.

Table of Contents

Local Installation

  1. Clone the repository:

    git clone https://github.com/chatterchats/pySpaceTraders.git
    
  2. Navigate to the project directory:

    cd pySpaceTraders
    
  3. Install poetry:
    Poetry Install Documentation

  4. Install packages

     poetry install
    

Usage

To utilize the SDK:

pip install pySpaceTraders
from 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"

Contributing

We welcome contributions! Please see our Contributing Guide for detailed instructions on how to get started.

Code of Conduct

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.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contact

For questions or suggestions, open an issue on GitHub.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyspacetraders-0.5.0.tar.gz (21.8 kB view details)

Uploaded Source

Built Distribution

pyspacetraders-0.5.0-py3-none-any.whl (23.6 kB view details)

Uploaded Python 3

File details

Details for the file pyspacetraders-0.5.0.tar.gz.

File metadata

  • Download URL: pyspacetraders-0.5.0.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Windows/11

File hashes

Hashes for pyspacetraders-0.5.0.tar.gz
Algorithm Hash digest
SHA256 ac93603c26dd4af16749657a37274c91c9f5ffb7ae8b3d6c8cf8dea4c36f6515
MD5 8754ab067fb85ac61f5a3ad52a1b995d
BLAKE2b-256 d3ee84fa6079a11cfbcf30d5c94f618e70470912df960eb37a4f6480d24546d6

See more details on using hashes here.

File details

Details for the file pyspacetraders-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: pyspacetraders-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 23.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Windows/11

File hashes

Hashes for pyspacetraders-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a4a9dc405e8f0f273b489ab5f537a0d01d53a89ee95c699461b15d62d02980dd
MD5 f0c027f964f8c2e82c959e6eda1b0b38
BLAKE2b-256 30d29bb4214ddf04ae4809bb2a8bdfd246adc4f6be5960e8f0396d2358e05bce

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page