Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve token & custom token handling #45

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

tcj
Copy link
Collaborator

@tcj tcj commented Oct 3, 2024

Fixes to token handling/usage from @pieterbartsmit

  • ensure usage of custom_token throughout pysofar, including workers and subclasses
  • fall back to customary .env file if custom sofar_api.env file is not present

pieterbartsmit and others added 4 commits October 2, 2024 20:58
Likely incomplete- but I *think* this passes the token around correctly now.
…w update the token on an instantiated SofarAPI object and it is respected in all subsequent uses of the API (including when passing it to a Spotter object).

Note that this pull also changes the default .env search logic from:

`look in user directory for sofer_api.env and load token from that`

To

`look in user directory for sofer_api.env and load token from that, if no file is present use default dotenv logic through find_dotenv()`

This preserves legacy behaviour- but otherwise moves towards more standard behaviour.
@tcj tcj requested review from evanShap and pieterbartsmit October 3, 2024 04:10
@tcj tcj self-assigned this Oct 3, 2024
@tcj tcj linked an issue Oct 4, 2024 that may be closed by this pull request
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.

custom_token isn't being passed to child Spotter workers
2 participants