etsy3py


Nameetsy3py JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://github.com/damhuman/Etsy3Py
SummaryETSY API v3 Client
upload_time2023-04-19 12:41:13
maintainer
docs_urlNone
authorAnton Dasyuk, Ali-Abdulla
requires_python>=3.6
licenseMIT
keywords etsy api client etsy v3 api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Etsy3Py
Client for Etsy API v3

## Installation
You can install etsy3py using pip:

``` python
pip install etsy3py
```


# Authentication step-by-step
`EtsyOAuthClient` is a Python class that provides an authentication client for the Etsy marketplace API, 
allowing users to connect to the API using OAuth2 authentication.

## Usage
Here is an example of how to use the EtsyOAuthClient to obtain an access token from the Etsy API.

``` python
from etsy3py.oauth import EtsyOAuthClient
```

Replace these with your own values from the Etsy Developer Console

``` python
client_id = 'your_client_id'
client_secret = 'your_client_secret'
redirect_uri = 'your_redirect_uri' 
scope = ['your_scope_1', 'your_scope_2', ...]
```

Create an instance of the EtsyOAuthClient

``` python
client = EtsyOAuthClient(client_id, client_secret, redirect_uri, scope)
```

Get the authorization URL

``` python
authorization_url, state = client.authorization_url()
```

Redirect the user to the authorization URL to grant access. Once the user has granted access, get the authorization code and use it to obtain an access token

``` python
authorization_code = 'the_authorization_code'
access_token = client.fetch_token(authorization_code)
```

You can now use the access token to make requests to the Etsy API

## Refresh token

The `refresh_token` method of the `EtsyOAuthClient` class requests a new access token from the authorization server using a refresh token.

### Parameters

`refresh_token` (required): The refresh token used to obtain a new access token.

### Return Value

The `refresh_token` method returns a dictionary containing the new access token and any additional data returned by the authorization server.

### Example

Replace these with your own values from the Etsy Developer Console

``` python
client_id = 'your_client_id'
client_secret = 'your_client_secret'

# create an instance of the EtsyOAuthClient

client = EtsyOAuthClient(client_id, client_secret)

# if the access token expires, you can use the refresh token to obtain a new access token and additional data 

new_access_token = client.refresh_token(refresh_token)
```

# Etsy API
This is a Python client for the Etsy API. 
The client makes it easy to interact with the Etsy API and perform operations on a user's behalf.

### Requirements
Python 3.6 or higher

## Usage
To use the EtsyApi class, you will need to obtain an access token from the Etsy API.

``` python
from etsy3py.v3 import EtsyApi

access_token = "YOUR_ACCESS_TOKEN"
client_id = "YOUR_CLIENT_ID"

etsy_api = EtsyApi(access_token=access_token, client_id=client_id)
# you can then call methods on the etsy_api object to interact with the Etsy API.
```

### Authentication
The EtsyApi class uses OAuth 2.0 authentication. You will need to obtain an access token from the Etsy API 
before using the client. You can obtain an access token by following the
instructions in the Etsy API documentation.

### Rate Limiting
The Etsy API has a rate limiting policy that limits the number of requests that can be made in a given time period.

#### This package is licensed under the MIT License.


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/damhuman/Etsy3Py",
    "name": "etsy3py",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "etsy,api,client,etsy v3 api",
    "author": "Anton Dasyuk, Ali-Abdulla",
    "author_email": "anton.dasyuk@gmail.com, alexukr1999@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/47/2c/fc437f00eb6996c54bed9043a4128404cb813f8461a193be02d94aaca9c3/etsy3py-0.0.2.tar.gz",
    "platform": null,
    "description": "# Etsy3Py\nClient for Etsy API v3\n\n## Installation\nYou can install etsy3py using pip:\n\n``` python\npip install etsy3py\n```\n\n\n# Authentication step-by-step\n`EtsyOAuthClient` is a Python class that provides an authentication client for the Etsy marketplace API, \nallowing users to connect to the API using OAuth2 authentication.\n\n## Usage\nHere is an example of how to use the EtsyOAuthClient to obtain an access token from the Etsy API.\n\n``` python\nfrom etsy3py.oauth import EtsyOAuthClient\n```\n\nReplace these with your own values from the Etsy Developer Console\n\n``` python\nclient_id = 'your_client_id'\nclient_secret = 'your_client_secret'\nredirect_uri = 'your_redirect_uri' \nscope = ['your_scope_1', 'your_scope_2', ...]\n```\n\nCreate an instance of the EtsyOAuthClient\n\n``` python\nclient = EtsyOAuthClient(client_id, client_secret, redirect_uri, scope)\n```\n\nGet the authorization URL\n\n``` python\nauthorization_url, state = client.authorization_url()\n```\n\nRedirect the user to the authorization URL to grant access. Once the user has granted access, get the authorization code and use it to obtain an access token\n\n``` python\nauthorization_code = 'the_authorization_code'\naccess_token = client.fetch_token(authorization_code)\n```\n\nYou can now use the access token to make requests to the Etsy API\n\n## Refresh token\n\nThe `refresh_token` method of the `EtsyOAuthClient` class requests a new access token from the authorization server using a refresh token.\n\n### Parameters\n\n`refresh_token` (required): The refresh token used to obtain a new access token.\n\n### Return Value\n\nThe `refresh_token` method returns a dictionary containing the new access token and any additional data returned by the authorization server.\n\n### Example\n\nReplace these with your own values from the Etsy Developer Console\n\n``` python\nclient_id = 'your_client_id'\nclient_secret = 'your_client_secret'\n\n# create an instance of the EtsyOAuthClient\n\nclient = EtsyOAuthClient(client_id, client_secret)\n\n# if the access token expires, you can use the refresh token to obtain a new access token and additional data \n\nnew_access_token = client.refresh_token(refresh_token)\n```\n\n# Etsy API\nThis is a Python client for the Etsy API. \nThe client makes it easy to interact with the Etsy API and perform operations on a user's behalf.\n\n### Requirements\nPython 3.6 or higher\n\n## Usage\nTo use the EtsyApi class, you will need to obtain an access token from the Etsy API.\n\n``` python\nfrom etsy3py.v3 import EtsyApi\n\naccess_token = \"YOUR_ACCESS_TOKEN\"\nclient_id = \"YOUR_CLIENT_ID\"\n\netsy_api = EtsyApi(access_token=access_token, client_id=client_id)\n# you can then call methods on the etsy_api object to interact with the Etsy API.\n```\n\n### Authentication\nThe EtsyApi class uses OAuth 2.0 authentication. You will need to obtain an access token from the Etsy API \nbefore using the client. You can obtain an access token by following the\ninstructions in the Etsy API documentation.\n\n### Rate Limiting\nThe Etsy API has a rate limiting policy that limits the number of requests that can be made in a given time period.\n\n#### This package is licensed under the MIT License.\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "ETSY API v3 Client",
    "version": "0.0.2",
    "split_keywords": [
        "etsy",
        "api",
        "client",
        "etsy v3 api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "472cfc437f00eb6996c54bed9043a4128404cb813f8461a193be02d94aaca9c3",
                "md5": "f352e550d49d58789a48275cb4b521ec",
                "sha256": "99b71b7e245089011e45b631d30bdb03baa475f15b8a4813e49293048a38bb7e"
            },
            "downloads": -1,
            "filename": "etsy3py-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "f352e550d49d58789a48275cb4b521ec",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 8545,
            "upload_time": "2023-04-19T12:41:13",
            "upload_time_iso_8601": "2023-04-19T12:41:13.093429Z",
            "url": "https://files.pythonhosted.org/packages/47/2c/fc437f00eb6996c54bed9043a4128404cb813f8461a193be02d94aaca9c3/etsy3py-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-19 12:41:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "damhuman",
    "github_project": "Etsy3Py",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "etsy3py"
}
        
Elapsed time: 0.05140s