ffbb-data-client 2.0.0__py3-none-any.whl
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.
- ffbb_api_client_v3/__init__.py +25 -0
- ffbb_data_client/__init__.py +175 -0
- ffbb_data_client/clients/__init__.py +13 -0
- ffbb_data_client/clients/api_ffbb_app_client.py +2475 -0
- ffbb_data_client/clients/ffbb_data_client.py +2789 -0
- ffbb_data_client/clients/meilisearch_client.py +218 -0
- ffbb_data_client/clients/meilisearch_ffbb_client.py +647 -0
- ffbb_data_client/config.py +153 -0
- ffbb_data_client/data/__init__.py +25 -0
- ffbb_data_client/data/collections.json +1364 -0
- ffbb_data_client/data/endpoint_discovery.json +1875 -0
- ffbb_data_client/data/indexes.json +501 -0
- ffbb_data_client/data/openapi.json +35713 -0
- ffbb_data_client/data/openapi_full.json +37622 -0
- ffbb_data_client/helpers/__init__.py +27 -0
- ffbb_data_client/helpers/http_requests_helper.py +73 -0
- ffbb_data_client/helpers/http_requests_utils.py +502 -0
- ffbb_data_client/helpers/meilisearch_client_extension.py +153 -0
- ffbb_data_client/helpers/multi_search_query_helper.py +35 -0
- ffbb_data_client/models/__init__.py +241 -0
- ffbb_data_client/models/affiche.py +45 -0
- ffbb_data_client/models/cartographie.py +82 -0
- ffbb_data_client/models/categorie.py +55 -0
- ffbb_data_client/models/categorie_type.py +42 -0
- ffbb_data_client/models/clock.py +38 -0
- ffbb_data_client/models/club_contacts.py +77 -0
- ffbb_data_client/models/code.py +7 -0
- ffbb_data_client/models/commune.py +66 -0
- ffbb_data_client/models/competition_fields.py +309 -0
- ffbb_data_client/models/competition_id.py +116 -0
- ffbb_data_client/models/competition_id_categorie.py +31 -0
- ffbb_data_client/models/competition_id_sexe.py +31 -0
- ffbb_data_client/models/competition_id_type_competition.py +27 -0
- ffbb_data_client/models/competition_id_type_competition_generique.py +24 -0
- ffbb_data_client/models/competition_origine.py +69 -0
- ffbb_data_client/models/competition_origine_categorie.py +23 -0
- ffbb_data_client/models/competition_origine_type_competition.py +14 -0
- ffbb_data_client/models/competition_origine_type_competition_generique.py +24 -0
- ffbb_data_client/models/competition_type.py +6 -0
- ffbb_data_client/models/competitions_facet_distribution.py +65 -0
- ffbb_data_client/models/competitions_facet_stats.py +14 -0
- ffbb_data_client/models/competitions_hit.py +232 -0
- ffbb_data_client/models/competitions_multi_search_query.py +40 -0
- ffbb_data_client/models/competitions_query.py +11 -0
- ffbb_data_client/models/configuration_models.py +5 -0
- ffbb_data_client/models/contact_info.py +18 -0
- ffbb_data_client/models/content_multi_search_query.py +93 -0
- ffbb_data_client/models/coordonnees.py +27 -0
- ffbb_data_client/models/coordonnees_type.py +5 -0
- ffbb_data_client/models/document_flyer.py +205 -0
- ffbb_data_client/models/document_flyer_type.py +6 -0
- ffbb_data_client/models/engagement_contacts.py +97 -0
- ffbb_data_client/models/engagements_facet_distribution.py +59 -0
- ffbb_data_client/models/engagements_facet_stats.py +14 -0
- ffbb_data_client/models/engagements_hit.py +192 -0
- ffbb_data_client/models/engagements_multi_search_query.py +41 -0
- ffbb_data_client/models/etat.py +6 -0
- ffbb_data_client/models/external_competition_id.py +42 -0
- ffbb_data_client/models/external_id.py +72 -0
- ffbb_data_client/models/facet_distribution.py +13 -0
- ffbb_data_client/models/facet_stats.py +13 -0
- ffbb_data_client/models/field_set.py +10 -0
- ffbb_data_client/models/folder.py +35 -0
- ffbb_data_client/models/formation_session.py +60 -0
- ffbb_data_client/models/formations_facet_distribution.py +61 -0
- ffbb_data_client/models/formations_facet_stats.py +14 -0
- ffbb_data_client/models/formations_hit.py +277 -0
- ffbb_data_client/models/formations_multi_search_query.py +41 -0
- ffbb_data_client/models/game_stats_model.py +57 -0
- ffbb_data_client/models/game_stats_models.py +5 -0
- ffbb_data_client/models/generic_search.py +92 -0
- ffbb_data_client/models/geo.py +27 -0
- ffbb_data_client/models/geo_sort_order.py +6 -0
- ffbb_data_client/models/get_commune_response.py +18 -0
- ffbb_data_client/models/get_competition_response.py +523 -0
- ffbb_data_client/models/get_configuration_response.py +45 -0
- ffbb_data_client/models/get_engagement_response.py +23 -0
- ffbb_data_client/models/get_entraineur_response.py +18 -0
- ffbb_data_client/models/get_formation_response.py +28 -0
- ffbb_data_client/models/get_officiel_response.py +18 -0
- ffbb_data_client/models/get_organisme_response.py +476 -0
- ffbb_data_client/models/get_poule_response.py +68 -0
- ffbb_data_client/models/get_pratique_response.py +18 -0
- ffbb_data_client/models/get_rencontre_response.py +93 -0
- ffbb_data_client/models/get_saisons_response.py +56 -0
- ffbb_data_client/models/get_salle_response.py +20 -0
- ffbb_data_client/models/get_terrain_response.py +16 -0
- ffbb_data_client/models/get_tournoi_response.py +16 -0
- ffbb_data_client/models/gradient_color.py +27 -0
- ffbb_data_client/models/hit.py +16 -0
- ffbb_data_client/models/id_engagement_equipe.py +32 -0
- ffbb_data_client/models/id_organisme_equipe.py +51 -0
- ffbb_data_client/models/id_organisme_equipe1_logo.py +28 -0
- ffbb_data_client/models/id_poule.py +27 -0
- ffbb_data_client/models/jour.py +11 -0
- ffbb_data_client/models/label.py +15 -0
- ffbb_data_client/models/labellisation.py +30 -0
- ffbb_data_client/models/live.py +192 -0
- ffbb_data_client/models/lives.py +6 -0
- ffbb_data_client/models/logo.py +28 -0
- ffbb_data_client/models/multi_search_queries.py +24 -0
- ffbb_data_client/models/multi_search_query.py +96 -0
- ffbb_data_client/models/multi_search_result_competitions.py +14 -0
- ffbb_data_client/models/multi_search_result_engagements.py +14 -0
- ffbb_data_client/models/multi_search_result_formations.py +12 -0
- ffbb_data_client/models/multi_search_result_organismes.py +12 -0
- ffbb_data_client/models/multi_search_result_pratiques.py +12 -0
- ffbb_data_client/models/multi_search_result_rencontres.py +12 -0
- ffbb_data_client/models/multi_search_result_salles.py +12 -0
- ffbb_data_client/models/multi_search_result_terrains.py +12 -0
- ffbb_data_client/models/multi_search_result_tournois.py +12 -0
- ffbb_data_client/models/multi_search_results.py +103 -0
- ffbb_data_client/models/multi_search_results_class.py +96 -0
- ffbb_data_client/models/nature_sol.py +57 -0
- ffbb_data_client/models/niveau.py +10 -0
- ffbb_data_client/models/niveau_class.py +27 -0
- ffbb_data_client/models/niveau_extractor.py +214 -0
- ffbb_data_client/models/niveau_info.py +64 -0
- ffbb_data_client/models/niveau_models.py +14 -0
- ffbb_data_client/models/niveau_type.py +10 -0
- ffbb_data_client/models/objectif.py +7 -0
- ffbb_data_client/models/organisateur.py +197 -0
- ffbb_data_client/models/organisateur_type.py +6 -0
- ffbb_data_client/models/organisme_fields.py +327 -0
- ffbb_data_client/models/organisme_id_pere.py +177 -0
- ffbb_data_client/models/organismes_facet_distribution.py +46 -0
- ffbb_data_client/models/organismes_facet_stats.py +14 -0
- ffbb_data_client/models/organismes_hit.py +196 -0
- ffbb_data_client/models/organismes_multi_search_query.py +41 -0
- ffbb_data_client/models/organismes_query.py +8 -0
- ffbb_data_client/models/phase_code.py +23 -0
- ffbb_data_client/models/poule.py +35 -0
- ffbb_data_client/models/poule_fields.py +261 -0
- ffbb_data_client/models/poule_rencontre_item_model.py +69 -0
- ffbb_data_client/models/poules_models.py +6 -0
- ffbb_data_client/models/poules_query.py +9 -0
- ffbb_data_client/models/pratique.py +7 -0
- ffbb_data_client/models/pratiques_facet_distribution.py +29 -0
- ffbb_data_client/models/pratiques_facet_stats.py +14 -0
- ffbb_data_client/models/pratiques_hit.py +310 -0
- ffbb_data_client/models/pratiques_hit_type.py +9 -0
- ffbb_data_client/models/pratiques_multi_search_query.py +41 -0
- ffbb_data_client/models/pratiques_type_class.py +45 -0
- ffbb_data_client/models/publication_internet.py +6 -0
- ffbb_data_client/models/purple_logo.py +24 -0
- ffbb_data_client/models/query_fields_manager.py +75 -0
- ffbb_data_client/models/ranking_engagement.py +41 -0
- ffbb_data_client/models/rankings_models.py +6 -0
- ffbb_data_client/models/rencontres_engagement.py +23 -0
- ffbb_data_client/models/rencontres_facet_distribution.py +65 -0
- ffbb_data_client/models/rencontres_facet_stats.py +14 -0
- ffbb_data_client/models/rencontres_hit.py +271 -0
- ffbb_data_client/models/rencontres_multi_search_query.py +41 -0
- ffbb_data_client/models/saison.py +23 -0
- ffbb_data_client/models/saison_fields.py +36 -0
- ffbb_data_client/models/saisons_models.py +6 -0
- ffbb_data_client/models/saisons_query.py +9 -0
- ffbb_data_client/models/salle.py +56 -0
- ffbb_data_client/models/salles_facet_distribution.py +14 -0
- ffbb_data_client/models/salles_facet_stats.py +14 -0
- ffbb_data_client/models/salles_hit.py +153 -0
- ffbb_data_client/models/salles_multi_search_query.py +40 -0
- ffbb_data_client/models/sexe.py +9 -0
- ffbb_data_client/models/sexe_class.py +31 -0
- ffbb_data_client/models/source.py +5 -0
- ffbb_data_client/models/status.py +5 -0
- ffbb_data_client/models/team_engagement.py +56 -0
- ffbb_data_client/models/team_ranking.py +108 -0
- ffbb_data_client/models/terrains_categorie_championnat_3x3_libelle.py +5 -0
- ffbb_data_client/models/terrains_facet_distribution.py +41 -0
- ffbb_data_client/models/terrains_facet_stats.py +14 -0
- ffbb_data_client/models/terrains_hit.py +223 -0
- ffbb_data_client/models/terrains_multi_search_query.py +42 -0
- ffbb_data_client/models/terrains_name.py +5 -0
- ffbb_data_client/models/terrains_sexe_enum.py +7 -0
- ffbb_data_client/models/terrains_storage.py +5 -0
- ffbb_data_client/models/tournoi_type_class.py +35 -0
- ffbb_data_client/models/tournoi_type_enum.py +7 -0
- ffbb_data_client/models/tournoi_types_3x3.py +43 -0
- ffbb_data_client/models/tournoi_types_3x3_libelle.py +60 -0
- ffbb_data_client/models/tournoi_types_3x3_libelle_enum.py +10 -0
- ffbb_data_client/models/tournois_facet_distribution.py +41 -0
- ffbb_data_client/models/tournois_facet_stats.py +14 -0
- ffbb_data_client/models/tournois_hit.py +132 -0
- ffbb_data_client/models/tournois_hit_type.py +5 -0
- ffbb_data_client/models/tournois_libelle.py +7 -0
- ffbb_data_client/models/tournois_multi_search_query.py +40 -0
- ffbb_data_client/models/type_association.py +23 -0
- ffbb_data_client/models/type_association_libelle.py +30 -0
- ffbb_data_client/models/type_class.py +23 -0
- ffbb_data_client/models/type_competition.py +8 -0
- ffbb_data_client/models/type_competition_generique.py +31 -0
- ffbb_data_client/models/type_enum.py +7 -0
- ffbb_data_client/models/type_league.py +6 -0
- ffbb_data_client/py.typed +0 -0
- ffbb_data_client/utils/__init__.py +27 -0
- ffbb_data_client/utils/cache_manager.py +393 -0
- ffbb_data_client/utils/converter_utils.py +329 -0
- ffbb_data_client/utils/input_validation.py +360 -0
- ffbb_data_client/utils/retry_utils.py +478 -0
- ffbb_data_client/utils/secure_logging.py +153 -0
- ffbb_data_client/utils/token_manager.py +115 -0
- ffbb_data_client-2.0.0.dist-info/METADATA +339 -0
- ffbb_data_client-2.0.0.dist-info/RECORD +207 -0
- ffbb_data_client-2.0.0.dist-info/WHEEL +5 -0
- ffbb_data_client-2.0.0.dist-info/licenses/LICENSE.txt +201 -0
- ffbb_data_client-2.0.0.dist-info/top_level.txt +2 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
"""Centralized configuration for FFBB API client."""
|
|
2
|
+
|
|
3
|
+
# API URLs
|
|
4
|
+
API_FFBB_BASE_URL = "https://api.ffbb.app/"
|
|
5
|
+
MEILISEARCH_BASE_URL = "https://meilisearch-prod.ffbb.app/"
|
|
6
|
+
|
|
7
|
+
# HTTP Headers
|
|
8
|
+
DEFAULT_USER_AGENT = "okhttp/4.12.0"
|
|
9
|
+
|
|
10
|
+
# Environment variable names for tokens
|
|
11
|
+
ENV_API_TOKEN = "API_FFBB_APP_BEARER_TOKEN"
|
|
12
|
+
ENV_MEILISEARCH_TOKEN = "MEILISEARCH_BEARER_TOKEN"
|
|
13
|
+
|
|
14
|
+
# API Endpoint Paths (relative to base URL)
|
|
15
|
+
ENDPOINT_CONFIGURATION = "items/configuration"
|
|
16
|
+
ENDPOINT_LIVES = "json/lives.json"
|
|
17
|
+
ENDPOINT_COMPETITIONS = "items/ffbbserver_competitions"
|
|
18
|
+
ENDPOINT_POULES = "items/ffbbserver_poules"
|
|
19
|
+
ENDPOINT_SAISONS = "items/ffbbserver_saisons"
|
|
20
|
+
ENDPOINT_ORGANISMES = "items/ffbbserver_organismes"
|
|
21
|
+
ENDPOINT_RENCONTRES = "items/ffbbserver_rencontres"
|
|
22
|
+
ENDPOINT_ENGAGEMENTS = "items/ffbbserver_engagements"
|
|
23
|
+
ENDPOINT_FORMATIONS = "items/ffbbserver_formations"
|
|
24
|
+
ENDPOINT_ENTRAINEURS = "items/ffbbserver_entraineurs"
|
|
25
|
+
ENDPOINT_COMMUNES = "items/ffbbserver_communes"
|
|
26
|
+
ENDPOINT_OFFICIELS = "items/ffbbserver_officiels"
|
|
27
|
+
ENDPOINT_SALLES = "items/ffbbserver_salles"
|
|
28
|
+
ENDPOINT_TERRAINS = "items/ffbbserver_terrains"
|
|
29
|
+
ENDPOINT_TOURNOIS = "items/ffbbserver_tournois"
|
|
30
|
+
ENDPOINT_PRATIQUES = "items/ffbbnational_pratiques"
|
|
31
|
+
ENDPOINT_SESSIONS = "items/ffbbserver_sessions"
|
|
32
|
+
ENDPOINT_GENIUS_SPORT_MATCHES = "items/genius_sport_matches"
|
|
33
|
+
ENDPOINT_GENIUS_SPORTS_LIVE_LOGS = "items/genius_sports_live_logs"
|
|
34
|
+
ENDPOINT_REMATCH_VIDEOS = "items/rematch_videos"
|
|
35
|
+
ENDPOINT_EDF_ARENAS = "items/edf_arenas"
|
|
36
|
+
ENDPOINT_EDF_CAMPAIGNS = "items/edf_campaigns"
|
|
37
|
+
ENDPOINT_EDF_CITIES = "items/edf_cities"
|
|
38
|
+
ENDPOINT_EDF_COACHES = "items/edf_coaches"
|
|
39
|
+
ENDPOINT_EDF_COMPETITION_TYPES = "items/edf_competition_types"
|
|
40
|
+
ENDPOINT_EDF_COUNTRIES = "items/edf_countries"
|
|
41
|
+
ENDPOINT_EDF_MATCHES = "items/edf_matches"
|
|
42
|
+
ENDPOINT_EDF_OPPONENTS = "items/edf_opponents"
|
|
43
|
+
ENDPOINT_EDF_PLAYERS = "items/edf_players"
|
|
44
|
+
ENDPOINT_EDF_POSITIONS = "items/edf_positions"
|
|
45
|
+
ENDPOINT_EDF_ROSTERS = "items/edf_rosters"
|
|
46
|
+
ENDPOINT_EDF_SELECTION = "items/edf_selection"
|
|
47
|
+
ENDPOINT_EDF_STAFFS = "items/edf_staffs"
|
|
48
|
+
ENDPOINT_EDF_TEAMS = "items/edf_teams"
|
|
49
|
+
ENDPOINT_ASSETS = "assets/"
|
|
50
|
+
ENDPOINT_OPENAPI = "server/specs/oas"
|
|
51
|
+
|
|
52
|
+
# Meilisearch Endpoint Paths
|
|
53
|
+
MEILISEARCH_ENDPOINT_MULTI_SEARCH = "multi-search"
|
|
54
|
+
|
|
55
|
+
# Meilisearch Index UIDs
|
|
56
|
+
MEILISEARCH_INDEX_ORGANISMES = "ffbbserver_organismes"
|
|
57
|
+
MEILISEARCH_INDEX_RENCONTRES = "ffbbserver_rencontres"
|
|
58
|
+
MEILISEARCH_INDEX_TERRAINS = "ffbbserver_terrains"
|
|
59
|
+
MEILISEARCH_INDEX_SALLES = "ffbbserver_salles"
|
|
60
|
+
MEILISEARCH_INDEX_TOURNOIS = "ffbbserver_tournois"
|
|
61
|
+
MEILISEARCH_INDEX_COMPETITIONS = "ffbbserver_competitions"
|
|
62
|
+
MEILISEARCH_INDEX_ENGAGEMENTS = "ffbbserver_engagements"
|
|
63
|
+
MEILISEARCH_INDEX_FORMATIONS = "ffbbserver_formations"
|
|
64
|
+
MEILISEARCH_INDEX_PRATIQUES = "ffbbnational_pratiques"
|
|
65
|
+
MEILISEARCH_INDEX_NEWS = "ffbbsite_news"
|
|
66
|
+
MEILISEARCH_INDEX_YOUTUBE_VIDEOS = "youtube_videos"
|
|
67
|
+
MEILISEARCH_INDEX_RSS = "ffbbnational_rss"
|
|
68
|
+
MEILISEARCH_INDEX_GALERIES = "ffbbnational_galeries"
|
|
69
|
+
|
|
70
|
+
MEILISEARCH_INDEX_UIDS = [
|
|
71
|
+
MEILISEARCH_INDEX_ORGANISMES,
|
|
72
|
+
MEILISEARCH_INDEX_RENCONTRES,
|
|
73
|
+
MEILISEARCH_INDEX_TERRAINS,
|
|
74
|
+
MEILISEARCH_INDEX_SALLES,
|
|
75
|
+
MEILISEARCH_INDEX_TOURNOIS,
|
|
76
|
+
MEILISEARCH_INDEX_COMPETITIONS,
|
|
77
|
+
MEILISEARCH_INDEX_ENGAGEMENTS,
|
|
78
|
+
MEILISEARCH_INDEX_FORMATIONS,
|
|
79
|
+
MEILISEARCH_INDEX_PRATIQUES,
|
|
80
|
+
MEILISEARCH_INDEX_NEWS,
|
|
81
|
+
MEILISEARCH_INDEX_YOUTUBE_VIDEOS,
|
|
82
|
+
MEILISEARCH_INDEX_RSS,
|
|
83
|
+
MEILISEARCH_INDEX_GALERIES,
|
|
84
|
+
]
|
|
85
|
+
|
|
86
|
+
# Meilisearch Default Facets per Index
|
|
87
|
+
MEILISEARCH_FACETS_ORGANISMES = [
|
|
88
|
+
"type_association.libelle",
|
|
89
|
+
"type",
|
|
90
|
+
"labellisation",
|
|
91
|
+
"offresPratiques",
|
|
92
|
+
]
|
|
93
|
+
MEILISEARCH_FACETS_RENCONTRES = [
|
|
94
|
+
"competitionId.categorie.code",
|
|
95
|
+
"competitionId.typeCompetition",
|
|
96
|
+
"niveau",
|
|
97
|
+
"competitionId.sexe",
|
|
98
|
+
"organisateur.nom",
|
|
99
|
+
"organisateur.id",
|
|
100
|
+
"competitionId.nomExtended",
|
|
101
|
+
]
|
|
102
|
+
MEILISEARCH_FACETS_TOURNOIS = [
|
|
103
|
+
"sexe",
|
|
104
|
+
"tournoiTypes3x3.libelle",
|
|
105
|
+
"tournoiType",
|
|
106
|
+
]
|
|
107
|
+
MEILISEARCH_FACETS_PRATIQUES = [
|
|
108
|
+
"label",
|
|
109
|
+
"type",
|
|
110
|
+
]
|
|
111
|
+
MEILISEARCH_FACETS_ENGAGEMENTS = [
|
|
112
|
+
"clubPro",
|
|
113
|
+
"idCompetition.categorie.code",
|
|
114
|
+
"idCompetition.categorie.libelle",
|
|
115
|
+
"idCompetition.code",
|
|
116
|
+
"idCompetition.nom",
|
|
117
|
+
"idCompetition.sexe",
|
|
118
|
+
"idPoule.nom",
|
|
119
|
+
"niveau.code",
|
|
120
|
+
"niveau.libelle",
|
|
121
|
+
]
|
|
122
|
+
MEILISEARCH_FACETS_FORMATIONS = [
|
|
123
|
+
"date_end_formatted",
|
|
124
|
+
"date_start_formatted",
|
|
125
|
+
"domain",
|
|
126
|
+
"mode",
|
|
127
|
+
"place",
|
|
128
|
+
"places",
|
|
129
|
+
"postal_code",
|
|
130
|
+
"postal_codes",
|
|
131
|
+
"theme",
|
|
132
|
+
"type",
|
|
133
|
+
]
|
|
134
|
+
MEILISEARCH_FACETS_NEWS = [
|
|
135
|
+
"category",
|
|
136
|
+
"categories",
|
|
137
|
+
"tags",
|
|
138
|
+
"type",
|
|
139
|
+
]
|
|
140
|
+
MEILISEARCH_FACETS_YOUTUBE_VIDEOS = [
|
|
141
|
+
"channelTitle",
|
|
142
|
+
"tags",
|
|
143
|
+
"type",
|
|
144
|
+
]
|
|
145
|
+
MEILISEARCH_FACETS_RSS = [
|
|
146
|
+
"categories",
|
|
147
|
+
"tags",
|
|
148
|
+
"type",
|
|
149
|
+
]
|
|
150
|
+
MEILISEARCH_FACETS_GALERIES = [
|
|
151
|
+
"tags",
|
|
152
|
+
"type",
|
|
153
|
+
]
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"""Packaged FFBB API discovery artefacts."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import json
|
|
6
|
+
from importlib import resources
|
|
7
|
+
from typing import Any, Literal
|
|
8
|
+
|
|
9
|
+
DiscoveryArtefactName = Literal[
|
|
10
|
+
"collections.json",
|
|
11
|
+
"endpoint_discovery.json",
|
|
12
|
+
"indexes.json",
|
|
13
|
+
"openapi.json",
|
|
14
|
+
"openapi_full.json",
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def load_discovery_artefact(name: DiscoveryArtefactName) -> dict[str, Any]:
|
|
19
|
+
"""Load a packaged FFBB API discovery artefact as JSON."""
|
|
20
|
+
return json.loads(
|
|
21
|
+
resources.files(__package__).joinpath(name).read_text(encoding="utf-8")
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
__all__ = ["DiscoveryArtefactName", "load_discovery_artefact"]
|