Skip to main content

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:

# 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"])

Metadata

Release files for lightspeed-api 0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lightspeed-api 0.5
File Size Uploaded Provenance Actions
lightspeed_api-0.5.tar.gz 4.1 kB Without provenance Details for lightspeed_api-0.5.tar.gz

Release files / lightspeed_api-0.5.tar.gz

Download URL lightspeed_api-0.5.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b8e9002ecf24cca1d5bbcb3512c073e6ff801aef337ca5b686c5ce38698fae9f
BLAKE2b-256 checksum
How to use checksums
fb597b8927b2a19c2660d251f8a91327bd31833e837901872dcd339d9992bb76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.2

Security for lightspeed-api 0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page