Skip to main content

Unoffical python client for TooGoodToGo API

Project description

Actions Status codecov PyPI version


Python client that help you to talk with TooGoodToGo API.

Python version: 3.6, 3.7, 3.8


  • login (/api/auth/v1/loginByEmail)
  • list stores (/api/item/)
  • get a store (/api/item/:id)
  • get all stores (/api/map/v1/listAllBusinessMap)
  • set favorite (/api/item/:id/setFavorite)

Used by:


pip install tgtg

Use it

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

# To get items (not only your favorites) you need to provide location informations

# Or get an item


This project uses poetry so you will need to install poetry locally to use following commands.

pip install poetry --user
poetry install

This project uses black to format all the code, isort to sort all imports and lint is done by flake8.

Just run this command to format automatically all the code you wrote:

make style

Run this command to run all tests:

make test

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 tgtg, version 0.3.0
Filename, size File type Python version Upload date Hashes
Filename, size tgtg-0.3.0-py3-none-any.whl (3.5 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size tgtg-0.3.0.tar.gz (3.6 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