Whether has set kanaries api key.
()
| 25 | |
| 26 | |
| 27 | def show_tips_user_kaggle() -> bool: |
| 28 | """Whether has set kanaries api key.""" |
| 29 | from kaggle_secrets import UserSecretsClient |
| 30 | try: |
| 31 | has_set_api_key = bool(UserSecretsClient().get_secret("kanaries_api_key")) |
| 32 | except Exception: |
| 33 | has_set_api_key = False |
| 34 | |
| 35 | tips = """ |
| 36 | <p>Since you haven't set the kannaries_api_key, Pygwalker assumes it's your first time using it on Kaggle.</p> |
| 37 | <p>Due to the persistent file approach in Kaggle, there may be some impact on the user experience when using Pygwalker on Kaggle.</p> |
| 38 | <p>Please take a moment to read this article: <a href="https://github.com/Kanaries/pygwalker/wiki/Best-Practices-for-Using-Pygwalker-in-Kaggle">Best Practices for Using Pygwalker in Kaggle</a>, which can help you optimize your Pygwalker experience on Kaggle.</p> |
| 39 | """ |
| 40 | |
| 41 | if not has_set_api_key: |
| 42 | display_html(tips) |
nothing calls this directly
no test coverage detected