Welcome to UFCPy!¶
A fast and easy way to access the UFC roster
Features¶
Scrapes everything off the UFC website
Synchronous
Easy
First Steps¶
Install the package
python3 -m pip install ufcpy
Import the function to find a fighter
from ufcpy import find_fighter_by_fullname
Call the function and define it.
fighter = find_fighter_by_fullname('Jon Jones')
Use the class returned via the previous function to return anything about the specified fighter
fighter.nickname # Returns 'Bones'
Example¶
from ufcpy import find_fighter_by_fullname
f = find_fighter_by_fullname('Jon Jones')
print(f.nickname, f.hometown)
Classes¶
Fighter¶
- class ufcpy.Fighter(_parsed_url)¶
Bases:
object- property octagon_debut¶
str]: The date of when the fighter first fought in the UFC octagon- Type:
Optional[
- Type:
class
- property trains_at¶
str]: The gym the UFC fighter currently trains out of- Type:
Optional[
- Type:
class
- property striking_accuracy¶
The striking accuracy percentage in the UFC career of the fighter
- Type:
- property significant_strikes_landed¶
The significant strikes landed in the UFC career of the fighter
- Type:
- property significant_strikes_attempted¶
The significant strikes attemped in the UFC career of the fighter
- Type:
- property takedown_accuracy¶
The takedown accuracy percentage in the UFC career of the fighter
- Type:
- property landed_takedowns¶
The takedowns landed in the UFC career of the fighter
- Type:
Optional[
int]
- property attempted_takedowns¶
The takedowns attempted in the UFC career of the fighter
- Type:
Optional[
str]
- property wins_by_ko_percentage¶
The percentage of the knockout wins the fighter has in the UFC
- Type:
- property wins_by_sub_percentage¶
The percentage of the submission wins the fighter has in the UFC
- Type:
- property wins_by_dec_percentage¶
The percentage of the decision wins the fighter has in the UFC
- Type:
- property sig_str_landed_min¶
The amount of signfication strikes the figher lands per minute
- Type:
- property sig_str_absorbed_min¶
The amount of signfication strikes the figher absorbs per minute
- Type:
- property sig_str_defense¶
The percentage of signfication strikes the figher defends against in whole UFC career
- Type:
- property takedown_defense¶
The percentage of takedowns the figher defends against in whole UFC career
- Type:
- property knockdown_avg¶
The amount of knockdowns the figher lands per a 15 minute window
- Type:
- property average_fight_time¶
The average amount of time the fighter spends in octagon per fight
- Type:
- property sig_str_via_standing¶
The amount of significant strikes the fighter has thrown in a standing position
- Type:
- property sig_str_percentage_via_standing¶
The percentage of significant strikes the fighter has thrown in a standing position
- Type:
- property sig_str_via_clinch¶
The amount of significant strikes the fighter has thrown in a clinch position
- Type:
- property sig_str_percentage_via_clinch¶
The percentage of significant strikes the fighter has thrown in a clinch position
- Type:
- property sig_str_via_ground¶
The amount of significant strikes the fighter has thrown in a ground position
- Type:
- property sig_str_percentage_via_ground¶
The percentage of significant strikes the fighter has thrown in a ground position
- Type:
- property sig_str_to_head¶
The amount of significant strikes the fighter has thrown to the head
- Type:
- property sig_str_percentage_to_head¶
The percentage of significant strikes the fighter has thrown to the head
- Type:
- property sig_str_to_body¶
The amount of significant strikes the fighter has thrown to the body
- Type:
- property sig_str_percentage_to_body¶
The percentage of significant strikes the fighter has thrown to the body
- Type:
- property sig_str_to_leg¶
The amount of significant strikes the fighter has thrown to the leg
- Type:
Exception Classes¶
- class ufcpy.UFCPyError(msg)¶