Closed dpriskorn closed 7 months ago
Hello @dpriskorn ,
I'm not against having an helper method for this, but did you test to put the wbi_config['...'] = '...' just below the imports, outside any class/method ?
from wikibaseintegrator import wbi_login
from wikibaseintegrator.wbi_config import config as wbi_config
wbi_config['MEDIAWIKI_API_URL'] = 'http://localhost/api.php'
class SomeThird():
def main(self):
# This part fail because MEDIAWIKI_API_URL is not a valid URL
wbi_login.Login(user='adminqsdsqdsqdsqd', password='change-this-password')
third = SomeThird()
third.main()
Yes, that solved it.
Yes, that solved it.
Thanks, but does this solution is good for you?
yes, lets keep it like this for now
Hi, I wrote https://github.com/dpriskorn/LexDanNet today and it complained about user agent.
I really dislike the dictionary thing because it is not easy to handle with classes.
I want helper methods instead to set all the necessary parameters.
Perhaps on the Login object which could be renamed to WikibaseConnection?