Skip to main content

A python sdk for the SpaceTradersAPI game

Project description

New rewrite/repaste

Work in progress... Names may change a lot...

Most endpoints are already in, but you have to handle the data yourself (for now).

TODO

  • Data Classes (Pydantic or from a db scheme directly)
  • Database
  • Sdk Statekeeping

Code

Api usage:

from spacetraders_sdk.spacetraders_api import SpaceTradersApi

st = SpaceTradersApi()
status = st.status()

Documentation for API Endpoints

Class HTTP request Description Implemented
get / Status api
post /register Register New Agent api
Agents get /my/agent Fetch your agent's details. api
Agents get /agents List all Agents. api
Agents get /agents/{agent_symbol} Get Agent. api
Contracts get /my/contracts List all of your contracts. api
Contracts get /my/contracts/{contractId} Get the details of a contract by ID. api
Contracts post /my/contracts/{contractId}/accept Accept a contract. api
Contracts post /my/contracts/{contractId}/deliver Deliver cargo on a given contract. api
Contracts post /my/contracts/{contractId}/fulfill Fulfill a contract api
Factions get /factions List all discovered factions in the game. api
Factions get /factions/{factionSymbol} View the details of a faction. api
Fleet get /my/ships Retrieve all of your ships. api
Fleet post /my/ships Purchase a ship api
Fleet get /my/ships/{shipSymbol} Retrieve the details of your ship. api
Fleet get /my/ships/{shipSymbol}/cargo Retrieve the cargo of your ship. api
Fleet post /my/ships/{shipSymbol}/orbit Orbit Ship api
Fleet post /my/ships/{shipSymbol}/refine Ship Refine api
Fleet post /my/ships/{shipSymbol}/chart Create Chart api
Fleet get /my/ships/{shipSymbol}/cooldown Get Ship Cooldown api
Fleet post /my/ships/{shipSymbol}/dock Dock Ship api
Fleet post /my/ships/{shipSymbol}/survey Create Survey api
Fleet post /my/ships/{shipSymbol}/extract Extract Resources api
Fleet post /my/ships/{shipSymbol}/jettison Jettison Cargo api
Fleet post /my/ships/{shipSymbol}/jump Jump Ship api
Fleet post /my/ships/{shipSymbol}/navigate Navigate Ship api
Fleet post /my/ships/{shipSymbol}/negotiate/contract Negotiate Contract api
Fleet patch /my/ships/{shipSymbol}/nav Patch Ship Nav api
Fleet get /my/ships/{shipSymbol}/nav Get Ship Nav api
Fleet post /my/ships/{shipSymbol}/warp Warp Ship api
Fleet post /my/ships/{shipSymbol}/sell Sell Cargo api
Fleet post /my/ships/{shipSymbol}/scan/systems Scan Systems api
Fleet post /my/ships/{shipSymbol}/scan/waypoints Scan Waypoints api
Fleet post /my/ships/{shipSymbol}/scan/ships Scan Ships api
Fleet post /my/ships/{shipSymbol}/refuel Refuel Ship api
Fleet post /my/ships/{shipSymbol}/purchase Purchase Cargo api
Fleet post /my/ships/{shipSymbol}/transfer Transfer Cargo api
Fleet get /my/ships/{shipSymbol}/mounts Get the mounts on a ship. api
Fleet post /my/ships/{shipSymbol}/mounts Install a mount on a ship. api
Fleet post /my/ships/{shipSymbol}/mounts/remove Remove a mount from a ship. api
Systems get /systems List Systems api
Systems get /systems.json Get all systems. api
Systems get /systems/{systemSymbol} Get System api
Systems get /systems/{systemSymbol}/waypoints List Waypoints api
Systems get /systems/{systemSymbol}/waypoints/{waypointSymbol} Get Waypoint api
Systems get /systems/{systemSymbol}/waypoints/{waypointSymbol}/market Get Market api
Systems get /systems/{systemSymbol}/waypoints/{waypointSymbol}/shipyard Get Shipyard api
Systems get /systems/{systemSymbol}/waypoints/{waypointSymbol}/jump-gate Get Jump Gate api

api: 48/48

Completed Objects:

  • Agent
  • Chart
  • ConnectedSystem
  • Contract
  • Cooldown
  • Extraction
  • Faction
  • JumpGate
  • Market
  • ScannedShip
  • ScannedSystem
  • ScannedWaypoint
  • Ship
  • ShipCondition -> int
  • Shipyard
  • Survey
  • System
  • TradeSymbol
  • Waypoint

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

spacetraders_sdk-2.3.1.8.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spacetraders_sdk-2.3.1.8-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file spacetraders_sdk-2.3.1.8.tar.gz.

File metadata

  • Download URL: spacetraders_sdk-2.3.1.8.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.6.1 CPython/3.11.3 Windows/10

File hashes

Hashes for spacetraders_sdk-2.3.1.8.tar.gz
Algorithm Hash digest
SHA256 b21b9785619c64769a4efa469b3ff7933ac8f2b86692b3579af808c15a956a62
MD5 df43a623c363359fd3fc25e15c212aac
BLAKE2b-256 22f48fb7d034bf34430ca74c18cb25188aa32eaa83b2706bdd8f4a3cd25c564e

See more details on using hashes here.

File details

Details for the file spacetraders_sdk-2.3.1.8-py3-none-any.whl.

File metadata

File hashes

Hashes for spacetraders_sdk-2.3.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 c61b0d5bc21de7d39a34dfe7e5c4e11116aec0bd36dad5cf17384083152c75f5
MD5 3bc32c5e58fea7e5188c9fa40b2582a2
BLAKE2b-256 c8c0e4257e7b8b600baba98d021c7eabd63b5726c3ca19365f82b43627d59ba1

See more details on using hashes here.

Supported by

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