Skip to content

shriharishastry/brightpearl-python

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Brightpearl API Python Client

Wrapper over the requests library for communicating with the Brightpearl API.

Usage

  • Brightpearl Auth flow
from brightpearl.api import BrightPearlAPI

# To get authorization URL
auth_url = api.authorization_url(authorization_redirect_url="http://localhost/redirect_url")

# To get access token
api.oauth_fetch_token(code="XYZ", access_redirect_url="http://localhost/access_redirect_url")

# To refresh token
api.refresh_token(refresh_token="<referesh_token>")
  • Access Resources
from brightpearl.api import BrightPearlAPI

api = BrightPearlAPI(
    'client_id', "client_secret", False, "account", "domain",
    "access_token", "appref", "devref"
)

# get all products from brightpearl
products = api.Products.all()

# get specific product
product = api.Products.get(1035)

# remove product
api.Products.remove(1035)

About

Python client library for Brightpearl API : https://www.brightpearl.com

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%