Shopify / Shopify/shopify_python_api

Get rid of Class variable storage and move to instance storage

Open
#191 3 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
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

Open the contributing guide

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.