yuanpengwu / littlefield

Python SDK for the Littlefield simulation game

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

littlefield

Python SDK for the Littlefield simulation game

Demo

asciicast

Installation

pip install git+https://github.com/yi-jiayu/littlefield.git

Authentication

  1. Provide your Team ID and password directly when creating a Littlefield object:
from littlefield import Littlefield

lf = Littlefield('team_id', 'password')
  1. Use the LITTLEFIELD_TEAM_ID and LITTLEFIELD_PASSWORD environment variables:
# LITTLEFIELD_TEAM_ID=team_id
# LITTLEFIELD_PASSWORD=password

from littlefield import Littlefield

lf = Littlefield()

Examples

from littlefield import Littlefield

lf = Littlefield()  # get credentials from environment
print(lf.cash())
print(lf.orders.info())
print(lf.orders.job_arrivals())
print(lf.materials.info())
print(lf.materials.inventory())
print(lf.station1.info())
print(lf.station1.queue_size())
print(lf.completed_jobs.lead_times())

To-do

  • Automatically refresh session cookie
  • Edit factory settings

Docs

Coming soon!

About

Python SDK for the Littlefield simulation game

License:MIT License


Languages

Language:Python 66.0%Language:PowerShell 24.3%Language:Shell 9.7%