Unoffical python client for TooGoodToGo API
Python client that help you to talk with TooGoodToGo API.
Python version: 3.6, 3.7, 3.8
- list stores (
- get a store (
- get all stores (
pip install tgtg
from tgtg import TgtgClient # login with email and password client = TgtgClient(email=your_email, password=your_password) # or you can login with user_id and access_token # (you can retrieve them from client after logged with email and password) client = TgtgClient(access_token=your_access_token, user_id=your_user_id) # You can then get some items, default will get **only** your favorites client.get_items() # To get items (not only your favorites) you need to provide location informations client.get_items( favorites_only=False, latitude=48.126, longitude=-1.723, radius=10, ) # Or get an item client.get_item(1234) # get all items **without** auth (with limited fields, used for the map in the app) client = TgtgClient() client.get_all_business()
This project use poetry so you will need to install locally poetry to use following commands.
pip install poetry --user poetry install
Just run this command to format automatically all the code you wrote:
Run this command to run all tests:
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size tgtg-0.1.2-py3-none-any.whl (3.3 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size tgtg-0.1.2.tar.gz (3.4 kB)||File type Source||Python version None||Upload date||Hashes View|