Skip to main content

A command-line interface for exploring breweries via the Open Brewery DB API.

Project description

brewcli

A command-line interface (CLI) for exploring breweries via the Open Brewery DB API.

Code Style: Ruff Type Checked: Mypy Python Versions License Downloads

brewcli is a Python-based CLI tool designed to interact with the Open Brewery DB API. With brewcli, you can fetch random breweries, search breweries by city, state, or type, and more—all from the command line.

Features

  • Fetch a list of random breweries.
  • Search breweries by city, country, name, postal code, state, type, or distance from a coordinate.
  • Retrieve detailed information about a specific brewery by its ID.
  • Output data in a user-friendly format.

Installation

Install brewcli using pip:

pip install brewcli

Usage example

Here are some examples of how to use brewcli:

Get a number of random breweries (the count is required):

brewcli random 5

Look up a specific brewery by its ID:

brewcli by-id b54b16e1-ac3b-4bff-a11f-f7ae9ddc27e0

Search breweries by city:

brewcli search --by-city "Cincinnati"

Search breweries by state and type:

brewcli search --by-state "California" --by-type "micro"

Available search filters: --by-city, --by-country, --by-dist (coordinates as 'lat,lon'), --by-name, --by-postal, --by-state, and --by-type (one of: micro, nano, regional, brewpub, planning, contract, proprietor, closed).

Run brewcli --help or brewcli <command> --help for full usage details.

Development setup

This project uses uv for dependency management and is pinned to Python 3.12 (see .python-version).

Clone the repository:

git clone https://github.com/tynardone/brewcli.git
cd brewcli

Create the virtual environment and install all dependencies (runtime + dev) from the lockfile:

uv sync

Run the CLI:

uv run brewcli --help

Run tests:

uv run pytest

Release History

  • 0.1.0
    • Work in progress

Meta

Tyler Nardone – tynardone@gmail.com - LinkedIn

Distributed under the MIT license. See LICENSE for more information.

https://github.com/tynardone/brewcli

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

brewcli-0.1.0.tar.gz (34.9 kB view details)

Uploaded Source

Built Distribution

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

brewcli-0.1.0-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: brewcli-0.1.0.tar.gz
  • Upload date:
  • Size: 34.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for brewcli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fa254bccc6019e89d2ae41576b35f9cdb1d2f95b5ccc38ceae3b4553ca5300ed
MD5 a6add489da9917896d5ecdc2dbf45f08
BLAKE2b-256 7b66528667c1206ca9add3c6ffe3f7c50d641b96f1ba06b5e244da46dc7fa796

See more details on using hashes here.

File details

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

File metadata

  • Download URL: brewcli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.24 {"installer":{"name":"uv","version":"0.11.24","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for brewcli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0e75e2051af504bfe34037e13c9d7c7f9d05d4ff14d7486fdbef7c8d2fd46a6a
MD5 8dfa92795e92d7265621d398a83d1572
BLAKE2b-256 c865fc5a018a768a420a3b9a4e652a8cc24ebbaba3315c036f96380f0afa657d

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