Skip to content

GusFurtado/cornershop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Unofficial Python wrapper for Cornershop by Uber's API

Cornershop is a grocery delivery service owned by Uber.

This API allows the user to search for all available stores near a given zip code.

Please, check their official website at: https://cornershopapp.com/

Instalation

  • pip install cornershop

Dependencies

  • Python 3.6 or higher
  • requests

License

Even though this is just a wrapper, use it with caution, since the data fetched is Uber's property.

Getting Started

First, import and instanciate the Cornershop API model using your zip code as locality.

>>> from cornershop import Cornershop

>>> cs = Cornershop(
...     locality = '00000000',
...     country = 'BR'
... )

Then, call the following methods to fetch data from branches near your locality.

>>> cs.search_branches(query='...')
>>> cs.search_branch(branch_id='00000', query='...')
>>> cs.search_branch_group()
>>> cs.search_countries()

Set the json_format argument as True to return a json-style dictionaty instead of a cornershop model.

>>> cs = Cornershop(
...     locality = '00000000',
...     country = 'BR',
...     json_format = True
... )

Check the examples folder for more details about working with methods and working with models.