prestashop-orders-client


Nameprestashop-orders-client JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/vernon-gant/prestashop_orders_client
SummaryA simple Python client for PrestaShop API to extract orders
upload_time2023-01-16 17:05:40
maintainer
docs_urlNone
authorAleksandr Zakharov
requires_python>=3.10
licenseApache License 2.0
keywords prestashop orders api client
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Prestashop Orders Client

**Prestashop Orders Client** is a simple client for PrestaShop Api. The main goal of this project is to provide a simple
and easy to use client to interact with PrestaShop Api and to extract either a single order or all orders data. Initially was designed for our own
needs, as we had a big amount of tasks with orders which had to be automated like sending a fresh paid order to our
post service, but we decided to share it with the community. Maybe it will be useful for someone else :)

```
>>> from prestashop_orders_client import PrestaShopOrderClient
>>> client = PrestaShopOrderClient(shop_link="myshop.com", api_key="my_api_key")
>>> client.get_order(1)
Order(id=1, total_paid=500.0, reference='ABCD'
      order_state='Shipped', email='examplemail@gmail.com', 
      first_name='John', last_name='Doe', 
      company_name=None, phone='+12345678', 
      address='Example address', 
      city='Example city', post_code='123456', 
      country='Example country', state=None)
>>> client.get_all_orders()
[
Order(id=1, total_paid=500.0, reference='ABCD'
      order_state='Shipped', email='examplemail@gmail.com', 
      first_name='John', last_name='Doe', 
      company_name=None, phone='+12345678', 
      address='Example address', 
      city='Example city', post_code='123456', 
      country='Example country', state=None),
      
Order(id=2, total_paid=1000.0, reference='ABCD'
      order_state='Shipped', email='examplemail@gmail.com', 
      first_name='John', last_name='Doe', 
      company_name=None, phone='+12345678', 
      address='Example address', 
      city='Example city', post_code='123456', 
      country='Example country', state=None),
....
]
>>> client.orders_amount
8
```

*Make sure your server has SSL certificate installed, as PrestaShop Api requires it and our client uses "https" for
performing requests.*

## Installation

Our client available on PyPI:

```console
$ python -m pip install prestashop_orders_client
```

Python 3.10+ is required.

## Important Notes

- Make sure you WebService is enabled in your PrestaShop Admin Panel. (Advanced Parameters -> Webservice)
- Make sure that you have created an Api Key for your WebService. (Advanced Parameters -> Webservice -> Add new key)
- Make sure you have added *GET permissions* at least to these resources : **addresses, countries, customers, orders_states, orders, states**

## License

The project is licensed under the Apache 2.0 License.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/vernon-gant/prestashop_orders_client",
    "name": "prestashop-orders-client",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "prestashop orders api client",
    "author": "Aleksandr Zakharov",
    "author_email": "Aleksandr Zakharov <aleksza.4119@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/bf/3c/2610c6bf88fe45651abc8bf38489d7fcedbc25571126149b6250a0354b9c/prestashop_orders_client-1.0.0.tar.gz",
    "platform": null,
    "description": "# Prestashop Orders Client\n\n**Prestashop Orders Client** is a simple client for PrestaShop Api. The main goal of this project is to provide a simple\nand easy to use client to interact with PrestaShop Api and to extract either a single order or all orders data. Initially was designed for our own\nneeds, as we had a big amount of tasks with orders which had to be automated like sending a fresh paid order to our\npost service, but we decided to share it with the community. Maybe it will be useful for someone else :)\n\n```\n>>> from prestashop_orders_client import PrestaShopOrderClient\n>>> client = PrestaShopOrderClient(shop_link=\"myshop.com\", api_key=\"my_api_key\")\n>>> client.get_order(1)\nOrder(id=1, total_paid=500.0, reference='ABCD'\n      order_state='Shipped', email='examplemail@gmail.com', \n      first_name='John', last_name='Doe', \n      company_name=None, phone='+12345678', \n      address='Example address', \n      city='Example city', post_code='123456', \n      country='Example country', state=None)\n>>> client.get_all_orders()\n[\nOrder(id=1, total_paid=500.0, reference='ABCD'\n      order_state='Shipped', email='examplemail@gmail.com', \n      first_name='John', last_name='Doe', \n      company_name=None, phone='+12345678', \n      address='Example address', \n      city='Example city', post_code='123456', \n      country='Example country', state=None),\n      \nOrder(id=2, total_paid=1000.0, reference='ABCD'\n      order_state='Shipped', email='examplemail@gmail.com', \n      first_name='John', last_name='Doe', \n      company_name=None, phone='+12345678', \n      address='Example address', \n      city='Example city', post_code='123456', \n      country='Example country', state=None),\n....\n]\n>>> client.orders_amount\n8\n```\n\n*Make sure your server has SSL certificate installed, as PrestaShop Api requires it and our client uses \"https\" for\nperforming requests.*\n\n## Installation\n\nOur client available on PyPI:\n\n```console\n$ python -m pip install prestashop_orders_client\n```\n\nPython 3.10+ is required.\n\n## Important Notes\n\n- Make sure you WebService is enabled in your PrestaShop Admin Panel. (Advanced Parameters -> Webservice)\n- Make sure that you have created an Api Key for your WebService. (Advanced Parameters -> Webservice -> Add new key)\n- Make sure you have added *GET permissions* at least to these resources : **addresses, countries, customers, orders_states, orders, states**\n\n## License\n\nThe project is licensed under the Apache 2.0 License.\n",
    "bugtrack_url": null,
    "license": "Apache License 2.0",
    "summary": "A simple Python client for PrestaShop API to extract orders",
    "version": "1.0.0",
    "split_keywords": [
        "prestashop",
        "orders",
        "api",
        "client"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "03bb642c6a71ff36e281373dc9746311e76f51f04e6b3dd7a1309d66405a107d",
                "md5": "52fc1c371b8427dd95637544171f75fc",
                "sha256": "130e0abca747035dc822676a310cbc7cd0ebd7adea2ef7b404f8fab530a7532a"
            },
            "downloads": -1,
            "filename": "prestashop_orders_client-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "52fc1c371b8427dd95637544171f75fc",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 10631,
            "upload_time": "2023-01-16T17:05:38",
            "upload_time_iso_8601": "2023-01-16T17:05:38.914764Z",
            "url": "https://files.pythonhosted.org/packages/03/bb/642c6a71ff36e281373dc9746311e76f51f04e6b3dd7a1309d66405a107d/prestashop_orders_client-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bf3c2610c6bf88fe45651abc8bf38489d7fcedbc25571126149b6250a0354b9c",
                "md5": "75e38e7e6e36cb9cfb3f0cf33db741e6",
                "sha256": "97f8c2ca0fda947b88c44828c7e4af49c85fbc122d4767dd26b1817856075e2e"
            },
            "downloads": -1,
            "filename": "prestashop_orders_client-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "75e38e7e6e36cb9cfb3f0cf33db741e6",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 12375,
            "upload_time": "2023-01-16T17:05:40",
            "upload_time_iso_8601": "2023-01-16T17:05:40.289001Z",
            "url": "https://files.pythonhosted.org/packages/bf/3c/2610c6bf88fe45651abc8bf38489d7fcedbc25571126149b6250a0354b9c/prestashop_orders_client-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-16 17:05:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "vernon-gant",
    "github_project": "prestashop_orders_client",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "prestashop-orders-client"
}
        
Elapsed time: 0.02848s