super noob question - configuration issues at the outset

60 views
Skip to first unread message

M Lyons

unread,
Jan 19, 2018, 2:43:41 PM1/19/18
to Brewery DB API
 Just got into the BreweryDB API and yet I cannot for the life of me get the thing config'd right. Forgive me for the supernoob question in advance, I'm still basically a baby.

Running python 3.6.4 with yarian's wrapper (https://github.com/yarian/brewerydb) and for some reason I keep getting bounced back to yarian's aforementioned 

AttributeError: class BreweryDB has no attribute X

error; which according to the github means I'm not calling configure, but the problem is, I keep getting

AttributeError: type object 'BreweryDB' has no attribute 'configure'


....which doesn't make a WHOLE lot of sense to me since the configure is what I'm supposed to be doing to avoid getting that message, isn't it?

Anyway, I'm posting what I've got so far below in the hopes that someone can help me get over this hurdle. I'm not going to be shocked if it's something super basic that I glossed over (typo, mis-capitalization, etc). Many, many thanks in advance.

from brewerydb import *
BreweryDB.config('API KEY REDACTED', ['http://api.brewerydb.com/v2/'])
brew_api = BreweryDB('API KEY REDACTED')
beers = brew_api.search_beer('fat tire')

print(beers)

CJ Landry

unread,
Mar 12, 2018, 11:38:12 AM3/12/18
to Brewery DB API
Hello ,

I would help you out myself, but I am in a similar situation.  I am also trying to connect to the API in Python.  I have my Key but I don't know the basics of what code to use to make a connection and make the simplest of requests.  If you find an answer to this please let me know and I will do the same.  Regards
Reply all
Reply to author
Forward
0 new messages