Skip to content

A python library that retrieves information from nationsglory.fr, just for you!

License

Notifications You must be signed in to change notification settings

Galitan-dev/nationsglory.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NationsGlory.py MIT License

A python library that retrieves information from nationsglory.fr, just for you!

Authors

Features

  • GET player informations
  • GET country informations

Installation

Install nations-glory with pip

pip install nations-glory

Usage/Examples

from nations_glory import Servers
from nations_glory.players import Player
from nations_glory.countries import Country

player = Player('Just_Steel', Servers.PINK)

print("\nPlayer:", player.name)
print("Country:", player.country.name)
print("Power:", player.power)
print("Time Played:", str(player.time_played) + 'ms')

country = Country('EmpireBulgare', Servers.PINK)
# country = player.country.fetch()

print("\nCountry:", country.name)
print("Leader:", country.leader) 
print("Claims", country.claims)
print("Power:", player.power)

# OUTPUT:
#
# Player: Just_Steel
# Country: EmpireBulgare
# Power: 61
# Time Played: 7334691000ms
#
# Country: EmpireBulgare
# Leader: Firzonyx
# Claims 521
# Power: 61

Dependencies

python3.9.0 requests==2.22.0 html-to-json==1.0.1

License

MIT