{"id":21991465,"url":"https://github.com/terrabits/requests-walmart-auth","last_synced_at":"2025-04-30T13:51:10.039Z","repository":{"id":62591612,"uuid":"488306739","full_name":"Terrabits/requests-walmart-auth","owner":"Terrabits","description":"Python `requests` support for the Walmart Affiliate Marketplace (REST) API required Additional Headers","archived":false,"fork":false,"pushed_at":"2022-05-04T04:06:23.000Z","size":15,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-19T01:38:27.021Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Terrabits.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-05-03T17:41:56.000Z","updated_at":"2024-03-26T10:07:49.000Z","dependencies_parsed_at":"2022-11-04T07:49:58.380Z","dependency_job_id":null,"html_url":"https://github.com/Terrabits/requests-walmart-auth","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Terrabits%2Frequests-walmart-auth","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Terrabits%2Frequests-walmart-auth/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Terrabits%2Frequests-walmart-auth/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Terrabits%2Frequests-walmart-auth/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Terrabits","download_url":"https://codeload.github.com/Terrabits/requests-walmart-auth/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251714930,"owners_count":21631806,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-29T20:09:28.679Z","updated_at":"2025-04-30T13:51:09.973Z","avatar_url":"https://github.com/Terrabits.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# requests-walmart-auth\n\nThis project provides python `requests` support for the [Walmart Affiliate Marketplace (REST) API](https://walmart.io/docs/affiliate/) required Additional Headers.\n\n## Overview\n\nThe Affiliate Marketplace API requires `Additional Headers` to be included in each HTTPS request, as described in the [Onboarding Guide](https://walmart.io/docs/affiliate/onboarding-guide).\n\nThis project provides `requests` support for these `Additional Headers` via the `auth` interface.\n\n## Requirements\n\n- Python 3.7+\n- pycryptodome ~=3.14.1\n- requests ~=2.27.1\n\n## Install\n\n`requests-walmart-auth` can be installed from pypi via pip:\n\n```shell\npip install requests-walmart-auth\n```\n\n## Usage\n\n### `WalmartAuth`\n\nThe `WalmartAuth` class implements the `requests.auth.AuthBase` interface for use with `requests`.\n\n```python\nimport requests\nfrom   walmart_auth import WalmartAuth\n\n# get auth\nauth = WalmartAuth(consumer_id, private_key, key_version, passphrase=None)\n\n# make request with auth\nresponse = requests.get('https://...', auth=auth)\n```\n\n### WalmartSession\n\nThe `WalmartSession` class implements a persistent `requests.Session` with `WalmartAuth`.\n\n```python\nfrom walmart_auth import WalmartSession\n\n# get session with persistent auth\nsession = WalmartSession(consumer_id, private_key, key_version, passphrase=None)\n\n# make request; auth is transparent\nsession.get('https://...')\n```\n\n## Command Line Tools\n\n### `walmart-session`\n\nThis command line tool creates a new `WalmartSession` and provides a python REPL for experimentation.\n\nFrom the help menu:\n\n```comment\nusage: walmart-session [-h] [--passphrase [PASSPHRASE]]\n                       consumer_id private_key key_version\n\nStart Walmart requests session\n\npositional arguments:\n  consumer_id\n  private_key\n  key_version\n\noptions:\n  -h, --help            show this help message and exit\n  --passphrase [PASSPHRASE], -p [PASSPHRASE]\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterrabits%2Frequests-walmart-auth","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fterrabits%2Frequests-walmart-auth","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fterrabits%2Frequests-walmart-auth/lists"}