Skip to content

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

Python client for the Coupang API

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages