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¶
Whether or not the alliance is accepting members
- acceptmem: bool¶
Whether or not the alliance is accepting memebers [deprecated]
- acronym: str¶
The alliance’s acronym
- alliance_positions: List[AlliancePosition]¶
All positions in the alliance
- aluminum: Optional[float]¶
How much aluminum the alliance has in its bank. This field will return null unless you are in this alliance and have access to view its bank.
- bankrecs: List[Bankrec]¶
List of the alliance’s bank records in the past 14 days. This field will not return alliance to alliance transactions unless you are in this alliance and have access to view its bank.
- bauxite: Optional[float]¶
How much bauxite the alliance has in its bank. This field will return null unless you are in this alliance and have access to view its bank.
- coal: Optional[float]¶
How much coal the alliance has in its bank. This field will return null unless you are in this alliance and have access to view its bank.
- color: str¶
The color bloc the alliance is on
- date: datetime.datetime¶
The date and time the alliance was founded
- discord_link: str¶
Link to the alliance’s Discord server
- flag: str¶
Link to the alliance’s flag in Politics and War
- food: Optional[float]¶
How much food the alliance has in its bank. This field will return null unless you are in this alliance and have access to view its bank.
- forum_link: str¶
Link to the alliance’s forum
- forumlink: str¶
Link to the alliance’s forum [deprecated]
- gasoline: Optional[float]¶
How much gasoline the alliance has in its bank. This field will return null unless you are in this alliance and have access to view its bank.
- id: int¶
The alliance’s id
- irclink: str¶
Link to the alliance’s Internet Relay Chat (IRC) [deprecated]
- iron: Optional[float]¶
How much iron the alliance has in its bank. This field will return null unless you are in this alliance and have access to view its bank.
- lead: Optional[float]¶
How much lead the alliance has in its bank. This field will return null unless you are in this alliance and have access to view its bank.
- money: Optional[float]¶
How much money the alliance has in its bank. This field will return null unless you are in this alliance and have access to view its bank.
- munitions: Optional[float]¶
How much munitions the alliance has in its bank. This field will return null unless you are in this alliance and have access to view its bank.
- name: str¶
The alliance’s name
- oil: Optional[float]¶
How much oil the alliance has in its bank. This field will return null unless you are in this alliance and have access to view its bank.
- score: float¶
The alliance’s current score
- steel: Optional[float]¶
How much steel the alliance has in its bank. This field will return null unless you are in this alliance and have access to view its bank.
- tax_brackets: Optional[List[TaxBracket]]¶
List of the alliance’s tax brackets. This field will return null unless you are an officer or higher in this alliance.
- taxrecs: Optional[List[Bankrec]]¶
List of the alliance’s tax records in the past 14 days. This field will return null unless you are in this alliance and have access to view its bank.
- uranium: Optional[float]¶
How much uranium the alliance has in its bank. This field will return null unless you are in this alliance and have access to view its bank.
- wiki_link: str¶
Link to the alliance’s wiki page
AlliancePosition¶
- accept_applicants
- alliance_id
- change_permissions
- creator_id
- date
- date_modified
- edit_alliance_info
- heir
- id
- last_editor_id
- leader
- manage_announcements
- manage_embargoes
- manage_market_share
- manage_treaties
- member
- name
- officer
- permissions
- position_level
- post_announcements
- promote_self_to_leader
- remove_members
- see_reset_timers
- see_spies
- tax_brackets
- view_bank
- withdraw_bank
- class pnwkit.data.AlliancePosition¶
- accept_applicants: bool¶
Whether or not nations with the position can accept applicants into the alliance
- alliance_id: int¶
ID of the alliance the position belongs to
- change_permissions: bool¶
Whether or not nations with the position can edit the permissions of other positions
- creator_id: int¶
The nation ID of the nation that created the position
- date: datetime.datetime¶
Date and time the position was created
- date_modified: datetime.datetime¶
Date and time the position was last modified
- edit_alliance_info: bool¶
Whether or not nations with the position can edit the alliance’s information (description, flag, links, etc.)
- heir: bool¶
Whether or not the position is the game’s default heir position
- id: int¶
ID of the position (0 = default applicant, 232 = default member, 231 = default officer, 230 = default heir, 229 = default leader)
- last_editor_id: int¶
The nation ID of the nation the last edited the position
- leader: bool¶
Whether or not the position is the game’s default leader position
- manage_announcements: bool¶
Whether or not nations with the position can manage announcements
- manage_embargoes: bool¶
Whether or not nations with the position can start and end embargoes
Whether or not nations with the position can view, propose, and cancel market sharing agreements
- manage_treaties: bool¶
Whether or not nations with the position can view, send, cancel, and reject treaties
- member: bool¶
Whether or not the position is the game’s default member position
- name: str¶
Name of the position
- officer: bool¶
Whether or not the position is the game’s default officer position
- permissions: int¶
Integer representation of the binary permissions (read right to left in the Alliance Positions table; checked = 1, unchecked = 0)
- position_level: int¶
Integer value corresponding to the position’s level (0-9; 3 = default member, 5 = default officer, 8 = default heir, 9 = default leader)
- post_announcements: bool¶
Whether or not nations with the position can post announcements
- promote_self_to_leader: bool¶
Whether or not nations with the position can promote themselves to leader
- remove_members: bool¶
Whether or not nations with the position can remove members from the alliance
- see_reset_timers: bool¶
Whether or not nations with the position can view military reset times of members
- see_spies: bool¶
Whether or not nations with the position can view spy counts of members
- tax_brackets: bool¶
Whether or not nations with the position can view and edit tax brackets
- view_bank: bool¶
Whether or not nations with the position can view the bank
- withdraw_bank: bool¶
Whether or not nations with the position can withdraw from the bank
AlliancePositionEnum¶
ApiKeyDetails¶
AttackType¶
BBGame¶
- class pnwkit.data.BBGame¶
- away_id: int¶
ID of the away team
- away_nation_id: int¶
ID of the nation visiting
- away_score: int¶
Number of runs scored by the away team
- date: datetime.datetime¶
Date and time that the game was played
- highlights: str¶
Entire HTML table of the game’s results
- home_id: int¶
ID of the home team
- home_nation_id: int¶
ID of the nation hosting the game
- home_revenue: float¶
Revenue made by the home team from their stadium
- home_score: int¶
Number of runs scored by the home team
- id: int¶
ID of the baseball game
- open: int¶
Whether the game is open (1) or not (0)
- sim_text: str¶
Seems to be just a string that states “Game simulated.”
- spoils: float¶
How much the winning team earned
- stadium_name: str¶
Name of the stadium the game was played in (the home stadium)
- wager: float¶
How much was wagered on the game
BBPlayer¶
- class pnwkit.data.BBPlayer¶
- age: int¶
The age of the player
- awareness: float¶
The player’s awareness
- batting: float¶
The player’s batting ability
- birthday: int¶
1 turn = 5 days for baseball players)
- Type
Days until the player’s next birthday (note
- date: datetime.datetime¶
Currently the date and time of the team’s founding, possibly meant to be the date and time the player was added to the team
- id: int¶
ID of the baseball player
- name: str¶
The name of the player
- nation_id: int¶
ID of the nation they belong to
- overall: float¶
The player’s overall performance (average of the player’s three relevant skills)
- pitching: float¶
The player’s pictching ability
- position: str¶
The players position
- speed: float¶
The player’s speed
- team_id: int¶
ID of the team they play for
BBTeam¶
- class pnwkit.data.BBTeam¶
- away_jersey: str¶
Link to the team’s away jersey
- date: datetime.datetime¶
Date and time the team was founded
- games_played: int¶
Number of games the team has played
- glosses: int¶
How many games the team has lost
- home_jersey: str¶
Link to the team’s home jersey
- homers: int¶
How many home runs the team has hit
- id: int¶
ID of the team
- logo: str¶
Link to the team’s logo
- name: str¶
Name of the team
- nation_id: int¶
ID of the nation the team belongs to
- quality: int¶
Quality level of the team’s home stadium
- rating: float¶
Average overall rating of the players on the team
- runs: int¶
How many runs the team has scored
- seating: int¶
Seating level of the team’s home stadium
- stadium: str¶
Name of the home stadium of the team
- strikeouts: int¶
How many times the team made opponents strike out
- wins: int¶
How many games the team has won
Bankrec¶
- class pnwkit.data.Bankrec¶
- aluminum: float¶
Aluminum sent in the transaction
- banker_id: int¶
ID of the banker
- bauxite: float¶
Bauxite sent in the transaction
- coal: float¶
Coal sent in the transaction
- date: datetime.datetime¶
Date and time of the record
- food: float¶
Food sent in the transaction
- gasoline: float¶
Gasoline sent in the transaction
- id: int¶
ID of the bank record
- iron: float¶
Iron sent in the transaction
- lead: float¶
Lead sent in the transaction
- money: float¶
Money sent in the transaction
- munitions: float¶
Munitions sent in the transaction
- note: str¶
Note attached to the bank record
- oil: float¶
Oil sent in the transaction
- pid: int¶
ID of the banker [deprecated]
- receiver_id: int¶
ID of the receiver (nation or alliance)
- receiver_type: int¶
Whether the receiver is a nation (1) or alliance (2)
- recipient_id: int¶
ID of the receiver (nation or alliance) [deprecated]
- recipient_type: int¶
Whether the receiver is a nation (1) or alliance (2) [deprecated]
- rid: int¶
ID of the receiver (nation or alliance) [deprecated]
- rtype: int¶
Whether the receiver is a nation (1) or alliance (2) [deprecated]
- sender_id: int¶
ID of the sender (nation or alliance)
- sender_type: int¶
Whether the sender is a nation (1) or alliance (2)
- sid: int¶
ID of the sender (nation or alliance) [deprecated]
- steel: float¶
Steel sent in the transaction
- stype: int¶
Whether the sender is a nation (1) or alliance (2) [deprecated]
- tax_id: int¶
Tax ID associated with the bank record (for tax records)
- uranium: float¶
Uranium sent in the transaction
Bounty¶
- class pnwkit.data.Bounty¶
- amount: int¶
Amount of the bounty
- date: datetime.datetime¶
Date and time the bounty was posted
- id: int¶
ID of the bounty
- nation_id: int¶
ID of the nation the bounty is on
- type: BountyType¶
An enumeration representing the bounty’s type (“ORDINARY”, “ATTRITION”, “RAID”, or “NUCLEAR”)
BountyType¶
City¶
- airforcebase
- aluminum_refinery
- aluminumrefinery
- bank
- barracks
- bauxite_mine
- bauxitemine
- coal_mine
- coal_power
- coalmine
- coalpower
- date
- drydock
- factory
- farm
- gasrefinery
- hangar
- hospital
- id
- infrastructure
- iron_mine
- ironmine
- land
- lead_mine
- leadmine
- mall
- munitions_factory
- munitionsfactory
- name
- nation
- nation_id
- nuclear_power
- nuclearpower
- nuke_date
- nukedate
- oil_power
- oil_refinery
- oil_well
- oilpower
- oilwell
- police_station
- policestation
- powered
- recycling_center
- recyclingcenter
- shopping_mall
- stadium
- steel_mill
- steelmill
- subway
- supermarket
- uramine
- uranium_mine
- wind_power
- windpower
- class pnwkit.data.City¶
- airforcebase: int¶
Number of hangars [deprecated]
- aluminum_refinery: int¶
Number of aluminum refineries
- aluminumrefinery: int¶
Number of aluminum refineries [deprecated]
- bank: int¶
Number of banks
- barracks: int¶
Number of barracks
- bauxite_mine: int¶
Number of bauxite mines
- bauxitemine: int¶
Number of bauxite mines [deprecated]
- coal_mine: int¶
Number of coal mines
- coal_power: int¶
Number of coal power plants
- coalmine: int¶
Number of coal mines [deprecated]
- coalpower: int¶
Number of coal power plants [deprecated]
- date: datetime.datetime¶
Date the city was founded
- drydock: int¶
Number of drydocks
- factory: int¶
Number of (tank) factories
- farm: int¶
Number of farms
- gasrefinery: int¶
Number of oil refineries [deprecated]
- hangar: int¶
Number of hangars
- hospital: int¶
Number of hospitals
- id: int¶
ID of the city
- infrastructure: float¶
Current infrastructure level in the city
- iron_mine: int¶
Number of iron mines
- ironmine: int¶
Number of iron mines [deprecated]
- land: float¶
Current land level in the city
- lead_mine: int¶
Number of lead mines
- leadmine: int¶
Number of lead mines [deprecated]
- mall: int¶
Number of shopping malls [deprecated]
- munitions_factory: int¶
Number of munitions factories
- munitionsfactory: int¶
Number of munitions factories [deprecated]
- name: str¶
Name of the city
- nation_id: int¶
ID of the nation the city is in
- nuclear_power: int¶
Number of nuclear power plants
- nuclearpower: int¶
Number of nuclear power plants [deprecated]
- nuke_date: Optional[datetime.datetime]¶
Date the city was last nuked
- nukedate: Optional[datetime.datetime]¶
Date the city was last nuked [deprecated]
- oil_power: int¶
Number of oil power plants
- oil_refinery: int¶
Number of oil refineries
- oil_well: int¶
Number of oil wells
- oilpower: int¶
Number of oil power plants [deprecated]
- oilwell: int¶
Number of oil wells [deprecated]
- police_station: int¶
Number of police stations
- policestation: int¶
Number of police stations [deprecated]
- powered: bool¶
Whether or not the city is powered
- recycling_center: int¶
Number of recycling centers
- recyclingcenter: int¶
Number of recycling centers [deprecated]
- shopping_mall: int¶
Number of shopping malls
- stadium: int¶
Number of stadiums
- steel_mill: int¶
Number of steel mills
- steelmill: int¶
Number of steel mills [deprecated]
- subway: int¶
Number of subways
- supermarket: int¶
Number of supermarkets
- uramine: int¶
Number of uranium mines [deprecated]
- uranium_mine: int¶
Number of uranium mines
- wind_power: int¶
Number of wind power plants
- windpower: int¶
Number of wind power plants [deprecated]
Color¶
DomesticPolicy¶
GameInfo¶
Nation¶
- adv_city_planning
- adv_engineering_corps
- advanced_engineering_corps
- advanced_urban_planning
- aircraft
- aircraft_casualties
- aircraft_kills
- alliance
- alliance_id
- alliance_position
- alliance_position_id
- alliance_position_info
- alliance_seniority
- aluminum
- arable_land_agency
- arms_stockpile
- armss
- baseball_team
- bauxite
- bauxite_works
- bauxitew
- beige_turns
- beigeturns
- bounties
- center_for_civil_engineering
- central_intelligence_agency
- cfce
- cia
- cities
- city_planning
- clinical_research_center
- coal
- color
- continent
- credits
- date
- defensive_wars
- discord
- domestic_policy
- dompolicy
- egr
- emergency_gasoline_reserve
- espionage_available
- fallout_shelter
- flag
- food
- gasoline
- government_support_agency
- green_tech
- green_technologies
- gross_domestic_product
- gross_national_income
- id
- international_trade_center
- iron
- iron_dome
- iron_works
- irond
- ironw
- itc
- last_active
- lead
- leader_name
- mass_irrigation
- massirr
- metropolitan_planning
- military_salvage
- missile_casualties
- missile_kills
- missile_launch_pad
- missiles
- mlp
- money
- money_looted
- moon_landing
- munitions
- nation_name
- nrf
- nuclear_research_facility
- nuke_casualties
- nuke_kills
- nukes
- num_cities
- offensive_wars
- oil
- pirate_economy
- population
- project_bits
- projects
- propaganda_bureau
- propb
- recycling_initiative
- research_and_development_center
- resource_production_center
- score
- ship_casualties
- ship_kills
- ships
- soldier_casualties
- soldier_kills
- soldiers
- space_program
- specialized_police_training
- specialized_police_training_program
- spies
- spy_casualties
- spy_kills
- spy_satellite
- steel
- tank_casualties
- tank_kills
- tanks
- tax_id
- taxrecs
- telecom_satellite
- telecommunications_satellite
- treasures
- turns_since_last_city
- turns_since_last_project
- uap
- update_tz
- uranium
- uranium_enrichment_program
- urban_planning
- vacation_mode_turns
- vds
- vital_defense_system
- vmode
- war_policy
- warpolicy
- wars
- wars_lost
- wars_won
- class pnwkit.data.Nation¶
- adv_city_planning: bool¶
Whether or not the nation has the Advanced Urban Planning project [deprecated]
- adv_engineering_corps: bool¶
Whether or not the nation has the Advanced Engineering Corps project [deprecated]
- advanced_engineering_corps: bool¶
Whether or not the nation has the Advanced Engineering Corps project
- advanced_urban_planning: bool¶
Whether or not the nation has the Advanced Urban Planning project
- aircraft: int¶
Number of aircraft the nation has
- aircraft_casualties: int¶
How many aircraft the nation has lost
- aircraft_kills: int¶
How many aircraft the nation has killed
- alliance_id: int¶
ID of the alliance the nation is currently in (returns 0 if None)
- alliance_position: AlliancePositionEnum¶
Enumeration representing the position of the nation in their alliance (“NOALLIANCE”, “APPLICANT”, “MEMBER”, “OFFICER”, “HEIR”, or “LEADER”)
- alliance_position_id: int¶
ID of the nation’s position in their alliance
- alliance_position_info: AlliancePosition¶
The nation’s alliance position
- alliance_seniority: int¶
How many days the nation has been in their alliance
- aluminum: Optional[float]¶
Amount of aluminum currently held by the nation. This field will return null unless you are an officer or higher in the same alliance as this nation, and this nation allows alliance bank access or you are this nation
- arable_land_agency: bool¶
Whether or not the nation has the Arable Land Agency project
- arms_stockpile: bool¶
Whether or not the nation has the Arms Stockpile project
- armss: bool¶
Whether or not the nation has the Arms Stockpile project [deprecated]
- bauxite: Optional[float]¶
Amount of bauxite currently held by the nation. This field will return null unless you are an officer or higher in the same alliance as this nation, and this nation allows alliance bank access or you are this nation
- bauxite_works: bool¶
Whether or not the nation has the Bauxiteworks project
- bauxitew: bool¶
Whether or not the nation has the Bauxiteworks project [deprecated]
- beige_turns: int¶
Number of turns the nation has left in beige
- beigeturns: int¶
Number of turns the nation has left in beige [deprecated]
- center_for_civil_engineering: bool¶
Whether or not the nation has the Center for Civil Engineering project
- central_intelligence_agency: bool¶
Whether or not the nation has the Central Intelligence Agency project
- cfce: bool¶
Whether or not the nation has the Center for Civil Engineering project [deprecated]
- cia: bool¶
Whether or not the nation has the Central Intelligence Agency project [deprecated]
- city_planning: bool¶
Whether or not the nation has the Urban Planning project [deprecated]
- clinical_research_center: bool¶
Whether or not the nation has the Clinical Research Center project
- coal: Optional[float]¶
Amount of coal currently held by the nation. This field will return null unless you are an officer or higher in the same alliance as this nation, and this nation allows alliance bank access or you are this nation
- color: str¶
The color the nation is on (“white”, “green”, etc.)
- continent: str¶
Abbreviation/acronym for the continent the nation is on (“na” for North America, “sa” for South America, “as” for Asia, “an” for Antarctica, “eu” for Europe, “af” for Africa, “au” for Australia)
- credits: Optional[int]¶
Number of credits currently held by the nation. This field will return null unless you are an officer or higher in the same alliance as this nation, and this nation allows alliance bank access or you are this nation
- date: datetime.datetime¶
The date and time that the nation was founded
- defensive_wars: List[War]¶
List of defensive wars the nation has been involved in within the past 14 days [deprecated]
- discord: str¶
The Discord username of the nation
- domestic_policy: DomesticPolicy¶
Enumeration representing the domestic policy the nation is currently on (“MANIFEST_DESTINY”, “OPEN_MARKETS”, “TECHNOLOGICAL_ADVANCEMENT”, “IMPERIALISM”, “URBANIZATION”, or “RAPID_EXPANSION”)
- dompolicy: str¶
The domestic policy the nation is on [deprecated]
- egr: bool¶
Whether or not the nation has the Emergency Gasoline Reserve project [deprecated]
- emergency_gasoline_reserve: bool¶
Whether or not the nation has the Emergency Gasoline Reserve project
- espionage_available: bool¶
Whether or not the nation can have an espionage operation performed on them
- fallout_shelter: bool¶
Whether or not the nation has the Fallout Shelter project
- flag: str¶
Link to the nation’s flag in-game
- food: Optional[float]¶
Amount of food currently held by the nation. This field will return null unless you are an officer or higher in the same alliance as this nation, and this nation allows alliance bank access or you are this nation
- gasoline: Optional[float]¶
Amount of gasoline currently held by the nation. This field will return null unless you are an officer or higher in the same alliance as this nation, and this nation allows alliance bank access or you are this nation
- government_support_agency: bool¶
Whether or not the nation has the Government Support Agency project
- green_tech: bool¶
Whether or not the nation has the Green Technologies project [deprecated]
- green_technologies: bool¶
Whether or not the nation has the Green Technologies project
- gross_domestic_product: float¶
Gross Domestic Product (GDP) of the nation
- gross_national_income: float¶
Gross National Income (GNI) of the nation
- id: int¶
ID of the nation
- international_trade_center: bool¶
Whether or not the nation has the International Trade Center project
- iron: Optional[float]¶
Amount of iron currently held by the nation. This field will return null unless you are an officer or higher in the same alliance as this nation, and this nation allows alliance bank access or you are this nation
- iron_dome: bool¶
Whether or not the nation has the Iron Dome project
- iron_works: bool¶
Whether or not the nation has the Ironworks project
- irond: bool¶
Whether or not the nation has the Iron Dome project [deprecated]
- ironw: bool¶
Whether or not the nation has the Ironworks project [deprecated]
- itc: bool¶
Whether or not the nation has the International Trade Center project [deprecated]
- last_active: datetime.datetime¶
The date and time that the nation was last active
- lead: Optional[float]¶
Amount of lead currently held by the nation. This field will return null unless you are an officer or higher in the same alliance as this nation, and this nation allows alliance bank access or you are this nation
- leader_name: str¶
Name of the nation’s leader
- mass_irrigation: bool¶
Whether or not the nation has the Mass Irrigation project
- massirr: bool¶
Whether or not the nation has the Mass Irrigation project [deprecated]
- metropolitan_planning: bool¶
Whether or not the nation has the Metropolitan Planning project
- military_salvage: bool¶
Whether or not the nation has the Military Salvage project
- missile_casualties: int¶
How many missiles the nation has launched
- missile_kills: int¶
How many missiles the nation has eaten/received
- missile_launch_pad: bool¶
Whether or not the nation has the Missile Launch Pad project
- missiles: int¶
Number of missiles the nation has
- mlp: bool¶
Whether or not the nation has the Missile Launch Pad project [deprecated]
- money: Optional[float]¶
Amount of money currently held by the nation. This field will return null unless you are an officer or higher in the same alliance as this nation, and this nation allows alliance bank access or you are this nation
- money_looted: float¶
How much money the nation has looted across all wars
- moon_landing: bool¶
Whether or not the nation has the Moon Landing project
- munitions: Optional[float]¶
Amount of munitions currently held by the nation. This field will return null unless you are an officer or higher in the same alliance as this nation, and this nation allows alliance bank access or you are this nation
- nation_name: str¶
Name of the nation
- nrf: bool¶
Whether or not the nation has the Nuclear Research Facility project [deprecated]
- nuclear_research_facility: bool¶
Whether or not the nation has the Nuclear Research Facility project
- nuke_casualties: int¶
How many nukes the nation has launched
- nuke_kills: int¶
How many nukes the nation has eaten/received
- nukes: int¶
Number of nukes the nation has
- num_cities: int¶
Number of cities the nation has
- offensive_wars: List[War]¶
List of offensive wars the nation has been involved in within the past 14 days [deprecated]
- oil: Optional[float]¶
Amount of oil currently held by the nation. This field will return null unless you are an officer or higher in the same alliance as this nation, and this nation allows alliance bank access or you are this nation
- pirate_economy: bool¶
Whether or not the nation has the Pirate Economy project
- population: int¶
Population of the nation
- project_bits: int¶
Ironworks, Bauxiteworks, Arms Stockpile, Emergency Gasoline Reserve, Mass Irrigation, International Trade Center, Missile Launch Pad, Nuclear Research Facility, Iron Dome, Vital Defense System, Central Intelligence Agency, Center for Civil Engineering, Propaganda Bureau, Uranium Enrichment Program, Urban Planning, Advanced Urban Planning, Space Program, Spy Satellite, Moon Landing, Pirate Economy, Recycling Initiative, Telecommunications Satellite, Green Technologies, Arable Land Agency, Clinical Research Center, Specialized Police Training Program, Advanced Engineering Corps, Government Support Agency, Research and Development Center, Resource Production Center, Metropolitan Planning, Military Salvage, Fallout Shelter
- Type
Integer representing the binary string of projects the nation has in this order (note
- Type
binary is read right to left, so if the nation has ironworks it will be a 1 at the rightmost bit)
- projects: int¶
Number of projects the nation has
- propaganda_bureau: bool¶
Whether or not the nation has the Propaganda Bureau project
- propb: bool¶
Whether or not the nation has the Propaganda Bureau project [deprecated]
- recycling_initiative: bool¶
Whether or not the nation has the Recycling Initiative project
- research_and_development_center: bool¶
Whether or not the nation has the Research and Development Center project
- resource_production_center: bool¶
Whether or not the nation has the Resource Production Center project
- score: float¶
The nation’s score
- ship_casualties: int¶
How many ships the nation has lost
- ship_kills: int¶
How many ships the nation has killed
- ships: int¶
Number of ships the nation has
- soldier_casualties: int¶
How many soldiers the nation has lost
- soldier_kills: int¶
How many soldiers the nation has killed
- soldiers: int¶
Number of soldiers the nation has
- space_program: bool¶
Whether or not the nation has the Space Program project
- specialized_police_training: bool¶
Whether or not the nation has the Specialized Police Training Program project [deprecated]
- specialized_police_training_program: bool¶
Whether or not the nation has the Specialized Police Training Program project
- spies: Optional[int]¶
Number of spies the nation has. This field will return null unless you are an officer or higher in the same alliance as this nation and this nation allows alliance bank access or you are this nation
- spy_casualties: int¶
How many spies the nation has lost
- spy_kills: int¶
How many spies the nation has killed
- spy_satellite: bool¶
Whether or not the nation has the Spy Satellite project
- steel: Optional[float]¶
Amount of steel currently held by the nation. This field will return null unless you are an officer or higher in the same alliance as this nation, and this nation allows alliance bank access or you are this nation
- tank_casualties: int¶
How many tanks the nation has lost
- tank_kills: int¶
How many tanks he nation has killed
- tanks: int¶
Number of tanks the nation has
- tax_id: int¶
The nation’s tax ID
- taxrecs: Optional[List[Bankrec]]¶
List of the nation’s tax records within the last 14 days. This field will return null unless you are an officer or higher in the same alliance as this nation, and this nation allows alliance bank access or you are this nation
- telecom_satellite: bool¶
Whether or not the nation has the Telecommunications Satellite project [deprecated]
- telecommunications_satellite: bool¶
Whether or not the nation has the Telecommunications Satellite
- turns_since_last_city: int¶
Number of turns since the nation has last purchased a city
- turns_since_last_project: int¶
Number of turns sine the nation has last purchased a project
- uap: bool¶
Whether or not the nation has the Uranium Enrichment Program project [deprecated]
- update_tz: Optional[float]¶
The nation’s update timezone. This field will return null unless you are an officer or higher in the same alliance as this nation and this nation allows alliance bank access or you are this nation.
- uranium: Optional[float]¶
Amount of uranium currently held by the nation. This field will return null unless you are an officer or higher in the same alliance as this nation, and this nation allows alliance bank access or you are this nation
- uranium_enrichment_program: bool¶
Whether or not the nation has the Uranium Enrichment Program project
- urban_planning: bool¶
Whether or not the nation has the Urban Planning project
- vacation_mode_turns: int¶
Number of turns the nation has left in vacation mode
- vds: bool¶
Whether or not the nation has the Vital Defense System project [deprecated]
- vital_defense_system: bool¶
Whether or not the nation has the Vital Defense System project
- vmode: int¶
Number of turns the nation has left in vacation mode [deprecated]
- war_policy: WarPolicy¶
Enumeration representing the war policy the nation is currently on (“ATTRITION”, “TURTLE”, “BLITZKRIEG”, “FORTRESS”, “MONEYBAGS”, “PIRATE”, “TACTICIAN”, “GUARDIAN”, “COVERT”, or “ARCANE”)
- warpolicy: str¶
The war policy the nation is on [deprecated]
- wars_lost: int¶
How many wars the nation has lost
- wars_won: int¶
How many wars the nation has won
PaginatorInfo¶
Radiation¶
- class pnwkit.data.Radiation¶
- africa: float¶
Radiation levels in Africa
- antarctica: float¶
Radiation levels in Antarctica
- asia: float¶
Radiation levels in Asia
- australia: float¶
Radiation levels in Australia
- europe: float¶
Radiation levels in Europe
- global_: float¶
Global radiation levels
- north_america: float¶
Radiation levels in North America
- south_america: float¶
Radiation levels in South America
TaxBracket¶
- class pnwkit.data.TaxBracket¶
-
- alliance_id: int¶
ID of the alliance the tax bracket belongs to
- bracket_name: str¶
Name of the tax bracket
- date: datetime.datetime¶
The date and time the tax bracket was created
- date_modified: datetime.datetime¶
The date and time the tax bracket was last modified
- id: int¶
ID of the tax bracket
- last_modifier_id: int¶
ID of the nation that last modified the tax bracket
- resource_tax_rate: int¶
Rate at which resources are taxed on the tax bracket
- tax_rate: int¶
Rate at which money is taxed on the tax bracket
Trade¶
- class pnwkit.data.Trade¶
- accepted: bool¶
Whether or not the offer has been accepted
- buy_or_sell: str¶
Whether the offer is a buy offer or a sell offer (“buy” or “sell”)
- date: datetime.datetime¶
Date and time the trade was posted
- date_accepted: datetime.datetime¶
Date and time the offer was accepted
- id: int¶
ID of the trade
- offer_amount: int¶
Amount of the resource being sold/bought
- offer_resource: str¶
Which resource the offer is for
- original_trade_id: int¶
ID of the trade before it was accepted
- price: int¶
Price per unit (PPU) that the resource is being sold/bought for
- receiver_id: int¶
ID of the nation buying
- recipient_id: int¶
ID of the nation buying [deprecated]
- rid: int¶
ID of the nation buying [deprecated]
- sender_id: int¶
ID of the nation selling
- sid: int¶
ID of the nation selling [deprecated]
- total: int¶
Price per unit (PPU) that the resource is being sold/bought for [deprecated]
TradeType¶
Tradeprice¶
- class pnwkit.data.Tradeprice¶
- aluminum: float¶
Average price of aluminum
- bauxite: float¶
Average price of bauxite
- coal: float¶
Average price of coal
- credits: float¶
Average price of credits
- date: datetime.datetime¶
Date the data was pulled (generally once a day)
- food: float¶
Average price of food
- gasoline: float¶
Average price of gasoline
- id: int¶
ID of the trade price data
- iron: float¶
Average price of iron
- lead: float¶
Average price of lead
- munitions: float¶
Average price of munitions
- oil: float¶
Average price of oil
- steel: float¶
Average price of steel
- uranium: float¶
Average price of uranium
Treasure¶
- class pnwkit.data.Treasure¶
- bonus: int¶
Bonus provided by the treasure to the nation holding it
- color: str¶
What color bloc the treasure spawns on
- continent: str¶
What continent the treasure spawns on
- name: str¶
Name of the treasure
- nation_id: int¶
ID of the nation currently holding the treasure
- spawn_date: datetime.datetime¶
The date the treasure spawned in
- spawndate: datetime.datetime¶
The date the treasure spawned in [deprecated]
Treaty¶
- class pnwkit.data.Treaty¶
-
- alliance1_id: int¶
ID of the alliance sending the treaty
- alliance2_id: int¶
ID of the alliance receiving the treaty
- date: datetime.datetime¶
Date and time the treaty was accepted
- id: int¶
ID of the treaty
- treaty_type: str¶
What type of treaty it is (MDP, ODP, protectorate etc.)
- treaty_url: str¶
Link to the treaty if provided
- turns_left: int¶
Number of turns the treaty has left until it expires
War¶
- air_superiority
- airsuperiority
- att_aircraft_killed
- att_alliance_id
- att_alum_used
- att_fortify
- att_gas_used
- att_id
- att_infra_destroyed
- att_infra_destroyed_value
- att_missiles_used
- att_money_looted
- att_mun_used
- att_nukes_used
- att_peace
- att_points
- att_resistance
- att_ships_killed
- att_soldiers_killed
- att_steel_used
- att_tanks_killed
- attacker
- attacks
- attid
- attpeace
- attpoints
- date
- def_aircraft_killed
- def_alliance_id
- def_alum_used
- def_fortify
- def_gas_used
- def_id
- def_infra_destroyed
- def_infra_destroyed_value
- def_missiles_used
- def_money_looted
- def_mun_used
- def_nukes_used
- def_peace
- def_points
- def_resistance
- def_ships_killed
- def_soldiers_killed
- def_steel_used
- def_tanks_killed
- defender
- defid
- defpeace
- defpoints
- ground_control
- groundcontrol
- id
- naval_blockade
- navalblockade
- reason
- turns_left
- turnsleft
- war_type
- winner
- winner_id
- class pnwkit.data.War¶
- air_superiority: int¶
ID of the nation that currently has air superiority (0 if neither)
- airsuperiority: int¶
ID of the nation that currently has air superiority (0 if neither) [deprecated]
- att_aircraft_killed: int¶
How many aircraft the attacker has destroyed
- att_alliance_id: int¶
ID of the alliance the attacking nation belongs to
- att_alum_used: int¶
How much aluminum the attacker has used
- att_fortify: bool¶
Whether or not the attacker has fortified
- att_gas_used: float¶
How much gasoline the attacker has used
- att_id: int¶
ID of the attacking nation
- att_infra_destroyed: float¶
How much infrastructure the attacker has destroyed
- att_infra_destroyed_value: float¶
The value of infrastructure destroyed by the attacker
- att_missiles_used: int¶
How many missiles the attacker has launched
- att_money_looted: float¶
How much money the attacker has looted
- att_mun_used: float¶
How many munitions the attacker has used
- att_nukes_used: int¶
How many nukes the attacker has launched
- att_peace: bool¶
Whether or not the attacker is offering peace
- att_points: int¶
How many Military Action Points (MAPs) the attacker has
- att_resistance: int¶
Remaining attacker resistance
- att_ships_killed: int¶
How many ships the attacker has destroyed
- att_soldiers_killed: int¶
How many soldiers the attacker has killed
- att_steel_used: int¶
How much steel the attacker has used
- att_tanks_killed: int¶
How many tanks the attacker has destroyed
- attid: int¶
ID of the attacking nation [deprecated]
- attpeace: bool¶
Whether or not the attacker is offering peace [deprecated]
- attpoints: int¶
How many Military Action Points (MAPs) the attacker has [deprecated]
- date: datetime.datetime¶
Date and time the war was declared
- def_aircraft_killed: int¶
How many aircraft the defender has destroyed
- def_alliance_id: int¶
ID of the alliance the defending nation belongs to
- def_alum_used: int¶
How much aluminum the defender has used
- def_fortify: bool¶
Whether or not the defender has fortified
- def_gas_used: float¶
How much gasoline the defender has used
- def_id: int¶
ID of the defending nation
- def_infra_destroyed: float¶
How much infrastructure the defender has destroyed
- def_infra_destroyed_value: float¶
The value of infrastructure destroyed by the defender
- def_missiles_used: int¶
How many missiles the defender has launched
- def_money_looted: float¶
How much money the defender has looted
- def_mun_used: float¶
How many munitions the defender has used
- def_nukes_used: int¶
How many nukes the defender has launched
- def_peace: bool¶
Whether or not the defender is offering peace
- def_points: int¶
How many Military Action Points (MAPs) the defender has
- def_resistance: int¶
Remaining defender resistance
- def_ships_killed: int¶
How many ships the defender has destroyed
- def_soldiers_killed: int¶
How many soldiers the defender has killed
- def_steel_used: int¶
How much steel the defender has used
- def_tanks_killed: int¶
How many tanks the defender has destroyed
- defid: int¶
ID of the defending nation [deprecated]
- defpeace: bool¶
Whether or not the defender is offering peace [deprecated]
- defpoints: int¶
How many Military Action Points (MAPs) the defender has [deprecated]
- ground_control: int¶
ID of the nation that currently has ground control (0 if neither)
- groundcontrol: int¶
ID of the nation that currently has ground control (0 if neither) [deprecated]
- id: int¶
ID of the war
ID of the nation that currently has the other blockaded (0 if neither)
ID of the nation that currently has the other blockaded (0 if neither) [deprecated]
- reason: str¶
Reason given for the war
- turns_left: int¶
How many turns are left until the war expires
- turnsleft: int¶
How many turns are left until the war expires [deprecated]
- winner: int¶
ID of the nation that won the war (0 if neither due to peace or expiration) [deprecated]
- winner_id: int¶
ID of the nation that won the war (0 if neither due to peace or expiration)
WarAttack¶
- aircraft_killed_by_tanks
- att_gas_used
- att_id
- att_mun_used
- attacker
- attcas1
- attcas2
- attid
- city_id
- city_infra_before
- cityid
- date
- def_gas_used
- def_id
- def_mun_used
- defcas1
- defcas2
- defender
- defid
- id
- improvements_lost
- improvementslost
- infra_destroyed
- infra_destroyed_value
- infradestroyed
- loot_info
- money_stolen
- moneystolen
- resistance_eliminated
- success
- type
- victor
- war
- war_id
- warid
- class pnwkit.data.WarAttack¶
- aircraft_killed_by_tanks: int¶
How many aircraft the attacker destroyed in the attack using tanks (only applies to ground attacks when the attacker has ground control, otherwise 0)
- att_gas_used: float¶
How much gasoline the attacker used in the attack
- att_id: int¶
ID of the nation performing the attack
- att_mun_used: float¶
How many munitions the attacker used in the attack
- attcas1: int¶
Number of main units lost by the attacker (soldiers if ground attack, planes if airstrike, ships if naval attack)
- attcas2: int¶
Number of secondary units lost by the attacker (only used for tanks in ground attacks)
- attid: int¶
ID of the nation performing the attack [deprecated]
- city_id: int¶
ID of the city the attack affected
- city_infra_before: float¶
How much infrastructure was in the city prior to the attack
- cityid: int¶
ID of the city the attack affected [deprecated]
- date: datetime.datetime¶
Date and time of the attack
- def_gas_used: float¶
How much gasoline the defender used in the attack
- def_id: int¶
ID of the nation the attack was against
- def_mun_used: float¶
How many munitions the defender used in the attack
- defcas1: int¶
Number of main units lost by the defender (soldiers if ground attack, planes if airstrike, ships if naval attack)
- defcas2: int¶
Number of secondary units lost by the defender (only used for tanks in ground attacks or units targeted by an airstrike)
- defid: int¶
ID of the nation the attack was against [deprecated]
- id: int¶
ID of the attack
- improvements_lost: int¶
Number of improvements destroyed in the attack (0-2)
- improvementslost: int¶
Number of improvements destroyed in the attack (0-2) [deprecated]
- infra_destroyed: float¶
Infrastrucutre destroyed in the affected city
- infra_destroyed_value: float¶
Value of infrastructure destroyed in the attack
- infradestroyed: float¶
Infrastrucutre destroyed in the affected city [deprecated]
- loot_info: str¶
contains “r” and “n” for HTML formatting)
- Type
String containing the entire text stating what the winner looted (note
- money_stolen: float¶
Money stolen in the attack
- moneystolen: float¶
Money stolen in the attack [deprecated]
- resistance_eliminated: int¶
Resistance eliminated by the attack
- success: int¶
Number representing the level of success of the attack (0 - utter failure, 1 - pyrrhic victory, 2 - moderate success, 3 - immense triumph)
- type: AttackType¶
Enumeration representing the type of attack performed (“AIRVINFRA”, “AIRVSOLDIERS”, “AIRVTANKS”, “AIRVMONEY”, “AIRVSHIPS”, “AIRVAIR”, “GROUND”, “MISSILE”, “MISSILEFAIL”, “NUKE”, “NUKEFAIL”, “NAVAL”, “FORTIFY”, “PEACE”, “VICTORY”, “ALLIANCELOOT”)
- victor: int¶
ID of the nation that won the attack (defender if utter failure, attacker otherwise)
- war_id: int¶
ID of the war the attack was performed in
- warid: int¶
ID of the war the attack was performed in [deprecated]