Skip to main content

A Python wrapper for Cornershop by Uber's API.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cornershop-0.1.0.tar.gz (9.2 kB view hashes)

Uploaded Source

Built Distribution

cornershop-0.1.0-py3-none-any.whl (5.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page