baobab-altered-api 1.0.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.
- baobab_altered_api-1.0.0/.gitignore +405 -0
- baobab_altered_api-1.0.0/CHANGELOG.md +65 -0
- baobab_altered_api-1.0.0/LICENSE +21 -0
- baobab_altered_api-1.0.0/PKG-INFO +102 -0
- baobab_altered_api-1.0.0/README.md +68 -0
- baobab_altered_api-1.0.0/pyproject.toml +122 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/__init__.py +33 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/auth/__init__.py +5 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/auth/altered_auth_factory.py +36 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/clients/__init__.py +17 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/clients/altered_client.py +137 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/clients/api_client_config_alignment.py +35 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/clients/async_altered_client.py +141 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/clients/transport_port_validator.py +39 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/config/__init__.py +17 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/config/altered_api_client_config_builder.py +81 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/config/altered_api_config.py +193 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/config/altered_locale.py +27 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/config/altered_network_parameter_validator.py +124 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/config/env_loader.py +135 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/exceptions/__init__.py +41 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/exceptions/altered_api_error.py +44 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/exceptions/altered_auth_error.py +29 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/exceptions/altered_config_error.py +8 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/exceptions/altered_forbidden_error.py +26 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/exceptions/altered_http_error.py +13 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/exceptions/altered_json_decode_error.py +31 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/exceptions/altered_mapping_error.py +29 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/exceptions/altered_network_error.py +26 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/exceptions/altered_not_found_error.py +26 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/exceptions/altered_open_data_download_error.py +26 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/exceptions/altered_rate_limit_error.py +38 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/exceptions/altered_service_unavailable_error.py +30 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/exceptions/altered_timeout_error.py +26 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/exceptions/altered_transport_error.py +29 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/exceptions/error_mapper.py +136 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/internal/__init__.py +1 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/internal/altered_api_logger.py +65 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/internal/altered_log_redactor.py +144 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/internal/open_data_file_io.py +61 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/internal/query_params.py +144 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/mappers/__init__.py +13 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/mappers/altered_cards_json_mapper.py +94 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/mappers/altered_common_models_json_mapper.py +321 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/mappers/altered_deck_json_mapper.py +62 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/mappers/altered_marketplace_offer_json_mapper.py +60 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/mappers/altered_open_data_json_mapper.py +132 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/mappers/altered_pagination_json_mapper.py +92 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/mappers/altered_referentials_json_mapper.py +89 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/models/__init__.py +25 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/models/altered_card_summary.py +44 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/models/altered_card_type_reference.py +16 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/models/altered_deck.py +38 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/models/altered_faction.py +33 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/models/altered_faction_reference.py +18 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/models/altered_image.py +29 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/models/altered_json_payload.py +19 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/models/altered_localized_label.py +29 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/models/altered_marketplace_offer.py +29 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/models/altered_open_data_card_entry.py +25 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/models/altered_open_data_faction_node.py +22 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/models/altered_open_data_set_node.py +22 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/models/altered_open_data_snapshot.py +37 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/models/altered_page.py +29 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/models/altered_pagination_params.py +58 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/models/altered_rarity.py +29 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/models/altered_rarity_reference.py +16 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/models/altered_ref.py +27 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/models/altered_set.py +33 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/models/altered_set_reference.py +25 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/py.typed +0 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/resources/__init__.py +37 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/resources/altered_api_paths.py +33 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/resources/async_cards_resource.py +113 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/resources/async_decks_resource.py +34 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/resources/async_marketplace_resource.py +21 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/resources/async_open_data_downloader.py +78 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/resources/async_open_data_resource.py +86 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/resources/async_referentials_resource.py +62 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/resources/card_search_filters.py +65 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/resources/cards_resource.py +146 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/resources/decks_resource.py +34 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/resources/marketplace_resource.py +63 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/resources/open_data_access.py +9 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/resources/open_data_catalog.py +92 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/resources/open_data_downloader.py +99 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/resources/open_data_reader.py +37 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/resources/open_data_resource.py +89 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/resources/referential_list_response_parser.py +43 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/resources/referentials_resource.py +62 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/transports/__init__.py +13 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/transports/altered_async_transport.py +144 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/transports/altered_rate_limit_middleware.py +91 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/transports/altered_rate_limit_middleware_async.py +88 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/transports/altered_sync_transport.py +137 -0
- baobab_altered_api-1.0.0/src/baobab_altered_api/transports/response_handler.py +92 -0
- baobab_altered_api-1.0.0/tests/__init__.py +1 -0
- baobab_altered_api-1.0.0/tests/conftest.py +34 -0
- baobab_altered_api-1.0.0/tests/fakes/__init__.py +11 -0
- baobab_altered_api-1.0.0/tests/fakes/fake_async_transport.py +109 -0
- baobab_altered_api-1.0.0/tests/fakes/fake_sync_transport.py +109 -0
- baobab_altered_api-1.0.0/tests/fixtures/README.md +15 -0
- baobab_altered_api-1.0.0/tests/fixtures/json/card_minimal.json +1 -0
- baobab_altered_api-1.0.0/tests/fixtures/json/card_summary_full.json +11 -0
- baobab_altered_api-1.0.0/tests/fixtures/json/card_summary_minimal.json +1 -0
- baobab_altered_api-1.0.0/tests/fixtures/json/card_summary_shorthand.json +5 -0
- baobab_altered_api-1.0.0/tests/fixtures/json/deck_minimal.json +5 -0
- baobab_altered_api-1.0.0/tests/fixtures/json/error_404.json +5 -0
- baobab_altered_api-1.0.0/tests/fixtures/json/market_offer_minimal.json +6 -0
- baobab_altered_api-1.0.0/tests/fixtures/json/page_cards.json +11 -0
- baobab_altered_api-1.0.0/tests/fixtures/json_loader.py +21 -0
- baobab_altered_api-1.0.0/tests/fixtures/open_data/minimal_snapshot.json +19 -0
- baobab_altered_api-1.0.0/tests/fixtures/open_data/open_data_indexed.json +33 -0
- baobab_altered_api-1.0.0/tests/fixtures/open_data/open_data_minimal.json +7 -0
- baobab_altered_api-1.0.0/tests/integration/test_open_data_live_optional.py +25 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/auth/test_altered_auth_factory.py +54 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/clients/test_altered_client.py +83 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/clients/test_async_altered_client.py +74 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/clients/test_client_injection.py +181 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/config/test_altered_api_client_config_builder.py +36 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/config/test_altered_api_config.py +118 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/config/test_altered_api_config_retry_limits.py +25 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/config/test_altered_locale.py +26 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/config/test_altered_network_parameter_validator.py +84 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/config/test_env_loader.py +113 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/config/test_secret_redaction.py +39 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/exceptions/test_altered_http_error.py +16 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/exceptions/test_error_mapper.py +127 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/exceptions/test_exceptions.py +73 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/internal/test_altered_api_logger.py +76 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/internal/test_altered_log_redactor.py +82 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/internal/test_open_data_file_io.py +30 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/internal/test_query_params.py +124 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/mappers/test_altered_cards_json_mapper.py +17 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/mappers/test_altered_pagination_json_mapper.py +49 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/mappers/test_json_mappers.py +123 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/mappers/test_referentials_and_deck_mappers.py +58 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/models/test_altered_card_summary.py +53 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/models/test_altered_faction.py +35 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/models/test_altered_image.py +28 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/models/test_altered_localized_label.py +31 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/models/test_altered_page.py +39 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/models/test_altered_pagination_params.py +44 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/models/test_altered_rarity.py +28 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/models/test_altered_ref.py +27 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/models/test_altered_set.py +35 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/resources/test_async_cards_resource.py +36 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/resources/test_async_decks_resource.py +52 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/resources/test_async_open_data_resource.py +91 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/resources/test_async_resources.py +51 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/resources/test_card_search_filters.py +28 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/resources/test_cards_pagination.py +62 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/resources/test_cards_resource.py +74 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/resources/test_decks_and_marketplace.py +46 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/resources/test_marketplace_read_only_contract.py +47 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/resources/test_open_data_catalog.py +71 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/resources/test_open_data_downloader.py +97 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/resources/test_open_data_reader.py +26 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/resources/test_open_data_resource.py +100 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/resources/test_referentials_resource.py +28 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/resources/test_resources_extra.py +75 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/test_fixtures_json.py +46 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/test_imports.py +74 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/test_network_guard.py +16 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/test_package_import.py +27 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/test_package_metadata.py +64 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/test_package_structure.py +30 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/test_public_exports.py +54 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/test_transverse_robustness.py +111 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/transports/test_altered_async_transport.py +229 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/transports/test_altered_sync_transport.py +214 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/transports/test_rate_limit.py +111 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/transports/test_response_handler.py +217 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/transports/test_retries_timeouts.py +130 -0
- baobab_altered_api-1.0.0/tests/unit/baobab_altered_api/transports/test_transport_lifecycle.py +108 -0
- baobab_altered_api-1.0.0/tests/unit/fakes/test_fake_async_transport.py +49 -0
- baobab_altered_api-1.0.0/tests/unit/fakes/test_fake_sync_transport.py +122 -0
|
@@ -0,0 +1,405 @@
|
|
|
1
|
+
# Created by https://www.toptal.com/developers/gitignore/api/python,pycharm,pycharm+all,pycharm+iml
|
|
2
|
+
# Edit at https://www.toptal.com/developers/gitignore?templates=python,pycharm,pycharm+all,pycharm+iml
|
|
3
|
+
|
|
4
|
+
### PyCharm ###
|
|
5
|
+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
|
6
|
+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
|
7
|
+
|
|
8
|
+
# User-specific stuff
|
|
9
|
+
.idea/**/workspace.xml
|
|
10
|
+
.idea/**/tasks.xml
|
|
11
|
+
.idea/**/usage.statistics.xml
|
|
12
|
+
.idea/**/dictionaries
|
|
13
|
+
.idea/**/shelf
|
|
14
|
+
|
|
15
|
+
# AWS User-specific
|
|
16
|
+
.idea/**/aws.xml
|
|
17
|
+
|
|
18
|
+
# Generated files
|
|
19
|
+
.idea/**/contentModel.xml
|
|
20
|
+
|
|
21
|
+
# Sensitive or high-churn files
|
|
22
|
+
.idea/**/dataSources/
|
|
23
|
+
.idea/**/dataSources.ids
|
|
24
|
+
.idea/**/dataSources.local.xml
|
|
25
|
+
.idea/**/sqlDataSources.xml
|
|
26
|
+
.idea/**/dynamic.xml
|
|
27
|
+
.idea/**/uiDesigner.xml
|
|
28
|
+
.idea/**/dbnavigator.xml
|
|
29
|
+
|
|
30
|
+
# Gradle
|
|
31
|
+
.idea/**/gradle.xml
|
|
32
|
+
.idea/**/libraries
|
|
33
|
+
|
|
34
|
+
# Gradle and Maven with auto-import
|
|
35
|
+
# When using Gradle or Maven with auto-import, you should exclude module files,
|
|
36
|
+
# since they will be recreated, and may cause churn. Uncomment if using
|
|
37
|
+
# auto-import.
|
|
38
|
+
# .idea/artifacts
|
|
39
|
+
# .idea/compiler.xml
|
|
40
|
+
# .idea/jarRepositories.xml
|
|
41
|
+
# .idea/modules.xml
|
|
42
|
+
# .idea/*.iml
|
|
43
|
+
# .idea/modules
|
|
44
|
+
# *.iml
|
|
45
|
+
# *.ipr
|
|
46
|
+
|
|
47
|
+
# CMake
|
|
48
|
+
cmake-build-*/
|
|
49
|
+
|
|
50
|
+
# Mongo Explorer plugin
|
|
51
|
+
.idea/**/mongoSettings.xml
|
|
52
|
+
|
|
53
|
+
# File-based project format
|
|
54
|
+
*.iws
|
|
55
|
+
|
|
56
|
+
# IntelliJ
|
|
57
|
+
out/
|
|
58
|
+
|
|
59
|
+
# mpeltonen/sbt-idea plugin
|
|
60
|
+
.idea_modules/
|
|
61
|
+
|
|
62
|
+
# JIRA plugin
|
|
63
|
+
atlassian-ide-plugin.xml
|
|
64
|
+
|
|
65
|
+
# Cursive Clojure plugin
|
|
66
|
+
.idea/replstate.xml
|
|
67
|
+
|
|
68
|
+
# SonarLint plugin
|
|
69
|
+
.idea/sonarlint/
|
|
70
|
+
|
|
71
|
+
# Crashlytics plugin (for Android Studio and IntelliJ)
|
|
72
|
+
com_crashlytics_export_strings.xml
|
|
73
|
+
crashlytics.properties
|
|
74
|
+
crashlytics-build.properties
|
|
75
|
+
fabric.properties
|
|
76
|
+
|
|
77
|
+
# Editor-based Rest Client
|
|
78
|
+
.idea/httpRequests
|
|
79
|
+
|
|
80
|
+
# Android studio 3.1+ serialized cache file
|
|
81
|
+
.idea/caches/build_file_checksums.ser
|
|
82
|
+
|
|
83
|
+
### PyCharm Patch ###
|
|
84
|
+
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
|
|
85
|
+
|
|
86
|
+
# *.iml
|
|
87
|
+
# modules.xml
|
|
88
|
+
# .idea/misc.xml
|
|
89
|
+
# *.ipr
|
|
90
|
+
|
|
91
|
+
# Sonarlint plugin
|
|
92
|
+
# https://plugins.jetbrains.com/plugin/7973-sonarlint
|
|
93
|
+
.idea/**/sonarlint/
|
|
94
|
+
|
|
95
|
+
# SonarQube Plugin
|
|
96
|
+
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
|
|
97
|
+
.idea/**/sonarIssues.xml
|
|
98
|
+
|
|
99
|
+
# Markdown Navigator plugin
|
|
100
|
+
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
|
|
101
|
+
.idea/**/markdown-navigator.xml
|
|
102
|
+
.idea/**/markdown-navigator-enh.xml
|
|
103
|
+
.idea/**/markdown-navigator/
|
|
104
|
+
|
|
105
|
+
# Cache file creation bug
|
|
106
|
+
# See https://youtrack.jetbrains.com/issue/JBR-2257
|
|
107
|
+
.idea/$CACHE_FILE$
|
|
108
|
+
|
|
109
|
+
# CodeStream plugin
|
|
110
|
+
# https://plugins.jetbrains.com/plugin/12206-codestream
|
|
111
|
+
.idea/codestream.xml
|
|
112
|
+
|
|
113
|
+
# Azure Toolkit for IntelliJ plugin
|
|
114
|
+
# https://plugins.jetbrains.com/plugin/8053-azure-toolkit-for-intellij
|
|
115
|
+
.idea/**/azureSettings.xml
|
|
116
|
+
|
|
117
|
+
### PyCharm+all ###
|
|
118
|
+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
|
119
|
+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
|
120
|
+
|
|
121
|
+
# User-specific stuff
|
|
122
|
+
|
|
123
|
+
# AWS User-specific
|
|
124
|
+
|
|
125
|
+
# Generated files
|
|
126
|
+
|
|
127
|
+
# Sensitive or high-churn files
|
|
128
|
+
|
|
129
|
+
# Gradle
|
|
130
|
+
|
|
131
|
+
# Gradle and Maven with auto-import
|
|
132
|
+
# When using Gradle or Maven with auto-import, you should exclude module files,
|
|
133
|
+
# since they will be recreated, and may cause churn. Uncomment if using
|
|
134
|
+
# auto-import.
|
|
135
|
+
# .idea/artifacts
|
|
136
|
+
# .idea/compiler.xml
|
|
137
|
+
# .idea/jarRepositories.xml
|
|
138
|
+
# .idea/modules.xml
|
|
139
|
+
# .idea/*.iml
|
|
140
|
+
# .idea/modules
|
|
141
|
+
# *.iml
|
|
142
|
+
# *.ipr
|
|
143
|
+
|
|
144
|
+
# CMake
|
|
145
|
+
|
|
146
|
+
# Mongo Explorer plugin
|
|
147
|
+
|
|
148
|
+
# File-based project format
|
|
149
|
+
|
|
150
|
+
# IntelliJ
|
|
151
|
+
|
|
152
|
+
# mpeltonen/sbt-idea plugin
|
|
153
|
+
|
|
154
|
+
# JIRA plugin
|
|
155
|
+
|
|
156
|
+
# Cursive Clojure plugin
|
|
157
|
+
|
|
158
|
+
# SonarLint plugin
|
|
159
|
+
|
|
160
|
+
# Crashlytics plugin (for Android Studio and IntelliJ)
|
|
161
|
+
|
|
162
|
+
# Editor-based Rest Client
|
|
163
|
+
|
|
164
|
+
# Android studio 3.1+ serialized cache file
|
|
165
|
+
|
|
166
|
+
### PyCharm+all Patch ###
|
|
167
|
+
# Ignore everything but code style settings and run configurations
|
|
168
|
+
# that are supposed to be shared within teams.
|
|
169
|
+
|
|
170
|
+
.idea/*
|
|
171
|
+
|
|
172
|
+
!.idea/codeStyles
|
|
173
|
+
!.idea/runConfigurations
|
|
174
|
+
|
|
175
|
+
### PyCharm+iml ###
|
|
176
|
+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
|
177
|
+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
|
178
|
+
|
|
179
|
+
# User-specific stuff
|
|
180
|
+
|
|
181
|
+
# AWS User-specific
|
|
182
|
+
|
|
183
|
+
# Generated files
|
|
184
|
+
|
|
185
|
+
# Sensitive or high-churn files
|
|
186
|
+
|
|
187
|
+
# Gradle
|
|
188
|
+
|
|
189
|
+
# Gradle and Maven with auto-import
|
|
190
|
+
# When using Gradle or Maven with auto-import, you should exclude module files,
|
|
191
|
+
# since they will be recreated, and may cause churn. Uncomment if using
|
|
192
|
+
# auto-import.
|
|
193
|
+
# .idea/artifacts
|
|
194
|
+
# .idea/compiler.xml
|
|
195
|
+
# .idea/jarRepositories.xml
|
|
196
|
+
# .idea/modules.xml
|
|
197
|
+
# .idea/*.iml
|
|
198
|
+
# .idea/modules
|
|
199
|
+
# *.iml
|
|
200
|
+
# *.ipr
|
|
201
|
+
|
|
202
|
+
# CMake
|
|
203
|
+
|
|
204
|
+
# Mongo Explorer plugin
|
|
205
|
+
|
|
206
|
+
# File-based project format
|
|
207
|
+
|
|
208
|
+
# IntelliJ
|
|
209
|
+
|
|
210
|
+
# mpeltonen/sbt-idea plugin
|
|
211
|
+
|
|
212
|
+
# JIRA plugin
|
|
213
|
+
|
|
214
|
+
# Cursive Clojure plugin
|
|
215
|
+
|
|
216
|
+
# SonarLint plugin
|
|
217
|
+
|
|
218
|
+
# Crashlytics plugin (for Android Studio and IntelliJ)
|
|
219
|
+
|
|
220
|
+
# Editor-based Rest Client
|
|
221
|
+
|
|
222
|
+
# Android studio 3.1+ serialized cache file
|
|
223
|
+
|
|
224
|
+
### PyCharm+iml Patch ###
|
|
225
|
+
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
|
|
226
|
+
|
|
227
|
+
*.iml
|
|
228
|
+
modules.xml
|
|
229
|
+
.idea/misc.xml
|
|
230
|
+
*.ipr
|
|
231
|
+
|
|
232
|
+
### Python ###
|
|
233
|
+
# Byte-compiled / optimized / DLL files
|
|
234
|
+
__pycache__/
|
|
235
|
+
*.py[cod]
|
|
236
|
+
*$py.class
|
|
237
|
+
|
|
238
|
+
# C extensions
|
|
239
|
+
*.so
|
|
240
|
+
|
|
241
|
+
# Distribution / packaging
|
|
242
|
+
.Python
|
|
243
|
+
build/
|
|
244
|
+
develop-eggs/
|
|
245
|
+
dist/
|
|
246
|
+
downloads/
|
|
247
|
+
eggs/
|
|
248
|
+
.eggs/
|
|
249
|
+
lib/
|
|
250
|
+
lib64/
|
|
251
|
+
parts/
|
|
252
|
+
sdist/
|
|
253
|
+
var/
|
|
254
|
+
wheels/
|
|
255
|
+
share/python-wheels/
|
|
256
|
+
*.egg-info/
|
|
257
|
+
.installed.cfg
|
|
258
|
+
*.egg
|
|
259
|
+
MANIFEST
|
|
260
|
+
|
|
261
|
+
# PyInstaller
|
|
262
|
+
# Usually these files are written by a python script from a template
|
|
263
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
264
|
+
*.manifest
|
|
265
|
+
*.spec
|
|
266
|
+
|
|
267
|
+
# Installer logs
|
|
268
|
+
pip-log.txt
|
|
269
|
+
pip-delete-this-directory.txt
|
|
270
|
+
|
|
271
|
+
# Unit test / coverage reports
|
|
272
|
+
.my_cache/
|
|
273
|
+
htmlcov/
|
|
274
|
+
.tox/
|
|
275
|
+
.nox/
|
|
276
|
+
.coverage
|
|
277
|
+
.coverage.*
|
|
278
|
+
.cache
|
|
279
|
+
nosetests.xml
|
|
280
|
+
coverage.xml
|
|
281
|
+
*.cover
|
|
282
|
+
*.py,cover
|
|
283
|
+
.hypothesis/
|
|
284
|
+
.pytest_cache/
|
|
285
|
+
cover/
|
|
286
|
+
|
|
287
|
+
# Translations
|
|
288
|
+
*.mo
|
|
289
|
+
*.pot
|
|
290
|
+
|
|
291
|
+
# Django stuff:
|
|
292
|
+
*.log
|
|
293
|
+
local_settings.py
|
|
294
|
+
db.sqlite3
|
|
295
|
+
db.sqlite3-journal
|
|
296
|
+
|
|
297
|
+
# Flask stuff:
|
|
298
|
+
instance/
|
|
299
|
+
.webassets-cache
|
|
300
|
+
|
|
301
|
+
# Scrapy stuff:
|
|
302
|
+
.scrapy
|
|
303
|
+
|
|
304
|
+
# Sphinx documentation
|
|
305
|
+
docs/_build/
|
|
306
|
+
|
|
307
|
+
# PyBuilder
|
|
308
|
+
.pybuilder/
|
|
309
|
+
target/
|
|
310
|
+
|
|
311
|
+
# Jupyter Notebook
|
|
312
|
+
.ipynb_checkpoints
|
|
313
|
+
|
|
314
|
+
# IPython
|
|
315
|
+
profile_default/
|
|
316
|
+
ipython_config.py
|
|
317
|
+
|
|
318
|
+
# pyenv
|
|
319
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
320
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
321
|
+
# .python-version
|
|
322
|
+
|
|
323
|
+
# pipenv
|
|
324
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
325
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
326
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
327
|
+
# install all needed dependencies.
|
|
328
|
+
#Pipfile.lock
|
|
329
|
+
|
|
330
|
+
# poetry
|
|
331
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
332
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
333
|
+
# commonly ignored for libraries.
|
|
334
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
335
|
+
#poetry.lock
|
|
336
|
+
|
|
337
|
+
# pdm
|
|
338
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
339
|
+
#pdm.lock
|
|
340
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
341
|
+
# in version control.
|
|
342
|
+
# https://pdm.fming.dev/#use-with-ide
|
|
343
|
+
.pdm.toml
|
|
344
|
+
|
|
345
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
346
|
+
__pypackages__/
|
|
347
|
+
|
|
348
|
+
# Celery stuff
|
|
349
|
+
celerybeat-schedule
|
|
350
|
+
celerybeat.pid
|
|
351
|
+
|
|
352
|
+
# SageMath parsed files
|
|
353
|
+
*.sage.py
|
|
354
|
+
|
|
355
|
+
# Environments
|
|
356
|
+
.env
|
|
357
|
+
.venv
|
|
358
|
+
env/
|
|
359
|
+
venv/
|
|
360
|
+
ENV/
|
|
361
|
+
env.bak/
|
|
362
|
+
venv.bak/
|
|
363
|
+
|
|
364
|
+
# Spyder project settings
|
|
365
|
+
.spyderproject
|
|
366
|
+
.spyproject
|
|
367
|
+
|
|
368
|
+
# Rope project settings
|
|
369
|
+
.ropeproject
|
|
370
|
+
|
|
371
|
+
# mkdocs documentation
|
|
372
|
+
/site
|
|
373
|
+
|
|
374
|
+
# mypy
|
|
375
|
+
.mypy_cache/
|
|
376
|
+
.dmypy.json
|
|
377
|
+
dmypy.json
|
|
378
|
+
|
|
379
|
+
# Pyre type checker
|
|
380
|
+
.pyre/
|
|
381
|
+
|
|
382
|
+
# pytype static type analyzer
|
|
383
|
+
.pytype/
|
|
384
|
+
|
|
385
|
+
# Cython debug symbols
|
|
386
|
+
cython_debug/
|
|
387
|
+
|
|
388
|
+
# PyCharm
|
|
389
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
390
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
391
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
392
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
393
|
+
#.idea/
|
|
394
|
+
|
|
395
|
+
### Python Patch ###
|
|
396
|
+
# Poetry local configuration file - https://python-poetry.org/docs/configuration/#local-configuration
|
|
397
|
+
poetry.toml
|
|
398
|
+
|
|
399
|
+
# ruff
|
|
400
|
+
.ruff_cache/
|
|
401
|
+
|
|
402
|
+
# LSP config files
|
|
403
|
+
pyrightconfig.json
|
|
404
|
+
|
|
405
|
+
# End of https://www.toptal.com/developers/gitignore/api/python,pycharm,pycharm+all,pycharm+iml
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Toutes les modifications notables de ce projet seront documentées dans ce fichier.
|
|
4
|
+
|
|
5
|
+
Le format est inspiré de [Keep a Changelog](https://keepachangelog.com/fr/1.1.0/).
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [1.0.0] - 2026-05-17
|
|
10
|
+
|
|
11
|
+
Première release stable : portefeuille FEAT-001 à FEAT-012 livré (clients sync/async, ressources métier, Open Data, robustesse transverse, documentation et tests ≥ 90 % de couverture).
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- Alignement cahier des charges Open Data : ``OpenDataResource``, ``AsyncOpenDataResource``, hiérarchie Set→Faction→Carte, ``fetch_snapshot`` / ``load_from_file`` / ``iter_cards`` / ``save_snapshot``, ``OpenDataFileIo``, ``AsyncAlteredClient.open_data``.
|
|
16
|
+
- Documentation : ``docs/decks.md``, ``docs/api_observations/decks.md``, ``marketplace.md``, ``auth.md`` ; index endpoints complété.
|
|
17
|
+
- Test d'intégration optionnel Open Data (``@pytest.mark.integration``).
|
|
18
|
+
|
|
19
|
+
- FEAT-012 : ``docs/development.md``, ``docs/guide_sync.md``, ``docs/guide_async.md``, ``docs/release_checklist.md``, index ``docs/api_observations/endpoints/``.
|
|
20
|
+
- FEAT-010 : ``AlteredMarketplaceOffer``, mapper et ``MarketplaceResource`` / ``AsyncMarketplaceResource`` (lecture seule).
|
|
21
|
+
- FEAT-009 : ``AlteredDeck``, mapper et ``DecksResource`` / ``AsyncDecksResource``.
|
|
22
|
+
- FEAT-008 : ``AlteredOpenDataSnapshot``, ``OpenDataReader``, ``OpenDataDownloader``, ``OpenDataCatalog``, ``OpenDataAccess`` et propriété ``AlteredClient.open_data`` ; fixtures ``tests/fixtures/open_data/`` ; ``docs/open_data.md``, ``docs/api_observations/open_data.md``.
|
|
23
|
+
- FEAT-009 : tests dédiés ``test_async_decks_resource.py`` (``AsyncDecksResource``).
|
|
24
|
+
- FEAT-010 : ``docs/marketplace.md``, section marketplace dans ``docs/security.md``, test contractuel ``test_marketplace_read_only_contract.py``.
|
|
25
|
+
- FEAT-007 : modèles référentiels, ``ReferentialsResource`` / ``AsyncReferentialsResource`` ; ``docs/api_observations/references.md``.
|
|
26
|
+
- FEAT-006 : ``CardSearchFilters``, ``CardsResource`` / ``AsyncCardsResource``, itération paginée contrôlée ; ``docs/cards.md``, ``docs/api_observations/cards.md``.
|
|
27
|
+
- FEAT-005 (`BL-005-005`) : corpus fixtures JSON + ``tests/fixtures/README.md``, ``json_loader``, tests parseabilité.
|
|
28
|
+
- FEAT-005 (`BL-005-004`) : builder interne ``QueryParamsBuilder`` (`internal/query_params.py`) pour sérialiser filtres, tris et ``AlteredPaginationParams`` vers ``dict[str, str]`` stable ; ``docs/api_observations/query_params.md``.
|
|
29
|
+
- FEAT-005 (`BL-005-003`) : ``AlteredPaginationParams``, ``AlteredPage`` (générique), ``AlteredPaginationJsonMapper`` ; ``docs/api_observations/pagination.md``.
|
|
30
|
+
- FEAT-005 (`BL-005-002`) : ``AlteredCommonModelsJsonMapper`` (résumé carte, faction, extension, rareté, image, libellé localisé, ref) ; tolérance alias JSON et ``AlteredMappingError`` ; fixtures ``tests/fixtures/json/*.json`` ; ``docs/api_observations/mappers.md``.
|
|
31
|
+
- FEAT-005 (`BL-005-001`) : modèles communs immuables `AlteredRef`, `AlteredImage`, `AlteredLocalizedLabel`, `AlteredFaction`, `AlteredSet`, `AlteredRarity`, `AlteredCardSummary` ; exports `models.__all__` ; hypothèses documentées dans `docs/api_observations/models.md`.
|
|
32
|
+
- FEAT-011 (`BL-011-006`) : tests transverses `test_transverse_robustness.py` ; section associée dans `docs/testing.md`.
|
|
33
|
+
- FEAT-011 (`BL-011-005`) : middlewares sync/async `AlteredRateLimitMiddleware` / `AlteredRateLimitMiddlewareAsync` sur `ApiClientConfig` si `rate_limit_per_second` ; tests `test_rate_limit.py` ; `docs/security.md` (débit / 429), `docs/configuration.md`, `docs/clients.md`.
|
|
34
|
+
- FEAT-011 (`BL-011-004`) : timeout global propagé au transport HTTPX par défaut ; `retry_jitter` + plafond `MAX_RETRY_ATTEMPTS` (50) ; `RetryPolicy` du socle alignée ; variable `ALTERED_API_RETRY_JITTER` ; tests `test_retries_timeouts.py`.
|
|
35
|
+
- FEAT-011 (`BL-011-001`) : exceptions `AlteredAuthError`, `AlteredForbiddenError`, `AlteredServiceUnavailableError`, `AlteredTransportError`, `AlteredMappingError` ; tests `test_exceptions.py` ; exports `exceptions.__all__`.
|
|
36
|
+
- FEAT-011 (`BL-011-003`) : logger `baobab_altered_api` (opt-in, sans `basicConfig`) ; `AlteredLogRedactor` / `AlteredApiLogger` ; journaux HTTP minimaux dans les transports sync/async ; tests `internal/test_*` et non-fuite dans `caplog`.
|
|
37
|
+
- FEAT-011 (`BL-011-002`) : `ErrorMapper` (HTTP → exceptions Altered, transport timeout / réseau) ; intégration dans `AlteredTransportResponseHandler` ; `AlteredServiceUnavailableError` accepte le code HTTP 5xx réel ; tests `test_error_mapper.py` et ajustements `test_response_handler.py`.
|
|
38
|
+
- FEAT-004 (BL-004-001, BL-004-002) : clients publics `AlteredClient` et `AsyncAlteredClient` (façade + `http`, context managers, transport par défaut ou injecté) ; exports package racine.
|
|
39
|
+
- FEAT-004 (BL-004-003) : injection optionnelle `api_client_config` sur `AlteredClient` / `AsyncAlteredClient` (alignement `base_url` avec `AlteredApiConfig`, garde-fous transport sync/async, `ApiClientConfigAlignment`, `TransportPortValidator`) ; tests `test_client_injection.py`.
|
|
40
|
+
- FEAT-004 (BL-004-004) : exports publics documentés pour `baobab_altered_api.clients` (`__all__` typé) ; tests `test_public_exports.py` ; clients toujours re-exportés depuis le package racine.
|
|
41
|
+
- FEAT-004 (BL-004-005) : guide `docs/clients.md` (usages minimaux sync/async, injection, pas d’endpoint présenté comme stable).
|
|
42
|
+
- FEAT-003 (BL-003-005) : fakes `tests.fakes.FakeSyncTransport` / `FakeAsyncTransport` (routage méthode + chemin + params, historique, défaut) ; documentation `docs/testing.md` ; `source-roots` Pylint pour les imports `tests.*`.
|
|
43
|
+
- FEAT-003 (BL-003-004) : `AlteredTransportResponseHandler`, `AlteredJsonPayload`, exceptions typées (`AlteredApiError`, 404, 429, timeout, réseau, JSON) ; amorce FEAT-011 pour la hiérarchie d’erreurs.
|
|
44
|
+
- FEAT-003 (BL-003-003) : fermeture idempotente, `with` / `async with` sur `AlteredSyncTransport` et `AlteredAsyncTransport` ; tests de cycle de vie dédiés.
|
|
45
|
+
- Docstrings Sphinx complètes sur le validateur réseau, `__repr__` / `__str__` de
|
|
46
|
+
`AlteredApiConfig` et `__repr__` de `AlteredAuthFactory` ; jeton Bearer de test
|
|
47
|
+
`baobab-api-token` dans les tests et exemples de documentation.
|
|
48
|
+
- FEAT-003 (BL-003-002) : transport asynchrone `AlteredAsyncTransport` (HTTPX + port `AsyncTransport`).
|
|
49
|
+
- FEAT-003 (BL-003-001) : transport synchrone `AlteredSyncTransport` (HTTPX + port `SyncTransport`) et exception `AlteredHttpError`.
|
|
50
|
+
- FEAT-002 : configuration immuable `AlteredApiConfig`, chargement explicite `load_config_from_env`, validation réseau, fabrique d’authentification `AlteredAuthFactory` et construction vers le socle `baobab-api-call`.
|
|
51
|
+
- `AlteredApiConfig.from_environment` (alias documentaire), variables d’environnement `ALTERED_API_RETRY_BACKOFF_SECONDS` et `ALTERED_API_RATE_LIMIT_PER_SECOND`.
|
|
52
|
+
- Documentation `docs/configuration.md`, `docs/authentication.md` et `docs/security.md` (variables d’environnement, bonnes pratiques secrets).
|
|
53
|
+
- Socle packaging PEP 621 (`hatchling`) pour la distribution `baobab-altered-api`.
|
|
54
|
+
- Arborescence applicative `src/baobab_altered_api` avec sous-packages (`config`, `clients`, `resources`, etc.).
|
|
55
|
+
- Tests unitaires initiaux, garde anti-réseau par défaut et documentation de test.
|
|
56
|
+
- Marqueur PEP 561 via `py.typed`.
|
|
57
|
+
|
|
58
|
+
### Documentation
|
|
59
|
+
|
|
60
|
+
- Pilotage portefeuille : `BOARD.md` étendu (`FEAT-005`–`FEAT-012`), décision **DEC-0001** dans `docs/ia_workflow/communication/003_decision_log.md`, fiche **NO GO** levée (`docs/ia_workflow/no_go/REQUEST_ALL_BACKLOGS_SINGLE_PASS/no_go_1.md`).
|
|
61
|
+
|
|
62
|
+
### Fixed
|
|
63
|
+
|
|
64
|
+
- Garde réseau des tests : les sockets ``AF_UNIX`` utilisés en interne par ``asyncio`` ne sont plus bloqués (nécessaire aux tests async / ``pytest-asyncio``).
|
|
65
|
+
- Dépendance dev ``pytest-asyncio>=1.3`` : suppression des warnings ``asyncio.get_event_loop_policy`` sous Python 3.14.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Contributeurs baobab-altered-api
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: baobab-altered-api
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Client Python typé pour l’API publique Altered TCG, bâti sur baobab-api-call.
|
|
5
|
+
Author: Contributeurs baobab-altered-api
|
|
6
|
+
License: MIT
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Keywords: altered,api,client,httpx,tcg
|
|
9
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
10
|
+
Classifier: Intended Audience :: Developers
|
|
11
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
+
Classifier: Typing :: Typed
|
|
16
|
+
Requires-Python: >=3.11
|
|
17
|
+
Requires-Dist: baobab-api-call<3.0,>=2.1.0
|
|
18
|
+
Requires-Dist: httpx<1,>=0.27
|
|
19
|
+
Provides-Extra: dev
|
|
20
|
+
Requires-Dist: bandit<2,>=1.7; extra == 'dev'
|
|
21
|
+
Requires-Dist: black<26,>=24; extra == 'dev'
|
|
22
|
+
Requires-Dist: build<2,>=1.2; extra == 'dev'
|
|
23
|
+
Requires-Dist: coverage[toml]<8,>=7; extra == 'dev'
|
|
24
|
+
Requires-Dist: flake8-pyproject<2,>=1.2; extra == 'dev'
|
|
25
|
+
Requires-Dist: flake8<8,>=7; extra == 'dev'
|
|
26
|
+
Requires-Dist: mypy<2,>=1.10; extra == 'dev'
|
|
27
|
+
Requires-Dist: pylint<5,>=3; extra == 'dev'
|
|
28
|
+
Requires-Dist: pytest-asyncio<2,>=1.3; extra == 'dev'
|
|
29
|
+
Requires-Dist: pytest-cov<6,>=4; extra == 'dev'
|
|
30
|
+
Requires-Dist: pytest<9,>=7; extra == 'dev'
|
|
31
|
+
Provides-Extra: docs
|
|
32
|
+
Requires-Dist: sphinx<9,>=7; extra == 'docs'
|
|
33
|
+
Description-Content-Type: text/markdown
|
|
34
|
+
|
|
35
|
+
# baobab-altered-api
|
|
36
|
+
|
|
37
|
+
Client Python **typé** et **testable** pour consommer les API publiques liées au jeu de cartes **Altered TCG**.
|
|
38
|
+
|
|
39
|
+
La librairie est conçue comme une extension métier du socle [`baobab-api-call`](https://pypi.org/project/baobab-api-call/) (`>=2.1,<3`) : elle ne réimplémente pas de pile HTTP générique.
|
|
40
|
+
|
|
41
|
+
## Statut du projet
|
|
42
|
+
|
|
43
|
+
- **Version actuelle :** `1.0.0` — première release stable du client (sync/async, cartes, référentiels, decks, marketplace lecture seule, Open Data).
|
|
44
|
+
- **Stabilité :** API publique de la librairie stabilisée ; les **chemins HTTP Altered** restent documentés comme hypothèses dans `docs/api_observations/` jusqu’à validation officielle.
|
|
45
|
+
|
|
46
|
+
## Statut API Altered
|
|
47
|
+
|
|
48
|
+
Les chemins d’endpoints, schémas JSON et règles d’accès **doivent être confirmés** via le portail développeur Altered et consignés dans `docs/api_observations/`.
|
|
49
|
+
Ce dépôt **ne promet pas** de couverture exhaustive tant que ces observations ne sont pas validées.
|
|
50
|
+
|
|
51
|
+
## Installation (développement)
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
python -m venv .venv
|
|
55
|
+
source .venv/bin/activate
|
|
56
|
+
pip install -U pip
|
|
57
|
+
pip install -e ".[dev]"
|
|
58
|
+
pytest
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Qualité
|
|
62
|
+
|
|
63
|
+
Les seuils et outils sont décrits dans `pyproject.toml` (pytest, coverage, black, flake8, pylint, mypy, bandit, build).
|
|
64
|
+
|
|
65
|
+
- [Guide des tests et fakes](docs/testing.md) — transports factices `tests.fakes`, garde réseau, exemples.
|
|
66
|
+
- [Usages minimaux des clients](docs/clients.md) — `with` / `async with`, configuration, sans promesse d’endpoints non validés.
|
|
67
|
+
|
|
68
|
+
## Transports HTTPX
|
|
69
|
+
|
|
70
|
+
- **Synchrone** : `AlteredSyncTransport` avec `SyncApiClient` du socle ; fermer via `transport.close()` (idempotent) ou `with transport:` pour un client HTTPX créé par le transport.
|
|
71
|
+
- **Asynchrone** : `AlteredAsyncTransport` avec `AsyncApiClient` ; fermer via `await transport.aclose()` (idempotent) ou `async with transport:` dans le même cas.
|
|
72
|
+
- Si vous injectez un `httpx.Client` / `httpx.AsyncClient`, la fermeture du client reste à votre charge ; le transport ne le referme pas.
|
|
73
|
+
- **Réponses JSON** : `AlteredTransportResponseHandler` (`json_payload_or_raise`, `raise_for_client_failure`) normalise les succès en `AlteredJsonPayload` et convertit erreurs HTTP, JSON, timeout et réseau en exceptions Altered typées, sans corps de réponse dans les messages.
|
|
74
|
+
|
|
75
|
+
## Clients publics
|
|
76
|
+
|
|
77
|
+
Guide pas à pas : **[docs/clients.md](docs/clients.md)** (sync, async, injection, rappels sur les chemins d’API).
|
|
78
|
+
|
|
79
|
+
Façades : `AlteredClient` et `AsyncAlteredClient`. Import racine recommandé pour la découverte : `from baobab_altered_api import AlteredClient, AsyncAlteredClient` ; import ciblé : `from baobab_altered_api.clients import AlteredClient, AsyncAlteredClient` (mêmes types, `__all__` du sous-package limité aux deux façades). Elles assemblent `AlteredApiConfig`, le transport HTTPX Altered et le client du socle (`http`). Aucune requête à l’instanciation ; préférez `with AlteredClient(…) as c:` / `async with AsyncAlteredClient(…) as c:` pour la fermeture.
|
|
80
|
+
|
|
81
|
+
- **Injection** : `transport=` accepte un port `SyncTransport` / `AsyncTransport` du socle. `api_client_config=` permet de remplacer la configuration `ApiClientConfig` produite par défaut (ex. en-têtes, timeouts, stratégie d’auth du socle) ; son `base_url` doit coïncider avec `AlteredApiConfig.base_url` après normalisation (`rstrip('/')`), sinon `AlteredConfigError`. Pour cloner une config du socle, préférez `ApiClientConfig.copy_with(...)` plutôt que `dataclasses.replace` (évite le conflit `timeout_seconds` / `timeouts`).
|
|
82
|
+
- **Sync vs async** : un transport dont `send` est une coroutine est refusé sur `AlteredClient` ; un `send` synchrone est refusé sur `AsyncAlteredClient` (`TypeError` explicite).
|
|
83
|
+
- **Cycle de vie** : la fermeture de la façade (`close` / `aclose`) propage au client du socle, qui ferme le transport exposé. Un transport injecté est donc fermé avec la façade : ne le partagez pas réutilisé après fermeture sans le recréer.
|
|
84
|
+
|
|
85
|
+
```python
|
|
86
|
+
from baobab_altered_api import AlteredApiConfig, AlteredClient
|
|
87
|
+
|
|
88
|
+
cfg = AlteredApiConfig(base_url="https://api.test.example", bearer_token="baobab-api-token")
|
|
89
|
+
with AlteredClient(cfg) as client:
|
|
90
|
+
# Tout chemin doit être validé hors ligne (voir docs/api_observations/).
|
|
91
|
+
resp = client.http.get("/chemin/relatif/exemple")
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Configuration et sécurité
|
|
95
|
+
|
|
96
|
+
- [Configuration](docs/configuration.md) — modèle `AlteredApiConfig`, variables `ALTERED_API_*`, exemples avec valeurs fictives.
|
|
97
|
+
- [Authentification](docs/authentication.md) — modes Bearer / clé API, lien avec `AlteredAuthFactory` et le socle.
|
|
98
|
+
- [Sécurité](docs/security.md) — gestion des secrets, représentations masquées, bonnes pratiques CI et dépôt.
|
|
99
|
+
|
|
100
|
+
## Licence
|
|
101
|
+
|
|
102
|
+
MIT — voir le fichier `LICENSE`.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# baobab-altered-api
|
|
2
|
+
|
|
3
|
+
Client Python **typé** et **testable** pour consommer les API publiques liées au jeu de cartes **Altered TCG**.
|
|
4
|
+
|
|
5
|
+
La librairie est conçue comme une extension métier du socle [`baobab-api-call`](https://pypi.org/project/baobab-api-call/) (`>=2.1,<3`) : elle ne réimplémente pas de pile HTTP générique.
|
|
6
|
+
|
|
7
|
+
## Statut du projet
|
|
8
|
+
|
|
9
|
+
- **Version actuelle :** `1.0.0` — première release stable du client (sync/async, cartes, référentiels, decks, marketplace lecture seule, Open Data).
|
|
10
|
+
- **Stabilité :** API publique de la librairie stabilisée ; les **chemins HTTP Altered** restent documentés comme hypothèses dans `docs/api_observations/` jusqu’à validation officielle.
|
|
11
|
+
|
|
12
|
+
## Statut API Altered
|
|
13
|
+
|
|
14
|
+
Les chemins d’endpoints, schémas JSON et règles d’accès **doivent être confirmés** via le portail développeur Altered et consignés dans `docs/api_observations/`.
|
|
15
|
+
Ce dépôt **ne promet pas** de couverture exhaustive tant que ces observations ne sont pas validées.
|
|
16
|
+
|
|
17
|
+
## Installation (développement)
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
python -m venv .venv
|
|
21
|
+
source .venv/bin/activate
|
|
22
|
+
pip install -U pip
|
|
23
|
+
pip install -e ".[dev]"
|
|
24
|
+
pytest
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Qualité
|
|
28
|
+
|
|
29
|
+
Les seuils et outils sont décrits dans `pyproject.toml` (pytest, coverage, black, flake8, pylint, mypy, bandit, build).
|
|
30
|
+
|
|
31
|
+
- [Guide des tests et fakes](docs/testing.md) — transports factices `tests.fakes`, garde réseau, exemples.
|
|
32
|
+
- [Usages minimaux des clients](docs/clients.md) — `with` / `async with`, configuration, sans promesse d’endpoints non validés.
|
|
33
|
+
|
|
34
|
+
## Transports HTTPX
|
|
35
|
+
|
|
36
|
+
- **Synchrone** : `AlteredSyncTransport` avec `SyncApiClient` du socle ; fermer via `transport.close()` (idempotent) ou `with transport:` pour un client HTTPX créé par le transport.
|
|
37
|
+
- **Asynchrone** : `AlteredAsyncTransport` avec `AsyncApiClient` ; fermer via `await transport.aclose()` (idempotent) ou `async with transport:` dans le même cas.
|
|
38
|
+
- Si vous injectez un `httpx.Client` / `httpx.AsyncClient`, la fermeture du client reste à votre charge ; le transport ne le referme pas.
|
|
39
|
+
- **Réponses JSON** : `AlteredTransportResponseHandler` (`json_payload_or_raise`, `raise_for_client_failure`) normalise les succès en `AlteredJsonPayload` et convertit erreurs HTTP, JSON, timeout et réseau en exceptions Altered typées, sans corps de réponse dans les messages.
|
|
40
|
+
|
|
41
|
+
## Clients publics
|
|
42
|
+
|
|
43
|
+
Guide pas à pas : **[docs/clients.md](docs/clients.md)** (sync, async, injection, rappels sur les chemins d’API).
|
|
44
|
+
|
|
45
|
+
Façades : `AlteredClient` et `AsyncAlteredClient`. Import racine recommandé pour la découverte : `from baobab_altered_api import AlteredClient, AsyncAlteredClient` ; import ciblé : `from baobab_altered_api.clients import AlteredClient, AsyncAlteredClient` (mêmes types, `__all__` du sous-package limité aux deux façades). Elles assemblent `AlteredApiConfig`, le transport HTTPX Altered et le client du socle (`http`). Aucune requête à l’instanciation ; préférez `with AlteredClient(…) as c:` / `async with AsyncAlteredClient(…) as c:` pour la fermeture.
|
|
46
|
+
|
|
47
|
+
- **Injection** : `transport=` accepte un port `SyncTransport` / `AsyncTransport` du socle. `api_client_config=` permet de remplacer la configuration `ApiClientConfig` produite par défaut (ex. en-têtes, timeouts, stratégie d’auth du socle) ; son `base_url` doit coïncider avec `AlteredApiConfig.base_url` après normalisation (`rstrip('/')`), sinon `AlteredConfigError`. Pour cloner une config du socle, préférez `ApiClientConfig.copy_with(...)` plutôt que `dataclasses.replace` (évite le conflit `timeout_seconds` / `timeouts`).
|
|
48
|
+
- **Sync vs async** : un transport dont `send` est une coroutine est refusé sur `AlteredClient` ; un `send` synchrone est refusé sur `AsyncAlteredClient` (`TypeError` explicite).
|
|
49
|
+
- **Cycle de vie** : la fermeture de la façade (`close` / `aclose`) propage au client du socle, qui ferme le transport exposé. Un transport injecté est donc fermé avec la façade : ne le partagez pas réutilisé après fermeture sans le recréer.
|
|
50
|
+
|
|
51
|
+
```python
|
|
52
|
+
from baobab_altered_api import AlteredApiConfig, AlteredClient
|
|
53
|
+
|
|
54
|
+
cfg = AlteredApiConfig(base_url="https://api.test.example", bearer_token="baobab-api-token")
|
|
55
|
+
with AlteredClient(cfg) as client:
|
|
56
|
+
# Tout chemin doit être validé hors ligne (voir docs/api_observations/).
|
|
57
|
+
resp = client.http.get("/chemin/relatif/exemple")
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Configuration et sécurité
|
|
61
|
+
|
|
62
|
+
- [Configuration](docs/configuration.md) — modèle `AlteredApiConfig`, variables `ALTERED_API_*`, exemples avec valeurs fictives.
|
|
63
|
+
- [Authentification](docs/authentication.md) — modes Bearer / clé API, lien avec `AlteredAuthFactory` et le socle.
|
|
64
|
+
- [Sécurité](docs/security.md) — gestion des secrets, représentations masquées, bonnes pratiques CI et dépôt.
|
|
65
|
+
|
|
66
|
+
## Licence
|
|
67
|
+
|
|
68
|
+
MIT — voir le fichier `LICENSE`.
|