Skip to content

Conversation

@amarcozzi
Copy link
Contributor

…rity

  • Replaced direct API client instantiations with factory methods (e.g., get_features_api, get_grids_api) for better flexibility and lazy initialization.
  • Simplified set_api_key to clear cached API instances, ensuring new credentials are applied consistently.
  • Added robust error handling for missing API keys in SDK usage scenarios (ensure_client function).
  • Removed unused API client imports and instance variables across modules.
  • Introduced test_api.py to validate API initialization, lazy loading, and edge cases (e.g., missing API keys, programmatic key updates).

…rity

- Replaced direct API client instantiations with factory methods (e.g., `get_features_api`, `get_grids_api`) for better flexibility and lazy initialization.
- Simplified `set_api_key` to clear cached API instances, ensuring new credentials are applied consistently.
- Added robust error handling for missing API keys in SDK usage scenarios (`ensure_client` function).
- Removed unused API client imports and instance variables across modules.
- Introduced `test_api.py` to validate API initialization, lazy loading, and edge cases (e.g., missing API keys, programmatic key updates).
@amarcozzi amarcozzi merged commit 03f11d5 into main Nov 3, 2025
3 checks passed
@amarcozzi
Copy link
Contributor Author

Fixes #112 and #98

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Package import fails if fastfuels key not set as an envrionment variable Fix set_api_key function not updating the api key

2 participants