==============
python-bol-api
==============
.. image:: https://app.travis-ci.com/dreambits/python-bol-api.svg?branch=master
:target: https://app.travis-ci.com/dreambits/python-bol-api
.. image:: https://badge.fury.io/py/python-bol-api-latest.svg
:target: https://badge.fury.io/py/python-bol-api-latest
.. image:: https://static.pepy.tech/personalized-badge/python-bol-api-latest?period=total&units=international_system&left_color=brightgreen&right_color=black&left_text=Downloads
:target: https://pepy.tech/project/python-bol-api-latest
A Python wrapper for the bol.com API forked from https://github.com/pennersr/python-bol-api
This is currently under development but stable to be used.
We are adding more and more features as the api has changed a lot from the time this version was created in original project
A Python wrapper for the bol.com API. Currently rather incomplete, as
it offers only those methods required for my own projects so far.
Open API
========
Instantiate the API::
>>> from bol.openapi.api import OpenAPI
>>> api = OpenAPI('api_key')
Invoke a method::
>>> data = api.catalog.products((['1004004011187773', '1004004011231766'])
JSON data is returned "as is":
>>> data['products'][0]['ean']
u'0093155141650'
Retailer API
============
Supports the BOL Api v10, documented here: https://api.bol.com/retailer/public/Retailer-API/selling-on-bolcom-processflow.html
Instantiate the API::
>>> from bol.retailer.api import RetailerAPI
>>> api = RetailerAPI()
Authenticate::
>>> api.login('client_id', 'client_secret')
Invoke a method::
>>> orders = api.orders.list()
>>> order = api.orders.get(orders[0].orderId))
Fields are derived 1:1 from the bol.com API, including lower-CamelCase
conventions::
>>> order.customerDetails.shipmentDetails.streetName
'Billingstraat'
Fields are properly typed::
>>> repr(order.orderPlacedDateTime)
datetime.datetime(2020, 2, 12, 16, 6, 17, tzinfo=tzoffset(None, 3600))
>>> repr(order.orderItems[0].offerPrice)
Decimal('106.52')
Access the underlying raw (unparsed) data at any time::
>>> order.raw_data
>>> order.raw_content
Running the tests
=================
First, make sure that you have ``tox`` installed on your system::
pip install tox
Then, just run the tox::
tox
Raw data
{
"_id": null,
"home_page": "https://dreambits.in",
"name": "python-bol-api-latest",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "bol bol.com api wrapper",
"author": "Raymond Penners, Dreambits Technologies Pvt. Ltd.",
"author_email": "office@dreambits.in",
"download_url": "https://files.pythonhosted.org/packages/d4/46/2a6b55b3b14c3e4b6358253f2c450e8f338fcea7cd39fea030e159792cdf/python_bol_api_latest-1.4.0.tar.gz",
"platform": null,
"description": "==============\npython-bol-api\n==============\n\n.. image:: https://app.travis-ci.com/dreambits/python-bol-api.svg?branch=master\n :target: https://app.travis-ci.com/dreambits/python-bol-api\n\n.. image:: https://badge.fury.io/py/python-bol-api-latest.svg\n :target: https://badge.fury.io/py/python-bol-api-latest\n\n.. image:: https://static.pepy.tech/personalized-badge/python-bol-api-latest?period=total&units=international_system&left_color=brightgreen&right_color=black&left_text=Downloads\n :target: https://pepy.tech/project/python-bol-api-latest\n\nA Python wrapper for the bol.com API forked from https://github.com/pennersr/python-bol-api\nThis is currently under development but stable to be used.\nWe are adding more and more features as the api has changed a lot from the time this version was created in original project\n\nA Python wrapper for the bol.com API. Currently rather incomplete, as\nit offers only those methods required for my own projects so far.\n\n\nOpen API\n========\n\nInstantiate the API::\n\n >>> from bol.openapi.api import OpenAPI\n >>> api = OpenAPI('api_key')\n\nInvoke a method::\n\n >>> data = api.catalog.products((['1004004011187773', '1004004011231766'])\n\nJSON data is returned \"as is\":\n\n >>> data['products'][0]['ean']\n u'0093155141650'\n\nRetailer API\n============\n\nSupports the BOL Api v10, documented here: https://api.bol.com/retailer/public/Retailer-API/selling-on-bolcom-processflow.html\n\nInstantiate the API::\n\n >>> from bol.retailer.api import RetailerAPI\n >>> api = RetailerAPI()\n\nAuthenticate::\n\n >>> api.login('client_id', 'client_secret')\n\nInvoke a method::\n\n >>> orders = api.orders.list()\n >>> order = api.orders.get(orders[0].orderId))\n\nFields are derived 1:1 from the bol.com API, including lower-CamelCase\nconventions::\n\n >>> order.customerDetails.shipmentDetails.streetName\n 'Billingstraat'\n\nFields are properly typed::\n\n >>> repr(order.orderPlacedDateTime)\n datetime.datetime(2020, 2, 12, 16, 6, 17, tzinfo=tzoffset(None, 3600))\n >>> repr(order.orderItems[0].offerPrice)\n Decimal('106.52')\n\nAccess the underlying raw (unparsed) data at any time::\n\n >>> order.raw_data\n >>> order.raw_content\n\n\nRunning the tests\n=================\n\nFirst, make sure that you have ``tox`` installed on your system::\n\n pip install tox\n\nThen, just run the tox::\n\n tox\n",
"bugtrack_url": null,
"license": null,
"summary": "Wrapper for the bol.com API",
"version": "1.4.0",
"project_urls": {
"Homepage": "https://dreambits.in"
},
"split_keywords": [
"bol",
"bol.com",
"api",
"wrapper"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6c9d25e04d6dabf37f20b48f6b42ba87d883f6ac5d4895d35b1260bc7ac16ec9",
"md5": "6eba7ef9dbbd5ece3a279764dd400fb5",
"sha256": "fd332d637425d0b247c058578ca432740a01db2a76c0c71a40f695528844c1e5"
},
"downloads": -1,
"filename": "python_bol_api_latest-1.4.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6eba7ef9dbbd5ece3a279764dd400fb5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 13907,
"upload_time": "2024-10-03T14:07:35",
"upload_time_iso_8601": "2024-10-03T14:07:35.332875Z",
"url": "https://files.pythonhosted.org/packages/6c/9d/25e04d6dabf37f20b48f6b42ba87d883f6ac5d4895d35b1260bc7ac16ec9/python_bol_api_latest-1.4.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "d4462a6b55b3b14c3e4b6358253f2c450e8f338fcea7cd39fea030e159792cdf",
"md5": "57ee0f23c9f36a3f63c9695926469582",
"sha256": "b49ee37b312ba2a1f8ae85f91155eabf10a026c7a62e1ac8ebc85ceed4cd628e"
},
"downloads": -1,
"filename": "python_bol_api_latest-1.4.0.tar.gz",
"has_sig": false,
"md5_digest": "57ee0f23c9f36a3f63c9695926469582",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 15274,
"upload_time": "2024-10-03T14:07:36",
"upload_time_iso_8601": "2024-10-03T14:07:36.643154Z",
"url": "https://files.pythonhosted.org/packages/d4/46/2a6b55b3b14c3e4b6358253f2c450e8f338fcea7cd39fea030e159792cdf/python_bol_api_latest-1.4.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-03 14:07:36",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "python-bol-api-latest"
}