# bigc
An unofficial Python client for the BigCommerce API.
_This project is currently in an alpha state._
## Installation
```shell
pip install bigc
```
## Usage
To authenticate, you'll need the BigCommerce store's hash and an access token.
```python
from bigc import BigCommerceAPI
store_hash = '000000000'
access_token = '0000000000000000000000000000000'
bigcommerce = BigCommerceAPI(store_hash, access_token)
order: dict = bigcommerce.orders.get(101)
orders: list[dict] = list(bigcommerce.orders.all(customer_id=1))
```
The following resources are currently supported:
- `carts`
- `categories`
- `checkouts`
- `customer_groups`
- `customers`
- `orders`
- `products`
- `product_variants`
- `webhooks`
### Direct API Access
For resources or parameters that aren't officially supported yet, bigc also includes a flexible API client that can be used to make direct requests to the BigCommerce API.
```python
bigcommerce = BigCommerceAPI(store_hash, access_token)
product = bigcommerce.api.v3.get('/products/77', params={'include': 'videos'})
order_messages = bigcommerce.api.v2.get_many('/orders/101/messages')
```
### Utilities
Some extra utility functions that don't interact with the BigCommerce API are available in `bigc.utils`.
- `bigc.utils.parse_rfc2822_date`: Convert an [RFC-2822 date] (used by some BigCommerce APIs) to a `datetime`
[RFC-2822 date]: https://www.rfc-editor.org/rfc/rfc2822#section-3.3
### Constants
For convenience, some constants are made available in `bigc.data`.
- `bigc.data.BigCommerceOrderStatus`: An `Enum` of order statuses and their IDs
Raw data
{
"_id": null,
"home_page": "https://github.com/MedShift/bigc",
"name": "bigc",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.9,<4.0",
"maintainer_email": "",
"keywords": "bigcommerce,api,client",
"author": "Ryan Thomson",
"author_email": "ryan@medshift.com",
"download_url": "https://files.pythonhosted.org/packages/f9/92/c705ca223622ece1ff2bf27c5eab15f7aed9722b0817e1d97b4bb7fbdf21/bigc-0.2.14.tar.gz",
"platform": null,
"description": "# bigc\n\nAn unofficial Python client for the BigCommerce API.\n\n_This project is currently in an alpha state._\n\n## Installation\n\n```shell\npip install bigc \n```\n\n## Usage\n\nTo authenticate, you'll need the BigCommerce store's hash and an access token.\n\n```python\nfrom bigc import BigCommerceAPI\n\n\nstore_hash = '000000000'\naccess_token = '0000000000000000000000000000000'\nbigcommerce = BigCommerceAPI(store_hash, access_token)\n\norder: dict = bigcommerce.orders.get(101)\norders: list[dict] = list(bigcommerce.orders.all(customer_id=1))\n```\n\nThe following resources are currently supported:\n\n- `carts`\n- `categories`\n- `checkouts`\n- `customer_groups`\n- `customers`\n- `orders`\n- `products`\n- `product_variants`\n- `webhooks`\n\n### Direct API Access\n\nFor resources or parameters that aren't officially supported yet, bigc also includes a flexible API client that can be used to make direct requests to the BigCommerce API.\n\n```python\nbigcommerce = BigCommerceAPI(store_hash, access_token)\n\nproduct = bigcommerce.api.v3.get('/products/77', params={'include': 'videos'})\norder_messages = bigcommerce.api.v2.get_many('/orders/101/messages')\n```\n\n### Utilities\n\nSome extra utility functions that don't interact with the BigCommerce API are available in `bigc.utils`.\n\n- `bigc.utils.parse_rfc2822_date`: Convert an [RFC-2822 date] (used by some BigCommerce APIs) to a `datetime`\n\n[RFC-2822 date]: https://www.rfc-editor.org/rfc/rfc2822#section-3.3\n\n### Constants\n\nFor convenience, some constants are made available in `bigc.data`.\n\n- `bigc.data.BigCommerceOrderStatus`: An `Enum` of order statuses and their IDs\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Unofficial client for the BigCommerce API",
"version": "0.2.14",
"project_urls": {
"Homepage": "https://github.com/MedShift/bigc",
"Repository": "https://github.com/MedShift/bigc.git"
},
"split_keywords": [
"bigcommerce",
"api",
"client"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "3de0e8520146f144cb08720ddb89facd357551eb8c92d669d2a22f5de09ddd60",
"md5": "43d6086105e8be5f7f093cb1fe457a9c",
"sha256": "5809f057abcc0c605ce97324fd68704c802d9ac24473a0c2692a939c458f4358"
},
"downloads": -1,
"filename": "bigc-0.2.14-py3-none-any.whl",
"has_sig": false,
"md5_digest": "43d6086105e8be5f7f093cb1fe457a9c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9,<4.0",
"size": 15157,
"upload_time": "2023-10-27T16:35:50",
"upload_time_iso_8601": "2023-10-27T16:35:50.711457Z",
"url": "https://files.pythonhosted.org/packages/3d/e0/e8520146f144cb08720ddb89facd357551eb8c92d669d2a22f5de09ddd60/bigc-0.2.14-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "f992c705ca223622ece1ff2bf27c5eab15f7aed9722b0817e1d97b4bb7fbdf21",
"md5": "3a75df48b994094b24bb2d0a3219b46b",
"sha256": "ed73a517141fe149036754286483bae3bf11c55015c685a7189768183192ccb9"
},
"downloads": -1,
"filename": "bigc-0.2.14.tar.gz",
"has_sig": false,
"md5_digest": "3a75df48b994094b24bb2d0a3219b46b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9,<4.0",
"size": 9919,
"upload_time": "2023-10-27T16:35:52",
"upload_time_iso_8601": "2023-10-27T16:35:52.813534Z",
"url": "https://files.pythonhosted.org/packages/f9/92/c705ca223622ece1ff2bf27c5eab15f7aed9722b0817e1d97b4bb7fbdf21/bigc-0.2.14.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-27 16:35:52",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "MedShift",
"github_project": "bigc",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "bigc"
}