python-coupang


Namepython-coupang JSON
Version 0.1.2 PyPI version JSON
download
home_pageNone
SummaryA Python client for the Coupang API
upload_time2024-09-01 02:30:25
maintainerNone
docs_urlNone
authorChris Han
requires_python>=3.6
licenseMIT License Copyright (c) 2024 Chris Han Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords coupang api client
VCS
bugtrack_url
requirements requests pytest python-dotenv
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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:

```bash
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](https://developers.coupangcorp.com/hc/ko/articles/20288952179993-OpenAPI-Key-%EB%B0%9C%EA%B8%89%EB%B0%9B%EA%B8%B0).

Once you have your credentials, you can set them as environment variables:

```bash
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:

```bash
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:


```python
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)
```


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "python-coupang",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "coupang, api, client",
    "author": "Chris Han",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/a0/cd/8b6e0e9bf9665b4a7234a64082daf10c3537f608294c7ed3666e1ea7aa56/python_coupang-0.1.2.tar.gz",
    "platform": null,
    "description": "# PyCoupang\n\nPyCoupang is a Python client library for the Coupang WING API. It provides a simple interface to interact with Coupang's API endpoints.\n\n## Installation\n\nInstall PyCoupang using pip:\n\n```bash\npip install python-coupang\n```\n\n## Usage\n\nTo 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](https://developers.coupangcorp.com/hc/ko/articles/20288952179993-OpenAPI-Key-%EB%B0%9C%EA%B8%89%EB%B0%9B%EA%B8%B0).\n\nOnce you have your credentials, you can set them as environment variables:\n\n```bash\nexport COUPANG_ACCESS_KEY=<your_access_key>\nexport COUPANG_SECRET_KEY=<your_secret_key>\nexport COUPANG_VENDOR_ID=<your_vendor_id>\n```\n\nAlternatively, you can create a `.env` file in your project root with these variables:\n\n```bash\nCOUPANG_ACCESS_KEY=<your_access_key>\nCOUPANG_SECRET_KEY=<your_secret_key>\nCOUPANG_VENDOR_ID=<your_vendor_id>\n```\n\n\nThen, you can use the library in your Python code:\n\n\n```python\nimport os\nfrom dotenv import load_dotenv\nfrom pycoupang.client import CoupangClient\n\n# Optionally load environment variables if using .env file\nload_dotenv()\n\nclient = CoupangClient(\n    access_key=os.getenv('COUPANG_ACCESS_KEY'),\n    secret_key=os.getenv('COUPANG_SECRET_KEY'),\n    vendor_id=os.getenv('COUPANG_VENDOR_ID')\n)\n# list products\nresponse = client.products.list_products(vendor_id=os.getenv('COUPANG_VENDOR_ID'))\n\n# get a specific product\nresponse = client.products.get(\"product_id\")\n\n# create a new product\nnew_product_data = {\n    # Your product data here\n}\nresponse = client.products.create(new_product_data)\n```\n\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Chris Han  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "A Python client for the Coupang API",
    "version": "0.1.2",
    "project_urls": {
        "Homepage": "https://github.com/christopherhan/python-coupang"
    },
    "split_keywords": [
        "coupang",
        " api",
        " client"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "422d33f7ee1c92e554dba5d98074cc6f83932854db1cd15432d945159556ae69",
                "md5": "fbf858bd3344015b53772f227cc57f98",
                "sha256": "5be2eb5f08fefbedca9f04c8566a36656b4e03e926266ddb48789b268b122061"
            },
            "downloads": -1,
            "filename": "python_coupang-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fbf858bd3344015b53772f227cc57f98",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 8749,
            "upload_time": "2024-09-01T02:30:23",
            "upload_time_iso_8601": "2024-09-01T02:30:23.809745Z",
            "url": "https://files.pythonhosted.org/packages/42/2d/33f7ee1c92e554dba5d98074cc6f83932854db1cd15432d945159556ae69/python_coupang-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a0cd8b6e0e9bf9665b4a7234a64082daf10c3537f608294c7ed3666e1ea7aa56",
                "md5": "a39d214f803267c33f105d468a86e1f8",
                "sha256": "9daa0bf240af5e3a3c40fe69abc9cce3f1a0f85ec5a1f5b8ff0f936e56f211c3"
            },
            "downloads": -1,
            "filename": "python_coupang-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "a39d214f803267c33f105d468a86e1f8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 7794,
            "upload_time": "2024-09-01T02:30:25",
            "upload_time_iso_8601": "2024-09-01T02:30:25.548020Z",
            "url": "https://files.pythonhosted.org/packages/a0/cd/8b6e0e9bf9665b4a7234a64082daf10c3537f608294c7ed3666e1ea7aa56/python_coupang-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-01 02:30:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "christopherhan",
    "github_project": "python-coupang",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "requests",
            "specs": [
                [
                    ">=",
                    "2.25.1"
                ]
            ]
        },
        {
            "name": "pytest",
            "specs": [
                [
                    ">=",
                    "6.2.3"
                ]
            ]
        },
        {
            "name": "python-dotenv",
            "specs": [
                [
                    ">=",
                    "0.19.0"
                ]
            ]
        }
    ],
    "lcname": "python-coupang"
}
        
Elapsed time: 0.33764s