Skip to main content

Package used to find fencers ranking placements.

Project description

Finfo

This is a python-package used to get current and histrorical rankings of fencers.

Table of Contents

  1. Installation
  2. Practical Information
  3. Usage
  4. Contributing
  5. License

Installation

pip install finfo

Practical information

Before you begin to use this package I have some practical information.

There are current and historical fencing rankings you can access. The historic ones only go back to the 2019-2020 season.

We have made out own system to classify how one should look up the rankings. You can get all the categories when running the all_fencing_categories function.

This package is built around reading the rankings from the official PDF files. This means that sometimes the runtime is a bit slow, because it needs to pull the latest packages.

Usage

Table of Contents

  1. Configuring class
  2. Getting specific fencer by rank
  3. Getting specific fencer by name
  4. Getting all fencers from a specific country
  5. Getting all categories

Configuring class

Almost all actions will be used on a class. This class will be configured like this:

from finfo.FIE import FIE

fie = FIE(season)

An example of this can look like this:

fie = FIE("foil_senior_men_2022_2023")

Getting specific fencer by rank

This method takes a rank, and outputs the athlete:

from finfo.FIE import FIE

fie = FIE("foil_senior_men_2022_2023")

fie.find_fencer_by_rank(1)
{"First name": "Alexander", "Last name": "Massiales", "CountryCode": "USA"}

Getting specific fencer by name

This method takes the fencers name, and outputs the fencer as a dictionary object with rank, name and countrycode.

from finfo.FIE import FIE

fie = FIE("foil_senior_men_2022_2023")

fie.find_fencer_by_name('alexander', 'massiales')
{"First name": "Alexander", "Last name": "Massiales", "CountryCode": "USA", "Rank": 1}

Getting all fencers from a specific country

This method takes an countrycode, and outputs all the fencers from that country.

from finfo.FIE import FIE

fie = FIE("foil_senior_men_2022_2023")

fie.get_all_fencers_from_country("CYP")
[{'Lastname': 'tofalides', 'Firstname': 'alex', 'CountryCode': 'CYP', 'Rank': 68}, {'Lastname': 'kiayias', 'Firstname': 'william', 'CountryCode': 'CYP', 'Rank': 762}]

Getting all categories

This method takes no arguments, and outputs all valid categories.

from finfo.FIE import all_fencing_categories

all_fencing_categories()
['foil_senior_men_2023_2024', 'epee_senior_men_2023_2024', 'sabre_senior_men_2023_2024', 'foil_senior_woman_2023_2024', 'epee_senior_woman_2023_2024', 'sabre_senior_woman_2023_2024', 'foil_junior_men_2023_2024', 'epee_junior_men_2023_2024', 'sabre_junior_men_2023_2024', 'foil_junior_woman_2023_2024', 'epee_junior_woman_2023_2024', 'sabre_junior_woman_2023_2024', 'foil_cadet_men_eu_2023_2024', 'epee_cadet_men_eu_2023_2024', 'sabre_cadet_men_eu_2023_2024', 'foil_cadet_woman_eu_2023_2024', 'epee_cadet_woman_eu_2023_2024', 'sabre_cadet_woman_eu_2023_2024', 'foil_senior_men_2022_2023', 'epee_senior_men_2022_2023', 'sabre_senior_men_2022_2023', 'foil_senior_woman_2022_2023', 'epee_senior_woman_2022_2023', 'sabre_senior_woman_2022_2023', 'foil_junior_men_2022_2023', 'epee_junior_men_2022_2023', 'sabre_junior_men_2022_2023', 'foil_junior_woman_2022_2023', 'epee_junior_woman_2022_2023', 'sabre_junior_woman_2022_2023', 'foil_cadet_men_eu_2022_2023', 'epee_cadet_men_eu_2022_2023', 'sabre_cadet_men_eu_2022_2023', 'foil_cadet_woman_eu_2022_2023', 'epee_cadet_woman_eu_2022_2023', 'sabre_cadet_woman_eu_2022_2023', 'foil_senior_men_2021_2022', 'epee_senior_men_2021_2022', 'sabre_senior_men_2021_2022', 'foil_senior_woman_2021_2022', 'epee_senior_woman_2021_2022', 'sabre_senior_woman_2021_2022', 'foil_junior_men_2021_2022', 'epee_junior_men_2021_2022', 'sabre_junior_men_2021_2022', 'foil_junior_woman_2021_2022', 'epee_junior_woman_2021_2022', 'sabre_junior_woman_2021_2022', 'foil_cadet_men_eu_2021_2022', 'epee_cadet_men_eu_2021_2022', 'sabre_cadet_men_eu_2021_2022', 'foil_cadet_woman_eu_2021_2022', 'epee_cadet_woman_eu_2021_2022', 'sabre_cadet_woman_eu_2021_2022', 'foil_senior_men_2020_2021', 'epee_senior_men_2020_2021', 'sabre_senior_men_2020_2021', 'foil_senior_woman_2020_2021', 'epee_senior_woman_2020_2021', 'sabre_senior_woman_2020_2021', 'foil_junior_men_2020_2021', 'epee_junior_men_2020_2021', 'sabre_junior_men_2020_2021', 'foil_junior_woman_2020_2021', 'epee_junior_woman_2020_2021', 'sabre_junior_woman_2020_2021', 'foil_cadet_men_eu_2020_2021', 'epee_cadet_men_eu_2020_2021', 'sabre_cadet_men_eu_2020_2021', 'foil_cadet_woman_eu_2020_2021', 'epee_cadet_woman_eu_2020_2021', 'sabre_cadet_woman_eu_2020_2021', 'foil_senior_men_2019_2020', 'epee_senior_men_2019_2020', 'sabre_senior_men_2019_2020', 'foil_senior_woman_2019_2020', 'epee_senior_woman_2019_2020', 'sabre_senior_woman_2019_2020', 'foil_junior_men_2019_2020', 'epee_junior_men_2019_2020', 'sabre_junior_men_2019_2020', 'foil_junior_woman_2019_2020', 'epee_junior_woman_2019_2020', 'sabre_junior_woman_2019_2020', 'foil_cadet_men_eu_2019_2020', 'epee_cadet_men_eu_2019_2020', 'sabre_cadet_men_eu_2019_2020', 'foil_cadet_woman_eu_2019_2020', 'epee_cadet_woman_eu_2019_2020', 'sabre_cadet_woman_eu_2019_2020']

Getting all valid Country Codes

This methods returns all valid Country Codes, and takes no arguments.

from finfo.FIE import all_valid_countrycodes

all_valid_countrycodes()
{'AIN', 'VIE', 'TUN', 'JOR', 'AZE', 'BOL', 'CAN', 'TKM', 'NGR', 
'ROU', 'GRE', 'MAR', 'UZB', 'IRI', 'NCA', 'EST', 'PHI', 'LBA', 
'UAE', 'LBN', 'MKD', 'TPE', 'BUL', 'IRL', 'CYP', 'MGL', 'SEN', 
'POL', 'POR', 'QAT', 'SUI', 'KSA', 'MAS', 'CZE', 'PAR', 'KGZ', 
'TUR', 'MEX', 'BRA', 'ALG', 'IND', 'INA', 'ARM', 'PAN', 'DEN', 
'CRC', 'ESP', 'EGY', 'THA', 'SRB', 'PUR', 'RSA', 'CHN', 'FIN', 
'GBR', 'KUW', 'MDA', 'MAC', 'ITA', 'COD', 'AUS', 'CHI', 'ARG', 
'ANG', 'USA', 'OMA', 'PER', 'KOR', 'FRA', 'JPN', 'NZL', 'NOR', 
'UKR', 'SVK', 'MLT', 'HKG', 'SGP', 'COL', 'GER', 'SWE', 'ESA', 
'JAM', 'LAT', 'VEN', 'SLO', 'LUX', 'BRN', 'GEO', 'CRO', 'BEL', 
'AUT', 'NED', 'ISR', 'ISV', 'LTU', 'HUN', 'KAZ', 'DOM', 'ECU', 
'GUA', 'URU', 'NIG', 'IRQ', 'GHA', 'BER', 'ISL', 'TOG', 'PAK'
'BAR', 'RUS', 'CPV', 'MLI', 'CIV', 'BAH', 'MRI', 'CUB', 'MNE'
'GUY', 'TJK', 'BEN', 'PAK', 'SRI', 'KEN', 'BUR', 'HON', 'NEP',
'BRU', 'UGA', 'CMR', 'RWA', 'BAR', 'HAI', 'YEM', 'ARU', 'SYR', 
'MNE', 'MON', 'SUD'}

Contributing

Contributing is welcome, please just email so I can get a clear understanding of the improvement. Please make sure to update tests as appropriate.

License

MIT

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

finfo-2.0.tar.gz (9.3 kB view details)

Uploaded Source

Built Distributions

finfo-2.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

finfo-2-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file finfo-2.0.tar.gz.

File metadata

  • Download URL: finfo-2.0.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.1

File hashes

Hashes for finfo-2.0.tar.gz
Algorithm Hash digest
SHA256 de6db21b79fac3491a42582260d32f0a9473d360a0b945ca7f2e6850e9c71bb5
MD5 fc33ea65bde55b8969c7114820e0a3a1
BLAKE2b-256 1bccfe65c03139c38948f8d6892a0567c28c0e900272929cfb69caa9b7573f4e

See more details on using hashes here.

File details

Details for the file finfo-2.0-py3-none-any.whl.

File metadata

  • Download URL: finfo-2.0-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.1

File hashes

Hashes for finfo-2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7efe0a69a43ce6de62a20eb679dcd0d1215534c8ec7f74e4e1b31c11bb5ff216
MD5 4f4559a8a60199f55637ff5f3e5cb774
BLAKE2b-256 0982e1f5b073420869f7dcdd335ba32dd870c98907d39e4db4fc4b8971078878

See more details on using hashes here.

File details

Details for the file finfo-2-py3-none-any.whl.

File metadata

  • Download URL: finfo-2-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.1

File hashes

Hashes for finfo-2-py3-none-any.whl
Algorithm Hash digest
SHA256 93acc1e1106839b7c79a62f91b56eca08896a21cd2125572d0094a498b090b00
MD5 9a81dc82167810b8047509793c84cb82
BLAKE2b-256 b25be03dac71ce38c1dc1476109689682dff751b65d044279d382769de699f20

See more details on using hashes here.

Supported by

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