HOW TO STORE PASSWORDS AND KEYS | Python

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 พ.ย. 2024

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

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

    Beautiful way of teaching. you completed step by step, repeating the mistakes & correcting those so that everyone can understand the reasons behind what u r doing.

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

    I love this method of teaching! You go through different mistakes that I would make and talk through how to correct it. Good job!

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

    Thank you so much, much appriciated sir !

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

    Thank you... Simple and crisp!

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

    Very informative. Thank you!

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

    Great introduction to an important topic! Do you have experience with the keyring library? It's very useful when the account running the program is logged in (at least in Windows; it works for MacOS and Linux too but I've only used it in Windows).

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

    Heads up for anyone with the "FileNotFoundError: [Errno 2] No such file or directory:" - the file has to be in python's current working directory, which can be found using
    print(os.getcwd()) < Once found put your .env file in that location. Alternatively you can specify the file path, but you're exposing where the file is contained:
    file_path = '/full/path/to/.test'
    with open(file_path, 'r') as file:
    line = file.readline()
    print(line)

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

    The way you explained it it very clear. very good! kudos! but still hiding your plain text keys in .env is insecure and big no for secure coding practice :)

    • @PythononPapyrus
      @PythononPapyrus  2 ปีที่แล้ว

      Thank you! Yes, of course, you should not store keys in .env on your production servers, but that's a good idea for the development

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

    Are you familiar with a method to encrypt your .env file? I don't like storing any password as plaintext. Have you ever integrated a password manager?

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

      Yes, I used that module: github.com/alexebaker/python-env_crypt

    • @frankepollo
      @frankepollo 3 ปีที่แล้ว

      @@PythononPapyrus Very cool!

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

    Can we access macOS's keychain using python?
    p.s. from security standpoint isn't that easer for hacker to get creds from env variables rather than keychain?

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

    But still you save a STRING of your password..

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

    interesting
    what?

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

    эй , ты же русский) давай ка по русскому)

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

    could use yaml and just load from a .gitignored pw file

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

      I do the same thing with TOML files for settings and the tomllib library (or tomli for earlier python versions). But I wouldn't store plaintext secrets in files unless I had assurance from my admins that nobody but a select few users have read access to these files.