Skip to content
 
 

Latest commit

 

History

23 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Actions Status codecov

tgtg-python

Python client that help you to talk with TooGoodToGo API.

Handle:

  • login
  • list stores (/item/)
  • get a store (/item/<pk>)

Used by:

Install

For now, install it from github (it will be publish in PyPi)

pip install https://github.com/ahivert/tgtg-python/archive/master.zip

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 items (as default it will get your favorites)
client.get_items()

# Or get an item
client.get_item(1234)

Developers

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

This project use 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

About

Unofficial client for TooGoodToGo API

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages