Skip to content

Conversation

@wxcutch
Copy link

@wxcutch wxcutch commented May 20, 2025

In response to issue #112

Anything outside of the class keyword in python code gets called statically upon import of that script. DomainApi(get_client) was being called when importing domain.py and, by extension, fastfuels_sdk. (This occurred in multiple instances, domain.py is just an example.) There's never an instance where statically calling the API is necessary, so I put the api calls in constructors for all the classes and called for the API within the one static function, that way the api's are only fetched when necessary.

@amarcozzi
Copy link
Contributor

Sorry for the delay on this @wxcutch. I did something similar to this on PR #139 which should fix both #112 and #98. I'm closing this PR.

@amarcozzi amarcozzi closed this Nov 3, 2025
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.

2 participants