Skip to main content

Interface for the PlentyMarkets API.

Project description

Overview

Interface for the PlentyMarkets API.

Setup

Requirements

  • Python 3.7.8+

Installation

Install it directly into an activated virtual environment:

$ pip install python_plenty_api

or add it to your Poetry project:

$ poetry add python_plenty_api

Usage

After installation, the package can imported:

$ python
>>> import plenty_api
>>> plenty_api.__version__

Examples

import plenty_api

def main():
    # Get the bearer token and set the basic attributes for an endpoint
    plenty = plenty_api.PlentyApi(base_url='https://{your-shop}.plentymarkets-cloud01.com',  # available under setup->settings->API->data
                                  use_keyring=True,  # Save the credentials into your system wide Keyring or not
                                  data_format='json',  # Choose the output format (default JSON)
                                  debug=True)  # display the constructed endpoint before making the request

    orders = plenty.plenty_api_get_orders_by_date(start='2020-09-20',
                                                  end='2020-09-24',
                                                  date_type='payment',  # Get orders that were payed in between [start] and [end]
                                                  additional=['documents', 'locations'],  # Include additional attributes to the response
                                                  refine={'orderType': '1', 'referrerId': '1'})  # Only get orders with type 1 and from referrer 1

if __name__ == '__main__':
    main()

Contact

Author: Sebastian Fricke, Company: Panasiam, Email: sebastian.fricke.linux@gmail.com

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for plenty-api, version 0.2.2
Filename, size File type Python version Upload date Hashes
Filename, size plenty_api-0.2.2-py3-none-any.whl (24.7 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size plenty_api-0.2.2.tar.gz (23.2 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page