digital-science / dimcli

Python client and CLI for scientometrics and research analytics using the Dimensions API.
https://digital-science.github.io/dimcli/getting-started.html
MIT License
43 stars 6 forks source link

How to suppress log warnings? #54

Closed ceteri closed 4 years ago

ceteri commented 4 years ago

When using this library to access Dimensions API, every call outputs:

DimCli v0.6.1.2 - Succesfully connected to <https://app.dimensions.ai> (method: manual login)

Is there any config setting to suppress those?

It's quite annoying, not an especially "pythonic" practice, and makes integration with production code more difficult to manage than it needs to be.

Many thanks -

lambdamusic commented 4 years ago

That's a good point / we'll add a verbose=False option to the login method in next release so that you can suppress that.

PS it was originally developed thinking of jupyter notebooks settings where users can benefit from a visual feedback..

lambdamusic commented 4 years ago

That's now in dimcli v0.6.2 - just do login(verbose=False) See https://github.com/digital-science/dimcli/blob/master/dimcli/__init__.py#L31

ceteri commented 4 years ago

Thank you so much @lambdamusic !