Skip to main content

A CLI tool to find specialty coffee shops near you

Project description

EspressoNow โ˜•

Python CLI tool to find specialty coffee shops near your current location.

Features

  • ๐ŸŒ Auto-location detection - Automatically detects your current location
  • ๐Ÿ“ Custom location search - Search near any address or coordinates
  • โ˜• Specialty coffee focus - Finds high-quality, specialty coffee shops
  • ๐ŸŽจ Beautiful output - Rich, colorful CLI interface with tables and progress bars
  • ๐Ÿ” Flexible search - Customizable search radius and result limits
  • ๐Ÿ—บ๏ธ Google Places API integration - Real-time coffee shop data from Google's database

Installation

From Source

git clone https://github.com/ethanqcarter/EspressoNow.git
cd EspressoNow
pip install -e .

Dependencies

pip install -r requirements.txt

Quick Start

Configuration

Required: You'll need a Google Places API key to search for coffee shops:

  1. Get an API key at Google Places API
  2. Set it as an environment variable:
    export GOOGLE_PLACES_API_KEY=your_key_here
    
  3. Or create a .env file:
    cp env.example .env
    # Edit .env and add your API key
    

Basic Usage

# Find coffee shops near your current location
espresso search

# Search with custom radius
espresso search --radius 5

# Search near a specific address
espresso search --location "123 Main St, San Francisco, CA"

# Search near coordinates
espresso search --location "37.7749,-122.4194"

Commands

search - Find coffee shops

espresso search [OPTIONS]

Options:
  -r, --radius FLOAT         Search radius in kilometers (default: 2.0)
  -n, --max-results INTEGER  Maximum number of results (default: 10)
  -l, --location TEXT        Search location (address or "lat,lng")
  --api-key TEXT             Google Places API key
  --min-rating FLOAT         Minimum rating (e.g., 4.0 for >4 stars)
  --exclude-chains           Exclude chain coffee shops (Starbucks, Dunkin, etc.)
  --specialty-only           Show only specialty coffee (4+ stars, no chains)
  --help                     Show help message

config - Show configuration

espresso config

Shows current configuration status and setup instructions.

Examples

Find coffee shops near current location

espresso search

Search with 5km radius, max 20 results

espresso search --radius 5 --max-results 20

Search near specific coordinates (San Francisco)

espresso search --location "37.7749,-122.4194"

Search near coordinates (New York City)

espresso search --location "40.7128,-74.0060"

Find only specialty coffee (4+ stars, no chains)

espresso search --specialty-only

Exclude chain coffee shops

espresso search --exclude-chains

Use specific API key

espresso search --api-key your_google_places_api_key

Example Output

Here's what you'll see when searching for specialty coffee in San Francisco:

$ espresso search --location "37.7749,-122.4194" --radius 8 --specialty-only --max-results 5
Using provided coordinates: 37.7749, -122.4194
โ ธ Searching for coffee shops...

โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Search Info โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ
โ”‚ ๐Ÿ“ Search Location: 37.7749, -122.4194                                                                   โ”‚
โ”‚ ๐Ÿ” Search Radius: 8.0km                                                                                  โ”‚
โ”‚ ๐Ÿ“Š Results Found: 8                                                                                      โ”‚
โ”‚ ๐Ÿ”ง Filters: โญ Min Rating: 4.0 | ๐Ÿšซ Chains Excluded | โ˜• Specialty Only                                  โ”‚
โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ

                                     โ˜• Specialty Coffee Shops Near You                                     
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ณโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”“
โ”ƒ Name              โ”ƒ Address                         โ”ƒ     Rating     โ”ƒ Price โ”ƒ Distance โ”ƒ Phone          โ”ƒ
โ”กโ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ•‡โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”ฉ
โ”‚ Zuni Cafรฉ         โ”‚ 1658 Market St, San Francisco,  โ”‚ โญโญโญโญ (4.4) โ”‚  $$$  โ”‚     242m โ”‚ (415) 552-2522 โ”‚
โ”‚                   โ”‚ CA 94102, USA                   โ”‚                โ”‚       โ”‚          โ”‚                โ”‚
โ”‚ Sightglass Coffee โ”‚ 270 7th St, San Francisco, CA   โ”‚ โญโญโญโญ (4.5) โ”‚  $$   โ”‚     991m โ”‚ (415) 861-1313 โ”‚
โ”‚                   โ”‚ 93103, USA                      โ”‚                โ”‚       โ”‚          โ”‚                โ”‚
โ”‚ Tartine Bakery    โ”‚ 600 Guerrero St, San Francisco, โ”‚ โญโญโญโญ (4.5) โ”‚  $$   โ”‚    1.6km โ”‚ (415) 487-2600 โ”‚
โ”‚                   โ”‚ CA 94110, USA                   โ”‚                โ”‚       โ”‚          โ”‚                โ”‚
โ”‚ The Mill          โ”‚ 736 Divisadero St, San          โ”‚ โญโญโญโญ (4.5) โ”‚  $$   โ”‚    1.6km โ”‚ (415) 345-1953 โ”‚
โ”‚                   โ”‚ Francisco, CA 94117, USA        โ”‚                โ”‚       โ”‚          โ”‚                โ”‚
โ”‚ Sweet Maple       โ”‚ 2101 Sutter St, San Francisco,  โ”‚ โญโญโญโญ (4.6) โ”‚  $$   โ”‚    1.8km โ”‚ (415) 655-9169 โ”‚
โ”‚                   โ”‚ CA 94115, USA                   โ”‚                โ”‚       โ”‚          โ”‚                โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

This example shows EspressoNow finding top-rated specialty coffee shops in San Francisco, including famous spots like Tartine Bakery, Sightglass Coffee, and The Mill - all with 4+ star ratings and no chain coffee shops included!

Output

EspressoNow displays results in a beautiful table format showing:

  • โ˜• Name - Coffee shop name
  • ๐Ÿ“ Address - Street address
  • โญ Rating - Star rating (1-5)
  • ๐Ÿ’ฐ Price - Price level ($-$$$$)
  • ๐Ÿ“ Distance - Distance from search location
  • ๐Ÿ“ž Phone - Contact number

API Integration

Google Places API (New)

EspressoNow uses the latest Google Places API (New) to find real coffee shops:

  • POST-based Nearby Search with "cafe" and "coffee_shop" types
  • Real-time data from Google's comprehensive database
  • Detailed place information including ratings, prices, and contact details
  • Supports up to 50km search radius

Note: A Google Places API key is required for the application to function.

Development

Project Structure

espressonow/
โ”œโ”€โ”€ __init__.py          # Package initialization
โ”œโ”€โ”€ cli.py              # Command-line interface
โ”œโ”€โ”€ core.py             # Core coffee shop finding logic
โ”œโ”€โ”€ location.py         # Location detection and services
โ””โ”€โ”€ models.py           # Data models (Pydantic)

Running Tests

# Install in development mode
pip install -e .

# Test the CLI
espresso search --help
espresso config

# Test with API key
export GOOGLE_PLACES_API_KEY=your_key_here
espresso search --location "San Francisco, CA"

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

License

MIT License - see LICENSE file for details.

Support


Made with โ˜• and โค๏ธ by coffee enthusiasts, for coffee enthusiasts.

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

espressonow-0.1.0.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

espressonow-0.1.0-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: espressonow-0.1.0.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for espressonow-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a8e9d4c8c0c9a595d0625867a674265d5753e46580a0d03a67e092bce7dbe45f
MD5 f2053952eabdb442dc7874924ccadbdd
BLAKE2b-256 ecf265a158ec8a47ff82a7302649eb20e1ed4ce5513952c5dc425ca2a367048d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: espressonow-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for espressonow-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 459eca4fc2ddd57ec64ca6d98122a263cd5c9a9b7ff3a8735de810f0d2391068
MD5 d10b25f88081ed2168521b3fbf4c03bd
BLAKE2b-256 7222db2260e1f50a286c74ce0249c111067e7c9a6b4aff4debe6a8de5689c6d0

See more details on using hashes here.

Supported by

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