Giter Site home page Giter Site logo

Comments (5)

stevemessick avatar stevemessick commented on July 16, 2024

Could you give us a little more detail? An example of what you want to do would be great.

from kaggle-api.

YuenSzeHong avatar YuenSzeHong commented on July 16, 2024

Could you give us a little more detail? An example of what you want to do would be great.

I guess he ment user secrets (like api keys that we dont want to expose)

from kaggle-api.

stevemessick avatar stevemessick commented on July 16, 2024

No, I do not think we want to do that. I think it would introduce security issues. @rosbo Could you confirm?

The way to manage your API key is with the kaggle_secrets package. See:
https://www.kaggle.com/code/harupy/how-to-use-kaggle-api-as-a-python-library

This package is only available in Kaggle notebooks and is a secure way to set up user name and key.

from kaggle-api.

rosbo avatar rosbo commented on July 16, 2024

@stevemessick To clarify, kaggle_secrets is used to access secrets in a notebook (i.e. get the secret value).

from kaggle_secrets import UserSecretsClient

secret_value = UserSecretsClient().get_secret("YOUR_SECRET_NAME")

kaggle_secrets doesn't allow setting the value, it only reads the value. Currently, the value must be set from Notebook Editor > Add-ons > Secrets. Another thing to note is that secrets are set at your account level. Then, you can decide which secrets you want to attach to a specific notebook. If you update the value of a secret, the new value will be used by all notebooks using that secret.

@bleakprestiger Are you asking for an option to "attach" a given list of secrets automatically when calling kaggle kernels push?

Or are you asking for new methods in the CLI to set user secrets. Something along the lines of:

kaggle secrets set MY_API_KEY abcdefghijk123

Thank you

from kaggle-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.