NERSC / NERSC/sfapi_client

[Async]Client.update_credentials(client_id=None, secret=None, key=None) method

Open
#91 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
14
Forks
6
PR merge metrics
No merged PRs in 30d

Description

It would be very helpful to have a method to update the credentials for a client without having to create a new client. The use case here is a service that contacts the API in a few places in the code base. When the credentials expire, all those clients need to be replaced. If there was an update method, a separate coroutine could monitor a creds file for changes and call the update method and the various parts of the service could wouldn't have to be concerned with replacing the client and closing the old client.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the Python Client entry point and inspect how credentials are initialized and used by existing clients. Implement the requested async update_credentials(client_id=None, secret=None, key=None) behavior so refreshed credentials can be applied without replacing clients or closing the old client. Done means the service use case in the issue works without rebuilding its clients.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, authentication
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.