-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite user-agent handling #638
Comments
dpriskorn
changed the title
Helper method to determine if WBI is logged in
Rewrite user-agent handling
Dec 7, 2023
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. |
Thanks, but does this solution is good for you? |
yes, lets keep it like this for now |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?
The text was updated successfully, but these errors were encountered: