Trundler Python Package
Project description
trundlerpy
This is a Python package for the Trundler API.
Installation
Install from GitHub.
pip install git+https://github.com/datawookie/trundlerpy
Testing
To run the test suite:
- Set the
TRUNDLER_KEY
environment variable. - 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
Package Maintenance
Managing Version
Use bumpversion to cleanly increment the version.
$ bumpversion patch
$ bumpversion minor
$ bumpversion major
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file trundlerpy-0.1.0.tar.gz
.
File metadata
- Download URL: trundlerpy-0.1.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcf9ac0d1cc6502e6e5a7711c6f65e3eab8e6b45ee0b6b510516ad084de5a377 |
|
MD5 | 558c92033bbaa4afd1be799b74f6e24f |
|
BLAKE2b-256 | c0728df3573b1fcd7035887a73505668d700e07dfd6af669710d16b18dbed711 |
Provenance
File details
Details for the file trundlerpy-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: trundlerpy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.6.0.post20200814 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 383aa9280a99f41ea224a95a17b2a4d6501f9039782bc84067cb0fd235bd8763 |
|
MD5 | ce20b5206ac9ee626c6efb4cd7092cb3 |
|
BLAKE2b-256 | bfbec2d490960875920f4f9661751fd1a1555b245e7a94d05c88202fa1a52b15 |