Python Quick Tip: Hiding Passwords and Secret Keys in Environment Variables (Windows)

Поділитися
Вставка
  • Опубліковано 25 жов 2024

КОМЕНТАРІ • 235

  • @krenewable726
    @krenewable726 6 років тому +122

    one of the best channels out there for python, your channel has been one of my best references thank you for your tutorials

  • @Zero11_ss
    @Zero11_ss 5 років тому +52

    I think your videos are my fav now since you just go into exactly what the video is about without any silly music or anything =p

  • @neerajankam6196
    @neerajankam6196 5 років тому +32

    Here's a shortcut to get to environment variables quicker.
    1) Press Windows key and when the search bar shows up, type in 'env'
    2) Click on 'Edit the system environment variables' and you'll directly be taken to the window where you can edit you env variables.

  • @Asparuh.Emilov
    @Asparuh.Emilov 3 роки тому +6

    Absolute Best Python teacher! Simple, straight to the point, all details explained! Just amazing!

  • @ebeldekoning5331
    @ebeldekoning5331 4 роки тому +9

    Yes Finallt someone who just tells me what I want to know and how to do it! I have been looking for this for days!

  • @mihirjain1047
    @mihirjain1047 3 роки тому +2

    We can also use windows credential manager for this purpose, one added benefit is that the credentials-password is stored as a hidden field, this can be accessed using keyring library.

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

    woah. i've gotta come back to your channel later on, this was amazing. quick, simple, useful, easy to understand, perfect pacing! thanks!!!

  • @marcosrod7260
    @marcosrod7260 4 роки тому +4

    Thank you so much! Was spending too much time online to fix my error, but all I had to do was close and reopen vs code.

    • @rakshitpuri4192
      @rakshitpuri4192 4 роки тому +1

      Thanks for this.

    • @mikemaer
      @mikemaer 3 роки тому +2

      I second the thanks for this lol! Was wondering why it wasnt working, had to reset the venv.

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

    Incredibly easy to understand, easy to do, and quickly explained. Thank you very much my friend.

  • @ABASSANIMERIKUKU
    @ABASSANIMERIKUKU 24 дні тому

    Thanks a lot for this. I also thanks those who do comment on the problems they faced and the possible solution....much love🥰

  • @ashkanfarahani6532
    @ashkanfarahani6532 3 роки тому

    You know you are good. no confusing instructions whatsoever!

  • @lloydbalogun
    @lloydbalogun 4 роки тому

    2020? still one of the best channel for Python coding.... Please keep it up

  • @fouezdesign
    @fouezdesign 3 роки тому

    Corey , you gonna go to heaven , thank you so much , you have no idea how much i've been struggling with this .

  • @karthickraju4516
    @karthickraju4516 5 років тому +9

    Omg, u saved my day. I literally have to come up like this today. Thanks for the video!

  • @tysibley8734
    @tysibley8734 2 роки тому

    Super simle and straight to the point. Saved me on a homework assignment for sure!

  • @au_solutions
    @au_solutions 4 роки тому

    This vid saved me from forgetting to setup git ignore and leaking my tokens. Thank you Corey!

  • @el-jay_
    @el-jay_ 7 місяців тому

    niiice. so simple and easy to follow.
    my task got marked down because I made the newbie mistake of not hiding the django-project 'SECRET_KEY'.
    hope this correction meets their requirements.

  • @jasparta993
    @jasparta993 3 роки тому

    I watched 10 tuts about this... I got ~60% information/ knowledge... and 5% practice... Here I found 100% needed informations and 100% base practice :D

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

    Started using Python in 2024 and I love this quick tip :)

  • @devjyotisinha3928
    @devjyotisinha3928 4 роки тому

    I have been searching for a solution to securely store keys .. this method helps me.. thank you 👍

  • @python360
    @python360 4 роки тому +1

    I was using this method in a Scrapy spider, it didn't work...until...
    source ~/.bash_profile
    Then it worked. 👍
    Just in case anyone else has done the same

  • @coding-rev
    @coding-rev 4 роки тому

    Thanks man. This video just solved almost 99.99% of my problems.. Bless up

  • @CatsAndCode
    @CatsAndCode 4 роки тому +1

    one of the best tutorials ives seen

  • @dantedt3931
    @dantedt3931 5 років тому +1

    Wow!You saved my day man!Always delivering great content.Thanks!!

  • @cagataysert1995
    @cagataysert1995 6 років тому +4

    Hey Corey, thank you very much for your all perfect tutorials. They are really beneficial for me because I am learning Python by myself. Also I just wanna say that if you speak a bit slower, it would be better for people who have english as a second language.But anyway they are really great tutorials for me and I appreciate your help.

  • @ajinkyanarnaware6593
    @ajinkyanarnaware6593 6 років тому +3

    Very helpful Tutorial Sir. Please Keep up this good work.

  • @rougearlequin
    @rougearlequin 3 роки тому

    You make it look very simple. I will go ahead and use it in my next script.

  • @karthikmishra3188
    @karthikmishra3188 4 роки тому

    couple of things which say, why this channel is the best for python on yt
    1) he knows exactly what he is doing
    2) he talks specifically what is needed for the viewer
    3) The fluency ..( It's not about his first language being English. I have seen videos, people struggling a lot to explain)
    Thank u for being there Corey. U are Awesome *** This is to request for the Data Structure and Algorithms series u should start. Plz

  • @babakzare6456
    @babakzare6456 2 роки тому

    You Are A LIFE SAVOR! Thank you for all these amazing tutorials

  • @jankamel
    @jankamel 2 роки тому

    Thanks for the easy approach

  • @shoubhikmukherjee5289
    @shoubhikmukherjee5289 5 років тому +1

    Love your channel.So informative and simple!

  • @the1anonymouse
    @the1anonymouse 3 роки тому

    Great video! Quick, clear, and to the point

  • @arniie5288
    @arniie5288 4 роки тому +2

    Really helpful thanks

  • @rockdread3415
    @rockdread3415 3 роки тому

    Thanks a lot! Now I know how I can avoid adding passwords directly in my code.

  • @kakoozarichard5769
    @kakoozarichard5769 4 роки тому

    You make python look easy bro. Keep it Up

  • @ivancarrillo1889
    @ivancarrillo1889 3 роки тому

    Very useful and clearly explained. Thanks!

  • @hubertcombomarketing2693
    @hubertcombomarketing2693 4 роки тому +1

    Very helpful Python Tip. Thank You.

  • @P3ace1oveUn1ty
    @P3ace1oveUn1ty 3 роки тому

    Thank you for all of the amazing content you put together. I have learned so much from you.

  • @Dame4Lyf3
    @Dame4Lyf3 6 років тому

    Interesting take never knew this, my approach was in creating a credentials file and import from my main file - this was due to password expiration issues and would only need to update credentials file. thanks for the content and explanation.

  • @SkaNarrator
    @SkaNarrator 5 років тому +1

    Excellent video as always.

  • @pedrolopez4555
    @pedrolopez4555 5 років тому +1

    Nice and simple. Thanks!

  • @MUZIXABA
    @MUZIXABA 6 років тому +1

    Corey, you are a Python God!

  • @nucleusnode23
    @nucleusnode23 2 роки тому

    Simple but useful video

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

    Thank you for this. Very helpful

  • @mrmuranga
    @mrmuranga 5 років тому +1

    great advice and quick learnings to gain from Corey....

  • @raysun5889
    @raysun5889 6 років тому +4

    Yo Corey, thank you for the wonderful contents as always,
    Is it possible to include multi-threading and multi-processing in the future topics,
    that would be very much appreciated,

  • @thcarm
    @thcarm 2 роки тому

    thanks a lot Corey! really useful!

  • @vidhprak
    @vidhprak 5 років тому +1

    Amazing tutorials !! Easy to understand..

  • @ecsantana
    @ecsantana 3 роки тому

    damn... finally I found a proper explanation to this matter! ! ! thanks a lot! ! !

  • @relax-bq7ij
    @relax-bq7ij 4 роки тому +1

    That is just awesome... thanks dude

  • @josephturi
    @josephturi 6 років тому +6

    To do this in the command line and set a global or system variable using SETX::
    1. Open command line as administrator
    2. setx DB_USER "my_db_user"
    (> SUCCESS: Specified value was saved.)
    3. Close and reopen command line
    4. echo %DB_USER%
    my_db_user
    setx DB_USER "my_db_user" will put it in the User Variables
    setx /m DB_USER "my_db_user" will put it in the System Variables

  • @perfectcodeonline4879
    @perfectcodeonline4879 4 роки тому

    love you corey for this video

  • @stephencrumley2627
    @stephencrumley2627 5 років тому +1

    Thank you very much for your great instructional videos!

  • @SumanthLazarus
    @SumanthLazarus 4 роки тому

    Just watched your tutorial for MAC/Linux; searched for the Windows one to find a fix for my usecase!

  • @thenaturat666
    @thenaturat666 3 роки тому

    This is what i needed. Thanks a lot.

  • @8koi139
    @8koi139 3 роки тому

    This helps a lot... and it's so cool!!! Like wow!!

  • @alphyism
    @alphyism 4 роки тому

    Exact solution to the problem I was facing, if a upload the code to a server maybe docker nothing else I have to do with regard to the passwords

  • @ThePerdex
    @ThePerdex 4 роки тому

    Thanks a lot man! :) This was exactly what I needed, I really appreciate it.

  • @timkirk820
    @timkirk820 3 роки тому

    Great video! thanks for sharing

  • @magnomendes7373
    @magnomendes7373 3 роки тому +3

    Hi Corey, thank very much for the awesome videos! I have a question, what do we do if we don't have access to the same computer? I often work on different machines, how do I handle that?

    • @oeldel
      @oeldel Рік тому +2

      Look at this video -- -- > ua-cam.com/video/YdgIWTYQ69A/v-deo.html

  • @Pablo-bl7nu
    @Pablo-bl7nu 5 років тому +2

    It worked, easy-peasy, thx

  • @visualdad9453
    @visualdad9453 3 роки тому

    Thank you Corey!

  • @josefvesely3
    @josefvesely3 5 років тому +1

    Thanks, this helped me a lot!

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

    simple and easy thanks

  • @shashanksharma7242
    @shashanksharma7242 4 роки тому

    Thanks Corey!

  • @cornisto9366
    @cornisto9366 2 роки тому +1

    Hi Corey, thanks for the tutorial. What if I set the environment variables but it keeps returning none when I try to read them in my python script?

  • @angeldavid4514
    @angeldavid4514 3 роки тому

    If you are having trouble with gmail or smtp auth problems just activate less secure apps to your gmail, I recommend also don't use your main email for this kind of things

  • @ABMA79
    @ABMA79 3 роки тому +1

    I am following all the steps, but still getting none for calling the environment variable. can you tell me where I went wrong here. I am following all the steps. The python is not generating any error, but no results in return. please give me advice.

  • @MuhammadAhmad-dg9id
    @MuhammadAhmad-dg9id 3 роки тому +1

    Hi Corey,
    This is the first time I came across your channel. First of all thanks for making such informative videos. I have a question that lets say I want to deploy my app to AWS. Obviously, we are making environment variables to our local machine. So, how can we use them on AWS?

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

      ua-cam.com/video/YdgIWTYQ69A/v-deo.html

  • @Lowzenza4
    @Lowzenza4 6 років тому +2

    Hi Corey, I was wondering if you'd be making a tutorial on argparse as well? Also...can't wait for your new tutorial playlists especially pandas :D

  • @akashp4863
    @akashp4863 3 роки тому +1

    If we save password as env variables in a server and if the hacker hacks into the server, wont he be able to see the password too?

  • @venkataprasad3808
    @venkataprasad3808 6 років тому

    Hi Corey,
    I have intermediate skills in Python and Javascript, now I am interested in Bitcoin and Blockchain technologies. Which is suitable for Bitcoin? Python or Javascript or both..
    when we use Python and when we use Javascript for Bitcoin?
    I have searched so many sites, but I can't get any detailed info about which technology to pick
    Can you clarify me.

    • @coreyms
      @coreyms  6 років тому +3

      Hey there. I wish I knew more about this, but I am fairly unfamiliar with Cryptocurrency at the moment. I know enough to be interested but not enough to teach anyone else. I plan on learning more in the near future and will be sure to make videos on anything I find out.

  • @alexandercuartas830
    @alexandercuartas830 4 роки тому +1

    I might be a lil late, but thanks a lot

  • @spryte4371
    @spryte4371 4 місяці тому

    man i love this guy

  • @techovernow7539
    @techovernow7539 4 роки тому +1

    Thanks for this awesome video Corey! However, I wonder what will happen once i go live online. How do I manage this once I've uploaded my app to a cpanel online?

  • @nickng8069
    @nickng8069 4 роки тому

    so simple, thanks!

  • @mais4mjay
    @mais4mjay 2 роки тому

    Good job @coreyms. But what I don't get here is where do I generate this database login details from? You said what you used in this demonstration is a dummy login details.

  • @Autonomous_Drone
    @Autonomous_Drone 3 роки тому

    Thank you sir!

  • @ansontong560
    @ansontong560 6 років тому

    Thanks Corey, Really like your teaching =]

  • @YSN596
    @YSN596 4 роки тому

    I also got subscribed to your channell.. thanks...

  • @sagshah10
    @sagshah10 6 років тому

    Hi Corey, thank you for amazing tutorials really enjoy all your videos, especially due to how simple and clearly you explain the topic you discuss. Speaking of Hiding Passwords and Secret Keys, some ideas for future videos, could you possibly cover SMTP Lib, or some other lib for accessing and handling emails using Python. If you have already covered the SMTP Lib, then sorry, just couldnt find its video using UA-cams search.

  • @YSN596
    @YSN596 4 роки тому

    Hi Corey, thanks for the video first of all but I have a problem with setting environment and database_url which I mean I have no idea where to start from... my import file codes like this:
    import csv
    import os
    from sqlalchemy import create_engine
    from sqlalchemy.orm import scoped_session, sessionmaker
    # Set up database
    engine = create_engine(os.getenv("DATABASE_URL"))
    db=scoped_session(sessionmaker(bind=engine))
    # Check for environment variable
    if not os.getenv("DATABASE_URL")
    raise RuntimeError("DATABASE_URL is not set")
    please give ma tip or idea how to start or proceed... thanks so much....

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

    Thanks you so much 🤗❣️

  • @elbezz
    @elbezz 4 роки тому +1

    Thank you!

  • @yirenong5583
    @yirenong5583 6 років тому +4

    How about password vault?I am stuck in finding out the best practice to store password.

  • @maaz3326
    @maaz3326 6 років тому +1

    This tutorial helped me a lot thanks for making theese amazing videos +1 sub

  • @saidkarimsaidmahmudov3048
    @saidkarimsaidmahmudov3048 6 років тому

    Very helpful and clear tutorial Corey. Thank you a lot ... Can you please make a video of how to deploy python flask app to server ? i'm very beginners with making web sites and staff like that , however i have been practicing only with local host and so on , i would love to learn hosting and staff like that

  • @dubugman
    @dubugman 5 років тому +1

    Couldn't someone hypothetically go into their own environment variables, set the user and password to whatever they liked to get access? Sorry if this is a stupid question, just seemed like there was a work-around.

  • @olasoderlind5685
    @olasoderlind5685 3 роки тому

    this is awsome thanks

  • @txc1e_
    @txc1e_ 3 роки тому

    This was a very heplful video.

  • @laysauchoa7557
    @laysauchoa7557 4 роки тому

    You are awesome! thank you so much!

  • @mukulkathayat6288
    @mukulkathayat6288 2 роки тому

    Best tutorials...

  • @nehemiahlimocheburet1411
    @nehemiahlimocheburet1411 5 років тому

    I love this channel!

  • @ravenflores6148
    @ravenflores6148 4 роки тому +1

    I LOVE YOU MAN

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

    thank you so much;😊😊

  • @MrLotrus
    @MrLotrus 6 років тому

    thanks. Very useful!

  • @yossepbinyoum2181
    @yossepbinyoum2181 3 роки тому

    Thank Corey with you IT is god damn simple

  • @harshitpandey4972
    @harshitpandey4972 3 роки тому +2

    I'm using pycharm
    I followed every step but still getting 'None' even after restarting IDE and PC

    • @VasheshJ
      @VasheshJ 3 роки тому

      Add environment variables both in User Variables and System Variables

  • @Saccbot
    @Saccbot 2 роки тому

    THANK YOU

  • @BiffBifford
    @BiffBifford 4 роки тому

    THANK YOU SO MUCH!