Python Connector for BigCommerce

Using the module - Python Connector for BigCommerce

Using the module

To retrieve data from BigCommerce:

  1. Import the module.
    import devart.bigcommerce as bigcommerce
  2. Connect to a database using the connect() module method and obtain a connection object:
    • If you're using basic authentication:
      my_connection = bigcommerce.connect(
          Version="Ver2",
      Authentication="Basic",
      Server="your_bigcommerce_url",
      UserId="your_username",
      AuthenticationToken="your_auth_token" )
    • If you're using OAuth 2.0 authentication:
      my_connection = bigcommerce.connect(
          Version="Ver2",
          Authentication="OAuth",
          StoreId="your_store_hash",
          ClientId="your_client_id",
          AccessToken="your_access_token"
      )
  3. Create a cursor object using the cursor() connection method.
    my_cursor = my_connection.cursor()
  4. Execute the SQL statement using the execute() cursor method.
    my_cursor.execute("SELECT * FROM employees")
  5. Retrieve the result set using one of the fetch*() cursor methods.
    for row in my_cursor.fetchall(): 
        print(row)
© 2022-2025 Devart. All Rights Reserved. Request Support Python Connectors Forum Provide Feedback