<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Vidya🌞</title>
    <description>The latest articles on DEV Community by Vidya🌞 (@vidya_rautela).</description>
    <link>https://dev.to/vidya_rautela</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2030367%2F57025aa7-b807-451a-a5a0-63fd558937f2.jpg</url>
      <title>DEV Community: Vidya🌞</title>
      <link>https://dev.to/vidya_rautela</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vidya_rautela"/>
    <language>en</language>
    <item>
      <title>Isolation Made Easy : venv📁in Python</title>
      <dc:creator>Vidya🌞</dc:creator>
      <pubDate>Sat, 26 Oct 2024 12:32:14 +0000</pubDate>
      <link>https://dev.to/vidya_rautela/isolation-made-easy-venvin-python-3207</link>
      <guid>https://dev.to/vidya_rautela/isolation-made-easy-venvin-python-3207</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;“Big things have small beginnings.” ~ Promethus&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Hey there, Python learner..&lt;/p&gt;

&lt;p&gt;Setting up a virtual environment (or &lt;strong&gt;venv&lt;/strong&gt;) is an essential part of any Python project. &lt;/p&gt;

&lt;p&gt;It helps keep dependencies organized and avoids conflicts with other projects. &lt;/p&gt;

&lt;p&gt;Here’s a quick and friendly guide on: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;em&gt;how to create a virtual environment.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;em&gt;verify it&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;even check where your packages are being installed.&lt;/em&gt;_&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Step 1: Create the Virtual Environment
&lt;/h3&gt;

&lt;p&gt;To kick things off, open your terminal or command prompt and run this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python -m venv venv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should see a folder named venv—that’s your virtual environment! 🎉&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;ls
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa9zr3qe3ixabl25l847j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa9zr3qe3ixabl25l847j.png" alt="first" width="715" height="109"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2crpvk72vlfsokkl9agp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2crpvk72vlfsokkl9agp.png" alt="second" width="410" height="1000"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 2: Activate the Virtual Environment⚡
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;source venv/Scripts/activate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After running this command, your prompt will change to something like below image:👇&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqmzzy1k5th52xu375iky.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqmzzy1k5th52xu375iky.png" alt="third" width="603" height="107"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 3: Verify the Active Environment🔍
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;which python
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxa2ju81pttp6qdb8zykg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxa2ju81pttp6qdb8zykg.png" alt="fourth" width="800" height="67"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi959gxn6nl8sgbvh0319.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fi959gxn6nl8sgbvh0319.png" alt="fifth" width="800" height="51"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Step 4: Install a Package and Verify Installation📦
&lt;/h3&gt;

&lt;p&gt;Try installing any package, here i am installing boto3 which is an official AWS SDK for python.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip install boto3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will show all the packages installed in your virtual environment, including &lt;code&gt;boto3&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feb713myubyb2cp2gwzen.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Feb713myubyb2cp2gwzen.png" alt="sixth" width="556" height="494"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Step 5: Deactivate the Virtual Environment🔒
&lt;/h3&gt;

&lt;p&gt;Once deactivated, run pip list again, it will show the packages installed globally, rather than the ones in your virtual environment.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;deactivate venv
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pip list
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw7sd7rushe4k4uspcuno.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw7sd7rushe4k4uspcuno.png" alt="seventh" width="561" height="461"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  And that’s it!🎊
&lt;/h4&gt;

&lt;p&gt;You’re set to use virtual environments in Python.&lt;/p&gt;

&lt;p&gt;So go ahead—give it a try! &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Always remember: &lt;em&gt;Experiment, break things, fix them, and watch your projects run smoothly.&lt;/em&gt;🚀&lt;/p&gt;
&lt;/blockquote&gt;

</description>
    </item>
    <item>
      <title>Master -&gt; Main branch in 2024</title>
      <dc:creator>Vidya🌞</dc:creator>
      <pubDate>Thu, 17 Oct 2024 17:47:31 +0000</pubDate>
      <link>https://dev.to/vidya_rautela/master-main-branch-in-2024-29dn</link>
      <guid>https://dev.to/vidya_rautela/master-main-branch-in-2024-29dn</guid>
      <description>&lt;p&gt;Hey there!&lt;/p&gt;

&lt;p&gt;As we all know, in October 2020 git community made a meaningful change by deciding to shift the default branch name from "master" to "main." &lt;/p&gt;

&lt;p&gt;Personally, I didn't have any problem using "master" as the default branch name. However, as we keep upgrading ourselves in tech, it was inevitable to accept this change and rename our "master" branch to "main," incorporating the "main" branch in our new repositories.&lt;/p&gt;

&lt;p&gt;Today, I was checking an old repository that I created back in 2019, and it was mostly empty. I decided to repurpose that same repository for my new projects, so I chose to change the "master" branch to "main" since I’m used to it now.&lt;/p&gt;

&lt;p&gt;Now we'll look into simple steps to rename "master" -&amp;gt; "main"&lt;/p&gt;

&lt;h3&gt;
  
  
  Using the GitHub Interface:
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Head over to your repository.&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;Settings&lt;/strong&gt; -&amp;gt; &lt;strong&gt;General&lt;/strong&gt; -&amp;gt; &lt;strong&gt;Default branch&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Hit &lt;strong&gt;Edit&lt;/strong&gt; and change the branch name to "main."&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fldu2fpccqj9vcrpp17nz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fldu2fpccqj9vcrpp17nz.png" alt="img-2" width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;In this screenshot, I’ve already made the change, but yours should look pretty similar!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm9r82s0g72as4mxvov64.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fm9r82s0g72as4mxvov64.png" alt="devops-cloudnative-projects-ss" width="800" height="379"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Updating Your Local Clone
&lt;/h3&gt;

&lt;p&gt;If you’ve got a local clone of the repo, don’t worry—you can easily update it too! Just run these commands in your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thanks for reading my article :)&lt;/p&gt;

&lt;p&gt;Happy coding, and don’t hesitate to share your thoughts.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
