Skip to main content

Lightspeed X Series Python Wrapper (lightspeed_x)

This is a simple Python wrapper for the Lightspeed X Series API. It allows you to easily interact with your Lightspeed POS system using Python code.

PLEASE NOTE: This package is intended for my portfolio, rather than public use. It is subject to change or abandonment. Feel free to use it, at your own risk.

Installation

Install the package using pip:

pip install lightspeed_x

Usage

from lightspeed_x import LightspeedX


# Replace with your credentials
personal_token = "YOUR_PERSONAL_TOKEN"
domain_prefix = "YOUR_DOMAIN_PREFIX"

# Create a LightspeedX object
lightspeed = LightspeedX(personal_token, domain_prefix)

# Get all products
products = lightspeed.get("/products")

# Create a new product
new_product = {
"name": "T-Shirt",
"sku": "TSHIRT123",
"price": 19.99,
}

lightspeed.post("/products", data=new_product)

# Update a product. You must specify api_version 2.1 to use this endpoint.
product_id = 456
updated_product = {
"name": "T-Shirt (Updated)",
"price": 24.99,
}

lightspeed.put(
    f"/products/{product_id}",
    data=updated_product,
    api_version="2.1",
)

# Delete a product
lightspeed.delete(f"/products/{product_id}")

Features

  • Supports all available Lightspeed X Series API endpoints.
  • Provides convenient methods for GET, POST, PUT, and DELETE requests.
  • Automatically handles authentication and request formatting.
  • Allows specifying the API version for each request. Default: 2.0

Documentation

Full API reference: https://x-series-api.lightspeedhq.com/reference

Contributing

Pull requests and suggestions are welcome! Please see the CONTRIBUTING.md file for details.

License

MIT License

Additional Notes

Refer to the Lightspeed X Series API documentation for more details on available endpoints and data structures.

Remember to replace the placeholder credentials with your own before using the code.

Metadata

Release files for lightspeed-x 0.1.2

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-x 0.1.2
File Size Uploaded
lightspeed_x-0.1.2.tar.gz 4.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lightspeed-x 0.1.2
File Interpreter ABI Platform
lightspeed_x-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 8.4 kB

Release files / lightspeed_x-0.1.2.tar.gz

Download URL lightspeed_x-0.1.2.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c60ae049c86335176b04b0367b5149c8aaaf003566c4132a227991926482f7c9
BLAKE2b-256 checksum
How to use checksums
fde90488f40927eccc52951126b0e32e84c747d3a70a19c99644891b574e5bdd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.7

Release files / lightspeed_x-0.1.2-py3-none-any.whl

Download URL lightspeed_x-0.1.2-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c35b7dd155965abee2f25b0198147a595ba6119468f54782d2e6350f6988920c
BLAKE2b-256 checksum
How to use checksums
8b62cb114ce98c9b23b7c41a571db94bbb8d4d76cbe2d0c4364f52c1a11d0d6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.7

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

1 release file

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