Skip to main content
Copyright (c) 2017 Alex Raichev

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


Description-Content-Type: UNKNOWN
Description: Countdowner
************
.. image:: https://travis-ci.org/araichev/countdowner.svg?branch=master
:target: https://travis-ci.org/araichev/countdowner

A Python 3.4+ package to check for sales at Countdown grocery stores throughout New Zealand.
Pretty rough, but gets the job done.


Installation
=============
``pip install -U git+https://github.com/araichev/countdowner``


Usage
======
Here is a common workflow.

#. Get the stock codes of the products you want to watch by searching `the Countdown site <https://shop.countdown.co.nz/>`_. The stock code of a product is listed in the URL of its details page. For example, the stock code for the product at ``https://shop.countdown.co.nz/Shop/ProductDetails?stockcode=214684&name=colgate-360-toothbrush-medium-whole-mouth-clean`` is ``214684``.

#. Put your stock codes into a YAML watchlist along with your email address and a name for the watchlist. The watchlist ---call it ``watchlist.yaml``--- should have the form::

name: my_favorites
email_addresses:
- brainbummer@mailinator.com
- rhymedude@mailinator.com
products: |
description,stock_code
organic cheese,281739
GB chocolate,260803
Lupi olive oil,701829
Earthcare double toilet paper,381895
Dijon mustard,700630

#. Use the ``countdowner`` library functions as in the IPython notebook at ``ipynb/examples.ipynb`` or run ``countdownit --help`` from the command line for information on the command line tool. To use the emailing functionality of ``countdowner``, you'll need a (free) `Mailgun account <https://mailgun.com>`_.


Authors
========
- Alex Raichev (2017-05)


Notes
======
- Development status is Alpha
- This project uses semantic versioning
- I might extend this to New World stores once they roll out `more online shopping <http://www.newworld.co.nz/online-shopping/>`_
- Will replace ``grequests`` with a faster asynchronous HTTP requester as soon as someone makes one for ``trio``


History
========

0.3.1, 2017-11-10
-------------------
- Adapted ``parse_product`` function to Countdown's new HTML page format


0.3.0, 2017-10-06
-------------------
- Changed ``run_pipeline`` API


0.2.0, 2017-06-18
-------------------
- Allowed for multiple email addresses in watchlist
- In tests, replaced actual HTTP requests with mock ones


0.1.0, 2017-06-04
-------------------
- Replaced ``curio`` and ``curio-http`` with ``grequests`` for asynchronous requests. The latter is slower but easier to use.
- Handled invalid stock codes
- Added some automated tests


0.0.1, 2017-05-30
------------------
- First draft
Platform: UNKNOWN

Metadata

Release files for countdowner 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for countdowner 0.3.1
File Size Uploaded
countdowner-0.3.1.tar.gz 7.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for countdowner 0.3.1
File Interpreter ABI Platform
countdowner-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 17.7 kB

Release files / countdowner-0.3.1.tar.gz

Download URL countdowner-0.3.1.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
e8463b05505aa01cd75abb17cb36f4a04f2eea4a46c8c33ad003d07667b052a6
BLAKE2b-256 checksum
How to use checksums
97868264fb7071d7724c8da8bdb98e8b5bece62638d0ccebac32b94eb052a56f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / countdowner-0.3.1-py3-none-any.whl

Download URL countdowner-0.3.1-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
404c8122de7f9d58b28a8b5d9b9dbd041bc4a04c815997f9a41250d2f021ae3c
BLAKE2b-256 checksum
How to use checksums
8081e3e3fe6e2864096b4e691ba0082a6d44467d5bd5b1596411bfa05495e703
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.3.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page