lightspeed-api


Namelightspeed-api JSON
Version 0.5 PyPI version JSON
download
home_pagehttps://github.com/beckf/lightspeed_api
SummarySimple library for interacting with the Lightspeed HQ API
upload_time2022-12-02 00:33:07
maintainer
docs_urlNone
authorForrest Beck
requires_python
licenseMIT License
keywords lightspeed hq api pos
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Lightspeed HQ API Python Library
**Updated for Lightspeed API V3**

Gives easy access to the Lightspeed retail point of sale api.

To use create a new object with settings in a dictionary.  Then just specify
the endpoints and parameters in your request.

For API documentation see: https://developers.lightspeedhq.com/retail/introduction/introduction/

Some examples of uses:

```python
# Create a new dictionary with some settings that we will need.
import lightspeed_api

c = {'account_id': '12345678',
    'client_id': 'developer_client_id',
    'client_secret': 'developer_client_secret',
    'refresh_token': 'special_refresh_token'
}
    
ls = lightspeed_api.Lightspeed(c)

# Get a customer record
ls.get('Customer/1234')

# Delete a customer by id number
ls.delete('Customer/1234')

# Create a new customer
formatted = {'Customer':
                {'firstName': 'Joe',
                 'lastName': 'Smith',
                 'companyRegistrationNumber': '1234',
                 'customerTypeID': 1,
                 'Contact': {
                     'custom': '',
                     'noEmail': 'false',
                     'noPhone': 'false',
                     'noMail': 'false',
                     'Emails': {
                         'ContactEmail': {
                             'address': 'joe.smith@company.com',
                             'useType': 'Primary'
                         }
                     },
                     'Addresses': {
                         'ContactAddress': {
                             'address1': '1212 Street Drive',
                             'address2': '',
                             'city': 'New York',
                             'state': 'New York',
                             'zip': '12345',
                             'country': 'USA',
                             'countryCode': '',
                             'stateCode': ''
                         }
                     }
                 },
                 }
            }
ls.create("Customer", formatted["Customer"])



```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/beckf/lightspeed_api",
    "name": "lightspeed-api",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Lightspeed,HQ,API,POS",
    "author": "Forrest Beck",
    "author_email": "forrest.beck@da.org",
    "download_url": "https://files.pythonhosted.org/packages/fb/59/7b8927b2a19c2660d251f8a91327bd31833e837901872dcd339d9992bb76/lightspeed_api-0.5.tar.gz",
    "platform": null,
    "description": "# Lightspeed HQ API Python Library\n**Updated for Lightspeed API V3**\n\nGives easy access to the Lightspeed retail point of sale api.\n\nTo use create a new object with settings in a dictionary.  Then just specify\nthe endpoints and parameters in your request.\n\nFor API documentation see: https://developers.lightspeedhq.com/retail/introduction/introduction/\n\nSome examples of uses:\n\n```python\n# Create a new dictionary with some settings that we will need.\nimport lightspeed_api\n\nc = {'account_id': '12345678',\n    'client_id': 'developer_client_id',\n    'client_secret': 'developer_client_secret',\n    'refresh_token': 'special_refresh_token'\n}\n    \nls = lightspeed_api.Lightspeed(c)\n\n# Get a customer record\nls.get('Customer/1234')\n\n# Delete a customer by id number\nls.delete('Customer/1234')\n\n# Create a new customer\nformatted = {'Customer':\n                {'firstName': 'Joe',\n                 'lastName': 'Smith',\n                 'companyRegistrationNumber': '1234',\n                 'customerTypeID': 1,\n                 'Contact': {\n                     'custom': '',\n                     'noEmail': 'false',\n                     'noPhone': 'false',\n                     'noMail': 'false',\n                     'Emails': {\n                         'ContactEmail': {\n                             'address': 'joe.smith@company.com',\n                             'useType': 'Primary'\n                         }\n                     },\n                     'Addresses': {\n                         'ContactAddress': {\n                             'address1': '1212 Street Drive',\n                             'address2': '',\n                             'city': 'New York',\n                             'state': 'New York',\n                             'zip': '12345',\n                             'country': 'USA',\n                             'countryCode': '',\n                             'stateCode': ''\n                         }\n                     }\n                 },\n                 }\n            }\nls.create(\"Customer\", formatted[\"Customer\"])\n\n\n\n```\n\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Simple library for interacting with the Lightspeed HQ API",
    "version": "0.5",
    "split_keywords": [
        "lightspeed",
        "hq",
        "api",
        "pos"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "4cf3fb790ef639317dd0252882d977ee",
                "sha256": "b8e9002ecf24cca1d5bbcb3512c073e6ff801aef337ca5b686c5ce38698fae9f"
            },
            "downloads": -1,
            "filename": "lightspeed_api-0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "4cf3fb790ef639317dd0252882d977ee",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4139,
            "upload_time": "2022-12-02T00:33:07",
            "upload_time_iso_8601": "2022-12-02T00:33:07.784430Z",
            "url": "https://files.pythonhosted.org/packages/fb/59/7b8927b2a19c2660d251f8a91327bd31833e837901872dcd339d9992bb76/lightspeed_api-0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-02 00:33:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "beckf",
    "github_project": "lightspeed_api",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "lightspeed-api"
}
        
Elapsed time: 0.01704s