datafc 2.3.0__tar.gz → 2.4.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (86) hide show
  1. {datafc-2.3.0 → datafc-2.4.0}/PKG-INFO +30 -3
  2. {datafc-2.3.0 → datafc-2.4.0}/README.md +29 -2
  3. {datafc-2.3.0 → datafc-2.4.0}/datafc/__init__.py +2 -1
  4. {datafc-2.3.0 → datafc-2.4.0}/datafc/sofascore/__init__.py +2 -0
  5. datafc-2.4.0/datafc/sofascore/_core.py +816 -0
  6. datafc-2.4.0/datafc/sofascore/aio.py +1703 -0
  7. datafc-2.4.0/datafc/sofascore/fetch_average_positions_data.py +45 -0
  8. datafc-2.4.0/datafc/sofascore/fetch_coordinates_data.py +61 -0
  9. datafc-2.4.0/datafc/sofascore/fetch_goal_networks_data.py +61 -0
  10. datafc-2.4.0/datafc/sofascore/fetch_incidents_data.py +44 -0
  11. {datafc-2.3.0 → datafc-2.4.0}/datafc/sofascore/fetch_league_player_stats_data.py +46 -75
  12. datafc-2.4.0/datafc/sofascore/fetch_lineups_data.py +44 -0
  13. datafc-2.4.0/datafc/sofascore/fetch_match_data.py +82 -0
  14. datafc-2.4.0/datafc/sofascore/fetch_match_details_data.py +47 -0
  15. datafc-2.4.0/datafc/sofascore/fetch_match_h2h_data.py +46 -0
  16. datafc-2.4.0/datafc/sofascore/fetch_match_odds_data.py +44 -0
  17. {datafc-2.3.0 → datafc-2.4.0}/datafc/sofascore/fetch_match_stats_data.py +14 -32
  18. datafc-2.4.0/datafc/sofascore/fetch_momentum_data.py +44 -0
  19. datafc-2.4.0/datafc/sofascore/fetch_past_matches_data.py +84 -0
  20. datafc-2.4.0/datafc/sofascore/fetch_player_attribute_overviews_data.py +74 -0
  21. datafc-2.4.0/datafc/sofascore/fetch_player_career_stats_data.py +85 -0
  22. datafc-2.4.0/datafc/sofascore/fetch_player_data.py +78 -0
  23. datafc-2.4.0/datafc/sofascore/fetch_player_match_log_data.py +77 -0
  24. datafc-2.4.0/datafc/sofascore/fetch_player_national_team_data.py +71 -0
  25. datafc-2.4.0/datafc/sofascore/fetch_player_stats_data.py +77 -0
  26. datafc-2.4.0/datafc/sofascore/fetch_player_transfers_data.py +75 -0
  27. datafc-2.4.0/datafc/sofascore/fetch_pregame_form_data.py +49 -0
  28. datafc-2.4.0/datafc/sofascore/fetch_referee_stats_data.py +54 -0
  29. {datafc-2.3.0 → datafc-2.4.0}/datafc/sofascore/fetch_search_data.py +5 -32
  30. datafc-2.4.0/datafc/sofascore/fetch_season_rounds_data.py +53 -0
  31. {datafc-2.3.0 → datafc-2.4.0}/datafc/sofascore/fetch_seasons_data.py +9 -36
  32. datafc-2.4.0/datafc/sofascore/fetch_shots_data.py +55 -0
  33. datafc-2.4.0/datafc/sofascore/fetch_squad_data.py +72 -0
  34. {datafc-2.3.0 → datafc-2.4.0}/datafc/sofascore/fetch_standings_data.py +7 -28
  35. datafc-2.4.0/datafc/sofascore/fetch_substitutions_data.py +44 -0
  36. datafc-2.4.0/datafc/sofascore/fetch_team_data.py +78 -0
  37. {datafc-2.3.0 → datafc-2.4.0}/datafc/sofascore/fetch_team_match_history_data.py +8 -36
  38. datafc-2.4.0/datafc/sofascore/fetch_team_stats_data.py +83 -0
  39. datafc-2.4.0/datafc/sofascore/fetch_team_transfers_data.py +68 -0
  40. {datafc-2.3.0 → datafc-2.4.0}/datafc/sofascore/fetch_upcoming_matches_data.py +8 -36
  41. {datafc-2.3.0 → datafc-2.4.0}/datafc.egg-info/PKG-INFO +30 -3
  42. {datafc-2.3.0 → datafc-2.4.0}/datafc.egg-info/SOURCES.txt +2 -0
  43. {datafc-2.3.0 → datafc-2.4.0}/pyproject.toml +1 -1
  44. datafc-2.3.0/datafc/sofascore/aio.py +0 -2419
  45. datafc-2.3.0/datafc/sofascore/fetch_average_positions_data.py +0 -91
  46. datafc-2.3.0/datafc/sofascore/fetch_coordinates_data.py +0 -102
  47. datafc-2.3.0/datafc/sofascore/fetch_goal_networks_data.py +0 -148
  48. datafc-2.3.0/datafc/sofascore/fetch_incidents_data.py +0 -87
  49. datafc-2.3.0/datafc/sofascore/fetch_lineups_data.py +0 -80
  50. datafc-2.3.0/datafc/sofascore/fetch_match_data.py +0 -106
  51. datafc-2.3.0/datafc/sofascore/fetch_match_details_data.py +0 -92
  52. datafc-2.3.0/datafc/sofascore/fetch_match_h2h_data.py +0 -82
  53. datafc-2.3.0/datafc/sofascore/fetch_match_odds_data.py +0 -73
  54. datafc-2.3.0/datafc/sofascore/fetch_momentum_data.py +0 -80
  55. datafc-2.3.0/datafc/sofascore/fetch_past_matches_data.py +0 -140
  56. datafc-2.3.0/datafc/sofascore/fetch_player_career_stats_data.py +0 -124
  57. datafc-2.3.0/datafc/sofascore/fetch_player_data.py +0 -132
  58. datafc-2.3.0/datafc/sofascore/fetch_player_match_log_data.py +0 -126
  59. datafc-2.3.0/datafc/sofascore/fetch_player_national_team_data.py +0 -108
  60. datafc-2.3.0/datafc/sofascore/fetch_player_stats_data.py +0 -126
  61. datafc-2.3.0/datafc/sofascore/fetch_player_transfers_data.py +0 -122
  62. datafc-2.3.0/datafc/sofascore/fetch_pregame_form_data.py +0 -109
  63. datafc-2.3.0/datafc/sofascore/fetch_referee_stats_data.py +0 -104
  64. datafc-2.3.0/datafc/sofascore/fetch_season_rounds_data.py +0 -99
  65. datafc-2.3.0/datafc/sofascore/fetch_shots_data.py +0 -80
  66. datafc-2.3.0/datafc/sofascore/fetch_squad_data.py +0 -124
  67. datafc-2.3.0/datafc/sofascore/fetch_substitutions_data.py +0 -80
  68. datafc-2.3.0/datafc/sofascore/fetch_team_data.py +0 -132
  69. datafc-2.3.0/datafc/sofascore/fetch_team_stats_data.py +0 -123
  70. datafc-2.3.0/datafc/sofascore/fetch_team_transfers_data.py +0 -128
  71. {datafc-2.3.0 → datafc-2.4.0}/LICENSE +0 -0
  72. {datafc-2.3.0 → datafc-2.4.0}/datafc/exceptions.py +0 -0
  73. {datafc-2.3.0 → datafc-2.4.0}/datafc/sofascore/_parsers.py +0 -0
  74. {datafc-2.3.0 → datafc-2.4.0}/datafc/utils/__init__.py +0 -0
  75. {datafc-2.3.0 → datafc-2.4.0}/datafc/utils/_async_client.py +0 -0
  76. {datafc-2.3.0 → datafc-2.4.0}/datafc/utils/_cache.py +0 -0
  77. {datafc-2.3.0 → datafc-2.4.0}/datafc/utils/_client.py +0 -0
  78. {datafc-2.3.0 → datafc-2.4.0}/datafc/utils/_config.py +0 -0
  79. {datafc-2.3.0 → datafc-2.4.0}/datafc/utils/_helpers.py +0 -0
  80. {datafc-2.3.0 → datafc-2.4.0}/datafc/utils/_save_files.py +0 -0
  81. {datafc-2.3.0 → datafc-2.4.0}/datafc/utils/_tournament_info.py +0 -0
  82. {datafc-2.3.0 → datafc-2.4.0}/datafc/utils/_validate.py +0 -0
  83. {datafc-2.3.0 → datafc-2.4.0}/datafc.egg-info/dependency_links.txt +0 -0
  84. {datafc-2.3.0 → datafc-2.4.0}/datafc.egg-info/requires.txt +0 -0
  85. {datafc-2.3.0 → datafc-2.4.0}/datafc.egg-info/top_level.txt +0 -0
  86. {datafc-2.3.0 → datafc-2.4.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: datafc
3
- Version: 2.3.0
3
+ Version: 2.4.0
4
4
  Summary: Fetch, process, and export structured football data.
5
5
  Author-email: Uraz Akgül <urazdev@gmail.com>
6
6
  License: MIT
@@ -24,7 +24,7 @@ Requires-Dist: pytest>=8.0; extra == "dev"
24
24
  Requires-Dist: pytest-mock>=3.12; extra == "dev"
25
25
  Dynamic: license-file
26
26
 
27
- # datafc v2.3.0
27
+ # datafc v2.4.0
28
28
 
29
29
  ## Overview
30
30
 
@@ -88,6 +88,7 @@ Dynamic: license-file
88
88
  | Function | What it returns |
89
89
  |---|---|
90
90
  | `player_data` | Player profile: age, nationality, height, market value |
91
+ | `player_attribute_overviews_data` | Radar attribute snapshots (attacking, technical, tactical, defending, creativity) per player and position average |
91
92
  | `player_transfers_data` | Transfer history per player |
92
93
  | `player_career_stats_data` | Season-by-season career stats across all competitions (long format) |
93
94
  | `player_national_team_data` | National team appearances, goals, and debut date |
@@ -858,6 +859,24 @@ Dependencies: `squad_data`
858
859
 
859
860
  ---
860
861
 
862
+ #### `player_attribute_overviews_data`
863
+
864
+ Fetch radar attribute overviews (attacking, technical, tactical, defending, creativity) for each player in a squad, including the position-average baseline and previous-year snapshots.
865
+
866
+ ```python
867
+ from datafc import standings_data, squad_data, player_attribute_overviews_data
868
+
869
+ standings_df = standings_data(52, 63814)
870
+ squad_df = squad_data(standings_df=standings_df)
871
+ df = player_attribute_overviews_data(squad_df=squad_df)
872
+ ```
873
+
874
+ Columns: `player_id`, `player_name`, `series` (`'player'` or `'average'`), `position`, `year_shift`, `attacking`, `technical`, `tactical`, `defending`, `creativity`.
875
+
876
+ Dependencies: `squad_data`
877
+
878
+ ---
879
+
861
880
  #### `player_national_team_data`
862
881
 
863
882
  Fetch national team career statistics (appearances, goals, debut) for each player in a squad.
@@ -914,7 +933,15 @@ Columns: `referee_id`, `referee_name`, `tournament_id`, `tournament_name`, `stat
914
933
 
915
934
  ---
916
935
 
917
- ## Changelog
936
+ ## What's new
937
+
938
+ ### v2.4.0
939
+
940
+ - **New function: `player_attribute_overviews_data`** — fetches Sofascore radar attribute snapshots (attacking, technical, tactical, defending, creativity) for each player in a squad. Includes the position-average baseline and previous-year history.
941
+ - **More reliable batch fetches.** `match_h2h_data` and `match_odds_data` no longer stop the whole run when one match returns an error. The bad match is skipped and the rest succeed, matching how other batch functions already behaved.
942
+ - **Fixed `aio.team_stats_data(season=...)`.** The async version now accepts the `season` argument that the sync version always had — previously it raised `TypeError`.
943
+
944
+ ---
918
945
 
919
946
  ### v2.3.0
920
947
 
@@ -1,4 +1,4 @@
1
- # datafc v2.3.0
1
+ # datafc v2.4.0
2
2
 
3
3
  ## Overview
4
4
 
@@ -62,6 +62,7 @@
62
62
  | Function | What it returns |
63
63
  |---|---|
64
64
  | `player_data` | Player profile: age, nationality, height, market value |
65
+ | `player_attribute_overviews_data` | Radar attribute snapshots (attacking, technical, tactical, defending, creativity) per player and position average |
65
66
  | `player_transfers_data` | Transfer history per player |
66
67
  | `player_career_stats_data` | Season-by-season career stats across all competitions (long format) |
67
68
  | `player_national_team_data` | National team appearances, goals, and debut date |
@@ -832,6 +833,24 @@ Dependencies: `squad_data`
832
833
 
833
834
  ---
834
835
 
836
+ #### `player_attribute_overviews_data`
837
+
838
+ Fetch radar attribute overviews (attacking, technical, tactical, defending, creativity) for each player in a squad, including the position-average baseline and previous-year snapshots.
839
+
840
+ ```python
841
+ from datafc import standings_data, squad_data, player_attribute_overviews_data
842
+
843
+ standings_df = standings_data(52, 63814)
844
+ squad_df = squad_data(standings_df=standings_df)
845
+ df = player_attribute_overviews_data(squad_df=squad_df)
846
+ ```
847
+
848
+ Columns: `player_id`, `player_name`, `series` (`'player'` or `'average'`), `position`, `year_shift`, `attacking`, `technical`, `tactical`, `defending`, `creativity`.
849
+
850
+ Dependencies: `squad_data`
851
+
852
+ ---
853
+
835
854
  #### `player_national_team_data`
836
855
 
837
856
  Fetch national team career statistics (appearances, goals, debut) for each player in a squad.
@@ -888,7 +907,15 @@ Columns: `referee_id`, `referee_name`, `tournament_id`, `tournament_name`, `stat
888
907
 
889
908
  ---
890
909
 
891
- ## Changelog
910
+ ## What's new
911
+
912
+ ### v2.4.0
913
+
914
+ - **New function: `player_attribute_overviews_data`** — fetches Sofascore radar attribute snapshots (attacking, technical, tactical, defending, creativity) for each player in a squad. Includes the position-average baseline and previous-year history.
915
+ - **More reliable batch fetches.** `match_h2h_data` and `match_odds_data` no longer stop the whole run when one match returns an error. The bad match is skipped and the rest succeed, matching how other batch functions already behaved.
916
+ - **Fixed `aio.team_stats_data(season=...)`.** The async version now accepts the `season` argument that the sync version always had — previously it raised `TypeError`.
917
+
918
+ ---
892
919
 
893
920
  ### v2.3.0
894
921
 
@@ -1,4 +1,4 @@
1
- __version__ = "2.3.0"
1
+ __version__ = "2.4.0"
2
2
 
3
3
  from .sofascore import *
4
4
  from .exceptions import (
@@ -51,6 +51,7 @@ __all__ = [
51
51
  "past_matches_data",
52
52
  # Player
53
53
  "player_data",
54
+ "player_attribute_overviews_data",
54
55
  "player_transfers_data",
55
56
  "player_career_stats_data",
56
57
  "player_national_team_data",
@@ -29,6 +29,7 @@ from .fetch_player_match_log_data import player_match_log_data
29
29
  from .fetch_referee_stats_data import referee_stats_data
30
30
  from .fetch_player_national_team_data import player_national_team_data
31
31
  from .fetch_player_data import player_data
32
+ from .fetch_player_attribute_overviews_data import player_attribute_overviews_data
32
33
  from .fetch_team_data import team_data
33
34
  from .fetch_season_rounds_data import season_rounds_data
34
35
  from . import aio
@@ -75,6 +76,7 @@ __all__ = [
75
76
  "season_rounds_data",
76
77
  # Player profile
77
78
  "player_data",
79
+ "player_attribute_overviews_data",
78
80
  # Team profile
79
81
  "team_data",
80
82
  # Async API