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 details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

Details for the file cornershop-0.1.0.tar.gz.

File metadata

  • Download URL: cornershop-0.1.0.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.27.1 setuptools/49.1.2 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.7

File hashes

Hashes for cornershop-0.1.0.tar.gz
Algorithm Hash digest
SHA256 66d1fd423e79a5ff1fadb7d5a6ea53b45efa0495ee95e9e8ddf0ce83ab65ef6f
MD5 a46620ef206c1a1b710fe6579d052081
BLAKE2b-256 e6f8b2343b961def921cc94cd834be14de00486d428198c7f16a747c8b1b2fd1

See more details on using hashes here.

File details

Details for the file cornershop-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cornershop-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.27.1 setuptools/49.1.2 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.7

File hashes

Hashes for cornershop-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 881f089320187ee05e8b06ed02d6c6a938b19001ef202f5769d8f986f057bb1c
MD5 80a7d2a28bfdcb47499a8b58b342e91f
BLAKE2b-256 2a0cf334fff72eb9750b01ea4f76b66c79633f24dc7e5800ff91a5ad850b222e

See more details on using hashes here.

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