A Python client for the Coupang API
Project description
PyCoupang
PyCoupang is a Python client library for the Coupang WING API. It provides a simple interface to interact with Coupang's API endpoints.
Installation
Install PyCoupang using pip:
pip install python-coupang
Usage
To use the PyCoupang library, you need to set up your environment with the necessary credentials. You can get these credentials by registering an application on the Coupang Developer Portal.
Once you have your credentials, you can set them as environment variables:
export COUPANG_ACCESS_KEY=<your_access_key>
export COUPANG_SECRET_KEY=<your_secret_key>
export COUPANG_VENDOR_ID=<your_vendor_id>
Alternatively, you can create a .env
file in your project root with these variables:
COUPANG_ACCESS_KEY=<your_access_key>
COUPANG_SECRET_KEY=<your_secret_key>
COUPANG_VENDOR_ID=<your_vendor_id>
Then, you can use the library in your Python code:
import os
from dotenv import load_dotenv
from pycoupang.client import CoupangClient
# Optionally load environment variables if using .env file
load_dotenv()
client = CoupangClient(
access_key=os.getenv('COUPANG_ACCESS_KEY'),
secret_key=os.getenv('COUPANG_SECRET_KEY'),
vendor_id=os.getenv('COUPANG_VENDOR_ID')
)
# list products
response = client.products.list_products(vendor_id=os.getenv('COUPANG_VENDOR_ID'))
# get a specific product
response = client.products.get("product_id")
# create a new product
new_product_data = {
# Your product data here
}
response = client.products.create(new_product_data)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file python_coupang-0.1.2.tar.gz
.
File metadata
- Download URL: python_coupang-0.1.2.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9daa0bf240af5e3a3c40fe69abc9cce3f1a0f85ec5a1f5b8ff0f936e56f211c3 |
|
MD5 | a39d214f803267c33f105d468a86e1f8 |
|
BLAKE2b-256 | a0cd8b6e0e9bf9665b4a7234a64082daf10c3537f608294c7ed3666e1ea7aa56 |
File details
Details for the file python_coupang-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: python_coupang-0.1.2-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5be2eb5f08fefbedca9f04c8566a36656b4e03e926266ddb48789b268b122061 |
|
MD5 | fbf858bd3344015b53772f227cc57f98 |
|
BLAKE2b-256 | 422d33f7ee1c92e554dba5d98074cc6f83932854db1cd15432d945159556ae69 |