Data Reference

Note

The following documents every data class modelled by the library and all its potential attributes, it will only have the attributes queried, attempting to access unqueried (and therefore non-existent) attributes will result in it raising an AttributeError or a KeyError depending on the context.

Alliance

class pnwkit.data.Alliance
accept_members: bool
acceptmem: bool
acronym: str
alliance_positions: List[AlliancePosition]
aluminum: Optional[float]
bankrecs: List[Bankrec]
bauxite: Optional[float]
coal: Optional[float]
color: str
date: datetime.datetime
flag: str
food: Optional[float]
gasoline: Optional[float]
id: int
iron: Optional[float]
lead: Optional[float]
money: Optional[float]
munitions: Optional[float]
name: str
nations: List[Nation]
oil: Optional[float]
received_treaties: List[Treaty]
score: float
sent_treaties: List[Treaty]
steel: Optional[float]
tax_brackets: List[TaxBracket]
taxrecs: Optional[List[Bankrec]]
treaties: List[Treaty]
uranium: Optional[float]

AlliancePosition

class pnwkit.data.AlliancePosition
accept_applicants: bool
alliance_id: int
change_permissions: bool
creator_id: int
date: datetime.datetime
date_modified: datetime.datetime
edit_alliance_info: bool
heir: bool
id: int
last_editor_id: int
leader: bool
manage_announcements: bool
manage_embargoes: bool
manage_market_share: bool
manage_treaties: bool
member: bool
name: str
officer: bool
permissions: int
position_level: int
post_announcements: bool
promote_self_to_leader: bool
remove_members: bool
see_reset_timers: bool
see_spies: bool
tax_brackets: bool
view_bank: bool
withdraw_bank: bool

AlliancePositionEnum

class pnwkit.data.AlliancePositionEnum(value)

An enumeration.

APPLICANT = 1
HEIR = 4
LEADER = 5
MEMBER = 2
NOALLIANCE = 0
OFFICER = 3

ApiKeyDetails

class pnwkit.data.ApiKeyDetails
key: str
max_requests: int
nation: Nation
requests: int

AttackType

class pnwkit.data.AttackType(value)

An enumeration.

AIRVAIR = 5
AIRVINFRA = 0
AIRVMONEY = 3
AIRVSHIPS = 4
AIRVSOLDIERS = 1
AIRVTANKS = 2
ALLIANCELOOT = 15
FORTIFY = 12
GROUND = 6
MISSILE = 7
MISSILEFAIL = 8
NAVAL = 11
NUKE = 9
NUKEFAIL = 10
PEACE = 13
VICTORY = 14

BBGame

class pnwkit.data.BBGame
away_id: int
away_nation: Nation
away_nation_id: int
away_score: int
away_team: BBTeam
date: datetime.datetime
highlights: str
home_id: int
home_nation: Nation
home_nation_id: int
home_revenue: float
home_score: int
home_team: BBTeam
id: int
open: int
sim_text: str
spoils: float
stadium_name: str
wager: float

BBPlayer

class pnwkit.data.BBPlayer
age: int
awareness: float
batting: float
birthday: int
date: datetime.datetime
id: int
name: str
nation: Nation
nation_id: int
overall: float
pitching: float
position: str
speed: float
team: BBTeam
team_id: int

BBTeam

class pnwkit.data.BBTeam
away_jersey: str
date: datetime.datetime
games: List[BBGame]
games_played: int
glosses: int
home_jersey: str
homers: int
id: int
name: str
nation: Nation
nation_id: int
players: List[BBPlayer]
quality: int
rating: float
runs: int
seating: int
stadium: str
strikeouts: int
wins: int

Bankrec

class pnwkit.data.Bankrec
aluminum: float
banker_id: int
bauxite: float
coal: float
date: datetime.datetime
food: float
gasoline: float
id: int
iron: float
lead: float
money: float
munitions: float
note: str
oil: float
pid: int
receiver_id: int
receiver_type: int
recipient_id: int
recipient_type: int
rid: int
rtype: int
sender_id: int
sender_type: int
sid: int
steel: float
stype: int
tax_id: int
uranium: float

Bounty

class pnwkit.data.Bounty
amount: int
date: datetime.datetime
id: int
nation: Nation
nation_id: int
type: BountyType

BountyType

class pnwkit.data.BountyType(value)

An enumeration.

ATTRITION = 1
NUCLEAR = 3
ORDINARY = 0
RAID = 2

City

class pnwkit.data.City
airforcebase: int
aluminum_refinery: int
aluminumrefinery: int
bank: int
barracks: int
bauxite_mine: int
bauxitemine: int
coal_mine: int
coal_power: int
coalmine: int
coalpower: int
date: datetime.datetime
drydock: int
factory: int
farm: int
gasrefinery: int
hangar: int
hospital: int
id: int
infrastructure: float
iron_mine: int
ironmine: int
land: float
lead_mine: int
leadmine: int
mall: int
munitions_factory: int
munitionsfactory: int
name: str
nation: Nation
nation_id: int
nuclear_power: int
nuclearpower: int
nuke_date: Optional[datetime.datetime]
nukedate: Optional[datetime.datetime]
oil_power: int
oil_refinery: int
oil_well: int
oilpower: int
oilwell: int
police_station: int
policestation: int
powered: bool
recycling_center: int
recyclingcenter: int
shopping_mall: int
stadium: int
steel_mill: int
steelmill: int
subway: int
supermarket: int
uramine: int
uranium_mine: int
wind_power: int
windpower: int

Color

class pnwkit.data.Color
bloc_name: str
color: str
turn_bonus: int

DomesticPolicy

class pnwkit.data.DomesticPolicy(value)

An enumeration.

IMPERIALISM = 4
MANIFEST_DESTINY = 1
OPEN_MARKETS = 2
RAPID_EXPANSION = 6
TECHNOLOGICAL_ADVANCEMENT = 3
URBANIZATION = 5

GameInfo

Attributes
class pnwkit.data.GameInfo
game_date: datetime.datetime
radiation: Radiation

Nation

Attributes
class pnwkit.data.Nation
adv_city_planning: bool
adv_engineering_corps: bool
advanced_engineering_corps: bool
advanced_urban_planning: bool
aircraft: int
aircraft_casualties: int
aircraft_kills: int
alliance: Alliance
alliance_id: int
alliance_position: AlliancePositionEnum
alliance_position_id: int
alliance_position_info: AlliancePosition
alliance_seniority: int
aluminum: Optional[float]
arable_land_agency: bool
arms_stockpile: bool
armss: bool
baseball_team: BBTeam
bauxite: Optional[float]
bauxite_works: bool
bauxitew: bool
beige_turns: int
beigeturns: int
bounties: List[Bounty]
center_for_civil_engineering: bool
central_intelligence_agency: bool
cfce: bool
cia: bool
cities: List[City]
city_planning: bool
clinical_research_center: bool
coal: Optional[float]
color: str
continent: str
date: datetime.datetime
defensive_wars: List[War]
discord: str
domestic_policy: DomesticPolicy
dompolicy: str
egr: bool
emergency_gasoline_reserve: bool
espionage_available: bool
flag: str
food: Optional[float]
gasoline: Optional[float]
government_support_agency: bool
green_tech: bool
green_technologies: bool
gross_domestic_product: float
gross_national_income: float
id: int
international_trade_center: bool
iron: Optional[float]
iron_dome: bool
iron_works: bool
irond: bool
ironw: bool
itc: bool
last_active: datetime.datetime
lead: Optional[float]
leader_name: str
mass_irrigation: bool
massirr: bool
missile_casualties: int
missile_kills: int
missile_launch_pad: bool
missiles: int
mlp: bool
money: Optional[float]
money_looted: float
moon_landing: bool
munitions: Optional[float]
nation_name: str
nrf: bool
nuclear_research_facility: bool
nuke_casualties: int
nuke_kills: int
nukes: int
num_cities: int
offensive_wars: List[War]
oil: Optional[float]
pirate_economy: bool
population: int
project_bits: int
projects: int
propaganda_bureau: bool
propb: bool
recycling_initiative: bool
research_and_development_center: bool
resource_production_center: bool
score: float
ship_casualties: int
ship_kills: int
ships: int
soldier_casualties: int
soldier_kills: int
soldiers: int
space_program: bool
specialized_police_training: bool
specialized_police_training_program: bool
spies: Optional[int]
spy_casualties: int
spy_kills: int
spy_satellite: bool
steel: Optional[float]
tank_casualties: int
tank_kills: int
tanks: int
tax_id: int
taxrecs: Optional[List[Bankrec]]
telecom_satellite: bool
telecommunications_satellite: bool
treasures: List[Treasure]
turns_since_last_city: int
turns_since_last_project: int
uap: bool
update_tz: Optional[float]
uranium: Optional[float]
uranium_enrichment_program: bool
urban_planning: bool
vacation_mode_turns: int
vds: bool
vital_defense_system: bool
vmode: int
war_policy: WarPolicy
warpolicy: str
wars: List[Bankrec]
wars_lost: int
wars_won: int

PaginatorInfo

class pnwkit.data.PaginatorInfo
count
currentPage
firstItem
hasMorePages
lastItem
lastPage
perPage
total

Radiation

class pnwkit.data.Radiation
africa: float
antarctica: float
asia: float
australia: float
europe: float
global_: float
north_america: float
south_america: float

TaxBracket

class pnwkit.data.TaxBracket
alliance: Alliance
alliance_id: int
bracket_name: str
date: datetime.datetime
date_modified: datetime.datetime
id: int
last_modifier: Nation
last_modifier_id: int
resource_tax_rate: int
tax_rate: int

Trade

class pnwkit.data.Trade
accepted: bool
buy_or_sell: str
date: datetime.datetime
date_accepted: datetime.datetime
id: int
offer_amount: int
offer_resource: str
original_trade_id: int
price: int
receiver: Nation
receiver_id: int
recipient_id: int
rid: int
sender: Nation
sender_id: int
sid: int
total: int
type: TradeType

TradeType

Attributes
class pnwkit.data.TradeType(value)

An enumeration.

ALLIANCE = 2
GLOBAL = 0
PERSONAL = 1

Tradeprice

class pnwkit.data.Tradeprice
aluminum: float
bauxite: float
coal: float
credits: float
date: datetime.datetime
food: float
gasoline: float
id: int
iron: float
lead: float
munitions: float
oil: float
steel: float
uranium: float

Treasure

class pnwkit.data.Treasure
bonus: int
color: str
continent: str
name: str
nation: Nation
nation_id: int
spawn_date: datetime.datetime
spawndate: datetime.datetime

Treaty

class pnwkit.data.Treaty
alliance1: Alliance
alliance1_id: int
alliance2: Alliance
alliance2_id: int
date: datetime.datetime
id: int
treaty_type: str
treaty_url: str
turns_left: int

War

class pnwkit.data.War
air_superiority: int
airsuperiority: int
att_aircraft_killed: int
att_alliance_id: int
att_alum_used: int
att_fortify: bool
att_gas_used: float
att_id: int
att_infra_destroyed: float
att_infra_destroyed_value: float
att_missiles_used: int
att_money_looted: float
att_mun_used: float
att_nukes_used: int
att_peace: bool
att_points: int
att_resistance: int
att_ships_killed: int
att_soldiers_killed: int
att_steel_used: int
att_tanks_killed: int
attacker: Nation
attacks: List[WarAttack]
attid: int
attpeace: bool
attpoints: int
date: datetime.datetime
def_aircraft_killed: int
def_alliance_id: int
def_alum_used: int
def_fortify: bool
def_gas_used: float
def_id: int
def_infra_destroyed: float
def_infra_destroyed_value: float
def_missiles_used: int
def_money_looted: float
def_mun_used: float
def_nukes_used: int
def_peace: bool
def_points: int
def_resistance: int
def_ships_killed: int
def_soldiers_killed: int
def_steel_used: int
def_tanks_killed: int
defender: Nation
defid: int
defpeace: bool
defpoints: int
ground_control: int
groundcontrol: int
id: int
naval_blockade: int
navalblockade: int
reason: str
turns_left: int
turnsleft: int
war_type: WarType
winner: int
winner_id: int

WarAttack

class pnwkit.data.WarAttack
aircraft_killed_by_tanks: int
att_gas_used: float
att_id: int
att_mun_used: float
attacker: Nation
attcas1: int
attcas2: int
attid: int
city_id: int
city_infra_before: float
cityid: int
date: datetime.datetime
def_gas_used: float
def_id: int
def_mun_used: float
defcas1: int
defcas2: int
defender: Nation
defid: int
id: int
improvements_lost: int
improvementslost: int
infra_destroyed: float
infra_destroyed_value: float
infradestroyed: float
loot_info: str
money_stolen: float
moneystolen: float
resistance_eliminated: int
success: int
type: AttackType
victor: int
war: War
war_id: int
warid: int

WarPolicy

class pnwkit.data.WarPolicy(value)

An enumeration.

ARCANE = 10
ATTRITION = 1
BLITZKRIEG = 3
COVERT = 9
FORTRESS = 4
GUARDIAN = 8
MONEYBAGS = 5
PIRATE = 6
TACTICIAN = 7
TURTLE = 2

WarType

Attributes
class pnwkit.data.WarType(value)

An enumeration.

ATTRITION = 1
ORDINARY = 0
RAID = 2