Skip to main content

Trundler Python Package

Project description

trundlerpy

Documentation Status Build Status codecov Codacy Badge

This is a Python package for the Trundler API.

Installation

Install from GitHub.

!pip3 install git+https://github.com/datawookie/trundlerpy

Testing

To run the test suite:

  1. Set the TRUNDLER_KEY environment variable.
  2. Launch the tests with
pytest

Documentation

To build the documentation:

make -C docs/ html

Set the API Key

To access the full API you’ll need to first specify an API key. To obtain a key, please get in touch.

Storing your keys received from APIs and other sensitive information in a secure file or as an environment variable is considered best practice to avoid any potential malicious activity.

import os

key = os.getenv('TRUNDLER_KEY')

Usage

from trundlerpy import Trundler

tr = Trundler(key = key)

Retailers

Use retailer() to get a list of retailers.

tr.retailer()

You can access the details for a specific retailer.

tr.retailer(45)

Products

Get a list of products for a specific retailer.

tr.retailer_products(5)

Products can be filtered by name and brand.

tr.retailer_products(5, product = "coffee", brand = "nespresso")

Get information on a specific product, filtering it by ID.

tr.product(530290)

Get price history data for a specific product.

tr.product_prices(530290)

Documentation

TrundlerPy Documentation

Project details


Download files

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

Source Distribution

trundlerpy-0.1.1.tar.gz (4.8 kB view hashes)

Uploaded Source

Built Distribution

trundlerpy-0.1.1-py3-none-any.whl (5.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page