# Finfo
This is a python-package used to get current and histrorical rankings of fencers.
## Table of Contents
1. [Installation](#installation)
2. [Practical Information](#practical-information)
3. [Usage](#usage)
4. [Contributing](#contributing)
5. [License](#license)
## Installation
```bash
pip install finfo
```
## Practical information
Before you begin to use this package I have some practical information.
1.
There are current and historical fencing rankings you can access.
The historic ones only go back to the 2019-2020 season.
2.
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.
3.
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](#Configuring-class)
2. [Getting specific fencer by rank](#Getting-specific-fencer-by-rank)
3. [Getting specific fencer by name](#Getting-specific-fencer-by-name)
4. [Getting all fencers from a specific country](#Getting-all-fencers-from-a-specific-country)
5. [Getting all categories](#Getting-all-categories)
### Configuring class
Almost all actions will be used on a class. This class will be configured like this:
```python
from finfo.FIE import FIE
fie = FIE(season)
```
An example of this can look like this:
```python
fie = FIE("foil_senior_men_2022_2023")
```
### Getting specific fencer by rank
This method takes a rank, and outputs the athlete:
```python
from finfo.FIE import FIE
fie = FIE("foil_senior_men_2022_2023")
fie.find_fencer_by_rank(1)
```
```bash
{"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.
```python
from finfo.FIE import FIE
fie = FIE("foil_senior_men_2022_2023")
fie.find_fencer_by_name('alexander', 'massiales')
```
```bash
{"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.
```python
from finfo.FIE import FIE
fie = FIE("foil_senior_men_2022_2023")
fie.get_all_fencers_from_country("CYP")
```
```bash
[{'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.
```python
from finfo.FIE import all_fencing_categories
all_fencing_categories()
```
```bash
['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.
```python
from finfo.FIE import all_valid_countrycodes
all_valid_countrycodes()
```
```bash
{'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](https://choosealicense.com/licenses/mit/)
Raw data
{
"_id": null,
"home_page": "https://gitlab.com/hann1ba1/finfo",
"name": "finfo",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "python, fencing, rankings",
"author": "Hannibal Lykke Kofoed",
"author_email": "hanniballykkekofoed@icloud.com",
"download_url": "https://files.pythonhosted.org/packages/d1/8d/4b094f9e49786c44797ff42e95259757b79bbefce5dea7564f77e83bdee4/finfo-3.tar.gz",
"platform": null,
"description": "# Finfo\r\nThis is a python-package used to get current and histrorical rankings of fencers.\r\n\r\n## Table of Contents\r\n\r\n1. [Installation](#installation)\r\n2. [Practical Information](#practical-information)\r\n3. [Usage](#usage)\r\n4. [Contributing](#contributing)\r\n5. [License](#license)\r\n\r\n## Installation\r\n\r\n```bash\r\npip install finfo\r\n```\r\n\r\n## Practical information\r\nBefore you begin to use this package I have some practical information.\r\n\r\n1.\r\nThere are current and historical fencing rankings you can access.\r\nThe historic ones only go back to the 2019-2020 season.\r\n\r\n2. \r\nWe have made out own system to classify how one should look up the rankings.\r\nYou can get all the categories when running the all_fencing_categories function.\r\n\r\n3.\r\nThis package is built around reading the rankings from the official PDF files.\r\nThis means that sometimes the runtime is a bit slow, because it needs to pull the latest packages.\r\n\r\n## Usage\r\n\r\n### Table of Contents\r\n\r\n1. [Configuring class](#Configuring-class)\r\n2. [Getting specific fencer by rank](#Getting-specific-fencer-by-rank)\r\n3. [Getting specific fencer by name](#Getting-specific-fencer-by-name)\r\n4. [Getting all fencers from a specific country](#Getting-all-fencers-from-a-specific-country)\r\n5. [Getting all categories](#Getting-all-categories)\r\n\r\n### Configuring class\r\nAlmost all actions will be used on a class. This class will be configured like this:\r\n\r\n```python\r\nfrom finfo.FIE import FIE\r\n\r\nfie = FIE(season)\r\n```\r\nAn example of this can look like this:\r\n```python\r\nfie = FIE(\"foil_senior_men_2022_2023\")\r\n```\r\n\r\n### Getting specific fencer by rank\r\n\r\nThis method takes a rank, and outputs the athlete:\r\n\r\n```python\r\nfrom finfo.FIE import FIE\r\n\r\nfie = FIE(\"foil_senior_men_2022_2023\")\r\n\r\nfie.find_fencer_by_rank(1)\r\n```\r\n\r\n```bash\r\n{\"First name\": \"Alexander\", \"Last name\": \"Massiales\", \"CountryCode\": \"USA\"}\r\n\r\n```\r\n\r\n### Getting specific fencer by name\r\nThis method takes the fencers name, and outputs the fencer as a dictionary object with rank, name and countrycode.\r\n\r\n```python\r\nfrom finfo.FIE import FIE\r\n\r\nfie = FIE(\"foil_senior_men_2022_2023\")\r\n\r\nfie.find_fencer_by_name('alexander', 'massiales')\r\n```\r\n\r\n```bash\r\n{\"First name\": \"Alexander\", \"Last name\": \"Massiales\", \"CountryCode\": \"USA\", \"Rank\": 1}\r\n\r\n```\r\n\r\n### Getting all fencers from a specific country\r\nThis method takes an countrycode, and outputs all the fencers from that country.\r\n\r\n```python\r\nfrom finfo.FIE import FIE\r\n\r\nfie = FIE(\"foil_senior_men_2022_2023\")\r\n\r\nfie.get_all_fencers_from_country(\"CYP\")\r\n```\r\n\r\n```bash\r\n[{'Lastname': 'tofalides', 'Firstname': 'alex', 'CountryCode': 'CYP', 'Rank': 68}, {'Lastname': 'kiayias', 'Firstname': 'william', 'CountryCode': 'CYP', 'Rank': 762}]\r\n\r\n```\r\n\r\n### Getting all categories\r\nThis method takes no arguments, and outputs all valid categories.\r\n\r\n```python\r\nfrom finfo.FIE import all_fencing_categories\r\n\r\nall_fencing_categories()\r\n```\r\n\r\n```bash\r\n['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']\r\n```\r\n\r\n### Getting all valid Country Codes\r\nThis methods returns all valid Country Codes, and takes no arguments.\r\n\r\n```python\r\nfrom finfo.FIE import all_valid_countrycodes\r\n\r\nall_valid_countrycodes()\r\n```\r\n\r\n```bash\r\n{'AIN', 'VIE', 'TUN', 'JOR', 'AZE', 'BOL', 'CAN', 'TKM', 'NGR', \r\n'ROU', 'GRE', 'MAR', 'UZB', 'IRI', 'NCA', 'EST', 'PHI', 'LBA', \r\n'UAE', 'LBN', 'MKD', 'TPE', 'BUL', 'IRL', 'CYP', 'MGL', 'SEN', \r\n'POL', 'POR', 'QAT', 'SUI', 'KSA', 'MAS', 'CZE', 'PAR', 'KGZ', \r\n'TUR', 'MEX', 'BRA', 'ALG', 'IND', 'INA', 'ARM', 'PAN', 'DEN', \r\n'CRC', 'ESP', 'EGY', 'THA', 'SRB', 'PUR', 'RSA', 'CHN', 'FIN', \r\n'GBR', 'KUW', 'MDA', 'MAC', 'ITA', 'COD', 'AUS', 'CHI', 'ARG', \r\n'ANG', 'USA', 'OMA', 'PER', 'KOR', 'FRA', 'JPN', 'NZL', 'NOR', \r\n'UKR', 'SVK', 'MLT', 'HKG', 'SGP', 'COL', 'GER', 'SWE', 'ESA', \r\n'JAM', 'LAT', 'VEN', 'SLO', 'LUX', 'BRN', 'GEO', 'CRO', 'BEL', \r\n'AUT', 'NED', 'ISR', 'ISV', 'LTU', 'HUN', 'KAZ', 'DOM', 'ECU', \r\n'GUA', 'URU', 'NIG', 'IRQ', 'GHA', 'BER', 'ISL', 'TOG', 'PAK'\r\n'BAR', 'RUS', 'CPV', 'MLI', 'CIV', 'BAH', 'MRI', 'CUB', 'MNE'\r\n'GUY', 'TJK', 'BEN', 'PAK', 'SRI', 'KEN', 'BUR', 'HON', 'NEP',\r\n'BRU', 'UGA', 'CMR', 'RWA', 'BAR', 'HAI', 'YEM', 'ARU', 'SYR', \r\n'MNE', 'MON', 'SUD'}\r\n```\r\n\r\n\r\n## Contributing\r\nContributing is welcome, please just email so I can get a clear understanding of the improvement.\r\nPlease make sure to update tests as appropriate.\r\n\r\n## License\r\n[MIT](https://choosealicense.com/licenses/mit/)\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Package used to find fencers ranking placements.",
"version": "3",
"project_urls": {
"Homepage": "https://gitlab.com/hann1ba1/finfo"
},
"split_keywords": [
"python",
" fencing",
" rankings"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d0d0fb7da02659a7589ea7c2e565f0c6d977b41c93d924060b0f2cc471af873f",
"md5": "2707c1d4bf830a741d98fdfed9c51378",
"sha256": "b6d646e46b5e6a91e96d69625537b7c355d3a5d8842a0e47537e927ef93b32e0"
},
"downloads": -1,
"filename": "finfo-3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2707c1d4bf830a741d98fdfed9c51378",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 10573,
"upload_time": "2024-09-22T09:14:46",
"upload_time_iso_8601": "2024-09-22T09:14:46.626946Z",
"url": "https://files.pythonhosted.org/packages/d0/d0/fb7da02659a7589ea7c2e565f0c6d977b41c93d924060b0f2cc471af873f/finfo-3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d18d4b094f9e49786c44797ff42e95259757b79bbefce5dea7564f77e83bdee4",
"md5": "3b19dbc7d7bba157d94720f7781bf7a1",
"sha256": "b487f887dcdb311ae251edd648defb3c459240a500223594ba1a5edcdc066183"
},
"downloads": -1,
"filename": "finfo-3.tar.gz",
"has_sig": false,
"md5_digest": "3b19dbc7d7bba157d94720f7781bf7a1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 10259,
"upload_time": "2024-09-22T09:14:48",
"upload_time_iso_8601": "2024-09-22T09:14:48.275215Z",
"url": "https://files.pythonhosted.org/packages/d1/8d/4b094f9e49786c44797ff42e95259757b79bbefce5dea7564f77e83bdee4/finfo-3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-09-22 09:14:48",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "hann1ba1",
"gitlab_project": "finfo",
"lcname": "finfo"
}