Shopify / Shopify/shopify_python_api
Get rid of Class variable storage and move to instance storage
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 388
- Avg merge
- 5h 39m
- Merged PRs (30d)
- 1
Description
I'm building an admin/monitoring server that handles requests from both out production and qa Shopify store.
In the current setup, the user/password/site_uri are stored at the class level, so I can't create a prod session and a qa session and store them in memory.
For every request to the REST server I have to clear the current class variables and set for requested environment.
Additionally, this is not thread safe. If two REST requests arrive at the same time for different endpoints, they will clobber each other.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing where user, password, and site_uri are stored and accessed for REST requests, then review how sessions are created and selected for different Shopify environments. Done means production and QA sessions can coexist in memory and concurrent requests no longer overwrite each other's configuration; add or run coverage for both cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, backend
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100