Properly Load & Manage API Keys in Python

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 เม.ย. 2023
  • In this video, we learn how to properly and securely load and manage your API keys in Python.
    ◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾
    📚 Programming Books & Merch 📚
    🐍 The Python Bible Book: www.neuralnine.com/books/
    💻 The Algorithm Bible Book: www.neuralnine.com/books/
    👕 Programming Merch: www.neuralnine.com/shop
    🌐 Social Media & Contact 🌐
    📱 Website: www.neuralnine.com/
    📷 Instagram: / neuralnine
    🐦 Twitter: / neuralnine
    🤵 LinkedIn: / neuralnine
    📁 GitHub: github.com/NeuralNine
    🎙 Discord: / discord
    🎵 Outro Music From: www.bensound.com/
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 35

  • @netbin
    @netbin ปีที่แล้ว +7

    Against which type of attack is this security measure is? What stops intruder to type out these variables and stealing the api keys if they go that far to have an access to files on the server

  • @paulthomas1052
    @paulthomas1052 ปีที่แล้ว

    Great demo - cheers !

  • @ashutoshdave1
    @ashutoshdave1 ปีที่แล้ว

    Excellent, thanks, keep it up!

  • @pleabargain
    @pleabargain 7 หลายเดือนก่อน

    Big thanks! I didn't know about SETX for windows!

  • @Micro-bit
    @Micro-bit ปีที่แล้ว

    Tkanks for summary!

  • @kenkioqqo
    @kenkioqqo ปีที่แล้ว

    Very well explained.

  • @judevector
    @judevector ปีที่แล้ว +6

    Am I the only one that is addicted to the intro beat❤

  • @jaswanthbsp
    @jaswanthbsp หลายเดือนก่อน

    That's a cool terminal customization

  • @hugo_guzman
    @hugo_guzman 6 หลายเดือนก่อน

    Informative, thank you. Could you explain the secure way of doing this, with encryption and password protection? TIA

  • @richardboreiko
    @richardboreiko 2 หลายเดือนก่อน

    One more thing to add to the video - if you'll be uploading the project to github, also create a .ignore file in the same directory as the .env file and simply put ".env" (without the quotes) in it.

  • @user-xu3so2ug1f
    @user-xu3so2ug1f ปีที่แล้ว +1

    my current way to manage api keys is to run it via 1password cli (replaces a string with the key when its run but there is no key in the code), the downsides are that it costs some money and non 1p users need to change it in the code ...

  • @santiagootero3580
    @santiagootero3580 3 หลายเดือนก่อน

    what about the .env file when launching the webste? isnt it vulnerable for malisious users whoose purpouse is to get the api keys?

  • @delharris8443
    @delharris8443 4 หลายเดือนก่อน

    Great information. Probably better if you slow down for us newbies.😊

  • @MelvinLiliewall
    @MelvinLiliewall 3 หลายเดือนก่อน

    thanks

  • @burgek1
    @burgek1 ปีที่แล้ว +3

    I don't really get it - if you don't want the API key visible in the script but have a file you can open in the same directory then it's not really much improvement on security? I was expecting some encryption?

    • @aflous
      @aflous ปีที่แล้ว +3

      the .env file would remain on your local machine, won't go into the code repo

    • @luan_dragonpro9669
      @luan_dragonpro9669 ปีที่แล้ว +2

      @@aflous then how tf are the ones using the code repo going to get it

  • @josephguerra5811
    @josephguerra5811 หลายเดือนก่อน

    Does this still work in June 2024? I saw somewhere that client was updated and/or may not be able to be used?

  • @mraghul7418
    @mraghul7418 ปีที่แล้ว +2

    Make some data science,machine learning, data analyst simple projects for resume as well as flask

    • @harshkulkarni8713
      @harshkulkarni8713 ปีที่แล้ว

      Yah bro we really need it

    • @rowlandwetmaker
      @rowlandwetmaker ปีที่แล้ว

      100%! Neural networks in simple terms with examples please :))) very easy going format of his vids. Thanks

  • @didierdavid9324
    @didierdavid9324 ปีที่แล้ว

    Thanks for your videos
    I'm making an app that uses google's TH-cam API
    how to hide the API key when I install the application on another computer?

  • @flor.7797
    @flor.7797 ปีที่แล้ว

    Flori ❤

  • @Lukikrudi
    @Lukikrudi ปีที่แล้ว +1

    Does anyone know what theme he is using for bash or zsh in the Ubuntu environment?

    • @aflous
      @aflous ปีที่แล้ว

      there is no theme whatsoever, this is just an image background used in the new Windows Terminal

    • @Lukikrudi
      @Lukikrudi ปีที่แล้ว

      @@aflous I don't mean the terminal background. There most definitely is a theme as stock ubuntu bash doesn't have a prompt like this. I assume it's a oh-my-zsh theme or the equivalent for bash.

  • @gamagedotme536
    @gamagedotme536 หลายเดือนก่อน

    chears !

  • @arifsoylu
    @arifsoylu ปีที่แล้ว +1

    TELL ME THE TERMINAL SOFTWARE YOU ARE USING, TELL ME NOW

  • @blender6895
    @blender6895 21 วันที่ผ่านมา

    my python doesnt look lik that

  • @mehdismaeili3743
    @mehdismaeili3743 ปีที่แล้ว

    Excellent. first comment !!!

  • @russhensel
    @russhensel ปีที่แล้ว

    I think that just using module variables in a "secret" directory is just as safe, and simpler, pure python. convince me i am wrong.

    • @aflous
      @aflous ปีที่แล้ว

      nope ;)

    • @ifeanyinneji7704
      @ifeanyinneji7704 ปีที่แล้ว

      What if you need to push your code to production?

    • @aflous
      @aflous ปีที่แล้ว +1

      Well, that's exactly the main raison for env files! You can push to production and handle configuration outside of your code (via ci/cd tools like Octopus for example)