HOW TO STORE PASSWORDS AND KEYS | Python

Поділитися
Вставка
  • Опубліковано 26 лют 2021
  • Andrey Ivanov - Python
    Use my discount link for OKEX crypto exchange: www.okx.com/join/PYTHONANDREY
    My UDEMY courses: www.udemy.com/user/andrey-iva...
    Donations: www.donationalerts.com/r/pyth...
    Github: github.com/knucklesuganda
    Telegram канал: t.me/pypapyrus
    Other videos on Python: • Python
    Leave your like and subscribe!
    #Python #program #it #tutorial #guide #begginers #code #programming

КОМЕНТАРІ • 19

  • @BlinkVirus
    @BlinkVirus 2 роки тому +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 Місяць тому

    Thank you so much, much appriciated sir !

  • @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.

  • @TheKuruamparambatta
    @TheKuruamparambatta Рік тому

    Thank you... Simple and crisp!

  • @christophermunoz3718
    @christophermunoz3718 2 роки тому +2

    Very informative. Thank you!

  • @eksortso
    @eksortso 3 місяці тому

    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).

  • @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?

  • @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!

  • @user-hc2sm9rd1e
    @user-hc2sm9rd1e Рік тому +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  Рік тому

      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

  • @icedsolid
    @icedsolid 11 місяців тому

    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)

  • @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 Рік тому +1

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

    • @eksortso
      @eksortso 3 місяці тому

      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.