<?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: Audarya</title>
    <description>The latest articles on DEV Community by Audarya (@audarya07).</description>
    <link>https://dev.to/audarya07</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%2F528690%2F2cde2ed9-ff65-4515-84cd-a40cdd702253.jpeg</url>
      <title>DEV Community: Audarya</title>
      <link>https://dev.to/audarya07</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/audarya07"/>
    <language>en</language>
    <item>
      <title>Beginners guide to start using Vim</title>
      <dc:creator>Audarya</dc:creator>
      <pubDate>Tue, 27 Sep 2022 18:22:24 +0000</pubDate>
      <link>https://dev.to/audarya07/beginners-guide-to-start-using-vim-2emp</link>
      <guid>https://dev.to/audarya07/beginners-guide-to-start-using-vim-2emp</guid>
      <description>&lt;h2&gt;
  
  
  Hello Vim !
&lt;/h2&gt;

&lt;p&gt;This blog or you can say cheat-sheet covers the basic commands/keys you need to know to start using Vim. Initially, you will feel that it's a lot to remember but just &lt;strong&gt;keep practicing&lt;/strong&gt;. The first day you'll hate it. In a week you'll understand it and by a month you'll start loving it.&lt;/p&gt;

&lt;p&gt;The best way to utilize this cheat-sheet is to open/create a file via Vim and practice these commands one by one.  &lt;/p&gt;

&lt;p&gt;So lets begin 🚀  &lt;/p&gt;

&lt;h3&gt;
  
  
  Exiting
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;:w&lt;/code&gt;  -     save file&lt;br&gt;&lt;br&gt;
&lt;code&gt;:wq&lt;/code&gt; -     save and quit (can also use &lt;code&gt;:x&lt;/code&gt;)&lt;br&gt;&lt;br&gt;
&lt;code&gt;:q&lt;/code&gt;  -     quit&lt;br&gt;&lt;br&gt;
&lt;code&gt;:q!&lt;/code&gt; -     quit without save&lt;br&gt;&lt;br&gt;
&lt;code&gt;:qa!&lt;/code&gt; - close all files and abandon changes&lt;br&gt;
&lt;code&gt;ZZ&lt;/code&gt; - save and quit&lt;/p&gt;




&lt;h3&gt;
  
  
  Navigating
&lt;/h3&gt;

&lt;p&gt;arrows - to navigate up down left right&lt;br&gt;&lt;br&gt;
&lt;code&gt;l&lt;/code&gt; -    right&lt;br&gt;&lt;br&gt;
&lt;code&gt;h&lt;/code&gt; -   left&lt;br&gt;&lt;br&gt;
&lt;code&gt;j&lt;/code&gt; -    down&lt;br&gt;&lt;br&gt;
&lt;code&gt;k&lt;/code&gt; -   up    &lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;u&gt;Document  &lt;/u&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;}&lt;/code&gt; -   move down 1 block of code&lt;br&gt;&lt;br&gt;
&lt;code&gt;{&lt;/code&gt; -   move up 1 block of code&lt;br&gt;&lt;br&gt;
&lt;code&gt;gg&lt;/code&gt; -  move to top of file&lt;br&gt;&lt;br&gt;
&lt;code&gt;G&lt;/code&gt; -   move to bottom of file&lt;br&gt;&lt;br&gt;
&lt;code&gt;:&amp;lt;num&amp;gt;&lt;/code&gt; - go to line &lt;code&gt;&amp;lt;num&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;u&gt;Words  &lt;/u&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;w&lt;/code&gt; -   move to next word on the line&lt;br&gt;&lt;br&gt;
&lt;code&gt;b&lt;/code&gt; -   move to previous word on the line&lt;br&gt;&lt;br&gt;
&lt;code&gt;ge&lt;/code&gt; - move to previous end of word&lt;br&gt;
&lt;code&gt;e&lt;/code&gt; -   move to next end of word  &lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;u&gt;Line  &lt;/u&gt;
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;0&lt;/code&gt;(zero) -move to beginning of the line&lt;br&gt;&lt;br&gt;
&lt;code&gt;$&lt;/code&gt; -   move to end of the line&lt;br&gt;&lt;br&gt;
&lt;code&gt;^&lt;/code&gt; -   move to first character of the line&lt;br&gt;&lt;br&gt;
&lt;code&gt;t&amp;lt;char&amp;gt;&lt;/code&gt; - move cursor just before &lt;code&gt;&amp;lt;char&amp;gt;&lt;/code&gt; on the line&lt;br&gt;&lt;br&gt;
&lt;code&gt;f&amp;lt;char&amp;gt;&lt;/code&gt; - move cursor on the &lt;code&gt;&amp;lt;char&amp;gt;&lt;/code&gt; on the line&lt;br&gt;&lt;br&gt;
&lt;code&gt;%&lt;/code&gt; -    move cursor to matching ),], or }  &lt;/p&gt;




&lt;h3&gt;
  
  
  Clipboard
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;x&lt;/code&gt; - delete character&lt;br&gt;
&lt;code&gt;&amp;lt;num&amp;gt;x&lt;/code&gt; - delete &lt;code&gt;&amp;lt;num&amp;gt;&lt;/code&gt; characters to right of cursor&lt;br&gt;&lt;br&gt;
&lt;code&gt;dd&lt;/code&gt; -  delete current line(cut)&lt;br&gt;
&lt;code&gt;yy&lt;/code&gt; - yank line(copy)&lt;br&gt;&lt;br&gt;
&lt;code&gt;p&lt;/code&gt; -   paste below&lt;br&gt;&lt;br&gt;
&lt;code&gt;P&lt;/code&gt; -   paste above&lt;br&gt;&lt;br&gt;
&lt;code&gt;u&lt;/code&gt; -   undo&lt;br&gt;&lt;br&gt;
&lt;code&gt;ctrl R&lt;/code&gt; - redo &lt;/p&gt;




&lt;h3&gt;
  
  
  Modes
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;i&lt;/code&gt;      - enter insert mode&lt;br&gt;&lt;br&gt;
&lt;code&gt;esc&lt;/code&gt; - escape any mode and enter command mode&lt;br&gt;&lt;br&gt;
&lt;code&gt;o&lt;/code&gt; -   insert 1 line below and enter insert mode&lt;br&gt;&lt;br&gt;
&lt;code&gt;O&lt;/code&gt; -   insert 1 line above and enter insert mode  &lt;/p&gt;

&lt;p&gt;&lt;code&gt;V&lt;/code&gt;      -    visual mode (selects 1 line per movement)&lt;br&gt;&lt;br&gt;
&lt;code&gt;v&lt;/code&gt;      -    visual mode (selects 1 letter per movement)&lt;br&gt;&lt;br&gt;
&lt;code&gt;V + d&lt;/code&gt;  -    delete selected part&lt;br&gt;&lt;br&gt;
&lt;code&gt;ctrl V + movements&lt;/code&gt; - selects column  &lt;/p&gt;




&lt;h3&gt;
  
  
  Misc Operators and combos
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;cw&lt;/code&gt; - change word -&amp;gt; it deletes a word and enters insert mode&lt;br&gt;&lt;br&gt;
&lt;code&gt;dw&lt;/code&gt; - delete to next word&lt;br&gt;&lt;br&gt;
&lt;code&gt;db&lt;/code&gt; - delete to beginning of word&lt;br&gt;
&lt;code&gt;D&lt;/code&gt; -  deletes everything to right of cursor&lt;br&gt;&lt;br&gt;
&lt;code&gt;C&lt;/code&gt; -  deletes everything to right of cursor and enter insert mode  &lt;/p&gt;

&lt;p&gt;&lt;code&gt;dt&amp;lt;char&amp;gt;&lt;/code&gt; - delete till &lt;code&gt;&amp;lt;char&amp;gt;&lt;/code&gt; excluding &lt;code&gt;&amp;lt;char&amp;gt;&lt;/code&gt;&lt;br&gt;&lt;br&gt;
&lt;code&gt;ct&amp;lt;char&amp;gt;&lt;/code&gt; - delete till &lt;code&gt;&amp;lt;char&amp;gt;&lt;/code&gt; excluding &lt;code&gt;&amp;lt;char&amp;gt;&lt;/code&gt; and enter insert mode  &lt;/p&gt;

&lt;p&gt;&lt;code&gt;*&lt;/code&gt; - toggle between instances of the word where the cursor is present  &lt;/p&gt;

&lt;p&gt;&lt;code&gt;t&amp;lt;char&amp;gt;;&lt;/code&gt; - move to &lt;code&gt;&amp;lt;char&amp;gt;&lt;/code&gt; on the line on every press of &lt;code&gt;;&lt;/code&gt;  &lt;/p&gt;

&lt;p&gt;&lt;code&gt;zz&lt;/code&gt; - scrolls the page such that the line on which the cursor is right now is brought to center of page...i.e. centers the work page  &lt;/p&gt;

&lt;p&gt;&lt;code&gt;0w&lt;/code&gt; - move to first character of line&lt;br&gt;&lt;br&gt;
&lt;code&gt;d&amp;lt;num&amp;gt;w&lt;/code&gt; - delete &lt;code&gt;&amp;lt;num&amp;gt;&lt;/code&gt; words  &lt;/p&gt;

&lt;p&gt;&lt;code&gt;a&lt;/code&gt; - move right by 1 letter and enter insert mode&lt;br&gt;&lt;br&gt;
&lt;code&gt;A&lt;/code&gt; - move to end of line and enter insert mode   &lt;/p&gt;

&lt;p&gt;&lt;code&gt;~&lt;/code&gt; - toggle case of word (uppercase/lowercase)  &lt;/p&gt;

&lt;p&gt;&lt;code&gt;.&lt;/code&gt; - re runs the last command  &lt;/p&gt;

&lt;p&gt;&lt;code&gt;r&amp;lt;anything&amp;gt;&lt;/code&gt; - replace current letter to &lt;code&gt;&amp;lt;anything&amp;gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&amp;gt;&amp;gt;&lt;/code&gt; - indent current line&lt;br&gt;&lt;br&gt;
&lt;code&gt;&amp;lt;&amp;lt;&lt;/code&gt; - remove indent from current line  &lt;/p&gt;




&lt;h3&gt;
  
  
  Wrap Up
&lt;/h3&gt;

&lt;p&gt;There is a lot that I haven't covered yet like macros, complex combos, plugin setup, configuring vim and many other keybindings. This blog is just meant to be for beginners. Once you get comfortable with Vim it's easy to explore these and try it out.&lt;/p&gt;

&lt;p&gt;I hope you found this cheat-sheet helpful and keep it handy for a quick reference. If you want me to add more information in this blog or need any help let me know in the comments.&lt;/p&gt;

&lt;p&gt;Let's connect on &lt;a href="https://www.linkedin.com/in/audarya-uttarwar/"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;👋 Thanks for reading, See you next time.  &lt;/p&gt;

</description>
      <category>vim</category>
      <category>productivity</category>
      <category>cheatsheet</category>
      <category>editor</category>
    </item>
    <item>
      <title>Getting Started With Redis And It's Data Types On Redis-CLI</title>
      <dc:creator>Audarya</dc:creator>
      <pubDate>Mon, 31 Jan 2022 07:38:54 +0000</pubDate>
      <link>https://dev.to/audarya07/getting-started-with-redis-and-its-data-types-on-redis-cli-50f7</link>
      <guid>https://dev.to/audarya07/getting-started-with-redis-and-its-data-types-on-redis-cli-50f7</guid>
      <description>&lt;h2&gt;
  
  
  REDIS (REmote DIctionary Service)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is Redis?
&lt;/h3&gt;

&lt;p&gt;Redis is an open source, &lt;strong&gt;in-memory data structure store&lt;/strong&gt;, used as a database or as a cache. Redis provides data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, streams and much more.&lt;br&gt;&lt;br&gt;
You can run atomic operations on these types, like appending to a string; incrementing the value in a hash; pushing an element to a list; computing set intersection, union and difference; or getting the member with highest ranking in a sorted set.&lt;/p&gt;

&lt;p&gt;Redis is written in ANSI C and works in most systems like Linux and OS X, without external dependencies. Linux and OS X are the two operating systems where Redis is developed and tested the most, and it is recommended to use Linux for deployment. There is &lt;strong&gt;no official support for Windows&lt;/strong&gt; builds.&lt;/p&gt;

&lt;h3&gt;
  
  
  Use cases of Redis
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Queues
&lt;/li&gt;
&lt;li&gt;Publish/Subscribe (Pub/Sub)
&lt;/li&gt;
&lt;li&gt;Real-time analytics
&lt;/li&gt;
&lt;li&gt;Geospatial processing
&lt;/li&gt;
&lt;li&gt;Leaderboards/counting
&lt;/li&gt;
&lt;li&gt;Session Cache
&lt;/li&gt;
&lt;li&gt;Full page cache
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Redis Installation
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;For Windows
Though Redis is not supported on Windows, we can have a workaround for it. &lt;/li&gt;
&lt;li&gt;Enable WSL from "Turn Windows features on or off settings"&lt;/li&gt;
&lt;li&gt;Restart the machine&lt;/li&gt;
&lt;li&gt;Install Ubuntu20.04 from Windows Store&lt;/li&gt;
&lt;li&gt;Open Ubuntu App and setup name and password&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run the following commands:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;sudo apt update&lt;br&gt;&lt;br&gt;
sudo apt upgrade&lt;br&gt;&lt;br&gt;
sudo apt install redis-server&lt;br&gt;&lt;br&gt;
sudo service redis-server restart&lt;br&gt;&lt;br&gt;
redis-cli  &lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For Linux&lt;br&gt;&lt;br&gt;
Redis installation on Linux is super easy.&lt;br&gt;&lt;br&gt;
Run the commands:  &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;sudo apt install redis-server&lt;br&gt;&lt;br&gt;
sudo service redis-server restart&lt;br&gt;&lt;br&gt;
redis-cli  &lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The command &lt;code&gt;redis-cli&lt;/code&gt; will start the redis command line on which we will be interacting with redis store.  &lt;/p&gt;




&lt;h2&gt;
  
  
  Common Redis Commands
&lt;/h2&gt;

&lt;h3&gt;
  
  
  NORMAL USAGE AS A KEY VALUE STORE
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XPBTEV9l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1643459191285/mB5AjTX-F.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XPBTEV9l--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1643459191285/mB5AjTX-F.png" alt="image.png" width="880" height="1029"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;SET *key value*&lt;/code&gt; =&amp;gt; Set a key value pair&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;GET *key*&lt;/code&gt;  =&amp;gt; Get a value by searching for corresponding key&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;TTL *key*&lt;/code&gt;  =&amp;gt; Time To Live is the expiry(time left) of the key &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;KEYS *regex*&lt;/code&gt; =&amp;gt; To search for the pattern of keys. Common usage: &lt;code&gt;KEYS *&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;DEL *key*&lt;/code&gt; =&amp;gt; Deletes the key if present
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;FLUSHALL&lt;/code&gt; =&amp;gt; Remove all keys present
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;EXISTS *key*&lt;/code&gt; =&amp;gt; Returns 1 if key is present else return 0&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;EXPIRE *key time*&lt;/code&gt;(in sec)  =&amp;gt; Sets expiry time to the key if it exists&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;SETEX *key time value*&lt;/code&gt;  =&amp;gt; Sets a new key value pair with given TTL
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  LIST/ARRAY
&lt;/h3&gt;

&lt;p&gt;Redis Lists are simple lists of strings, sorted by insertion order. We can add elements  from the left or right end of the list.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--GgIN8MmC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1643459755681/ISgZncd9r.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--GgIN8MmC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1643459755681/ISgZncd9r.png" alt="image.png" width="880" height="903"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;LPUSH *arr val1 val2 val3 ....*&lt;/code&gt; =&amp;gt; Left push in arr(key) values val1, val2 ....&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;RPUSH *arr val1 val2 val3 ....*&lt;/code&gt; =&amp;gt; Right push in arr(key) values val1, val2 ....&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;LRANGE *arr start stop*&lt;/code&gt; =&amp;gt; Return elements of arr from index range &lt;em&gt;start&lt;/em&gt; to &lt;em&gt;stop&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;LPOP *arr*&lt;/code&gt; =&amp;gt; Pop leftmost element of list
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;RPOP *arr*&lt;/code&gt; =&amp;gt; Pop rightmost element of list
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  SET
&lt;/h3&gt;

&lt;p&gt;Redis Sets are an unordered collection of unique strings. Unique means sets does not allow repetition of data in a key.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--XiL-fihm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1643459963836/xDH-DeqUj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--XiL-fihm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1643459963836/xDH-DeqUj.png" alt="image.png" width="880" height="903"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;SADD *key val1 val2 ...*&lt;/code&gt;  =&amp;gt; Adds one or more values to a set&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;SMEMBERS *key*&lt;/code&gt; =&amp;gt; Gets all the members in a set&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;SCARD *key*&lt;/code&gt; =&amp;gt; Gets the number of members in a set
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;SREM *key val1 val2 ...*&lt;/code&gt; =&amp;gt; Removes one or more members from a set&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  OBJECT/HASH
&lt;/h3&gt;

&lt;p&gt;Redis Hashes are maps between the string fields and the string values. Hence, they are the perfect data type to represent objects. In a lot of ways, we can think of &lt;code&gt;HASH&lt;/code&gt;es in Redis as miniature versions of Redis itself.&lt;br&gt;&lt;br&gt;
In Redis, every hash can store up to more than 4 billion field-value pairs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--I9N9fkUu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1643460534622/z0JiA34lF.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--I9N9fkUu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1643460534622/z0JiA34lF.png" alt="image.png" width="880" height="783"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;HSET *key field value*&lt;/code&gt; =&amp;gt; Sets field in hash stored at the key to value&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;HGET *key field*&lt;/code&gt; =&amp;gt; Gets the value of a hash field stored at the specified key&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;HGETALL *key*&lt;/code&gt; =&amp;gt; Gets all fields and values stored in a hash at the specified key&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;HDEL *key field*&lt;/code&gt; =&amp;gt; Deletes one or more hash fields&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;HEXISTS *key field*&lt;/code&gt; =&amp;gt; Determines whether a hash field exists or not
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;P.S : The commands listed for the above data types are not all. There are a lot of other commands which can be found on the redis official website. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Resources And References
&lt;/h2&gt;

&lt;p&gt;The official website of Redis is the most awesome resource I have found to know anything about using Redis and it's commands: &lt;a href="https://redis.io/commands"&gt;https://redis.io/commands&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;Also this cheat sheet I found on the web: &lt;a href="https://lzone.de/cheat-sheet/Redis"&gt;Link&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;
  
  
  Wrap Up
&lt;/h2&gt;

&lt;p&gt;I hope you found this blog helpful and keep it handy for a quick reference. If you want me to add more information in this blog or need any help please let me know in the comment section.&lt;/p&gt;

&lt;p&gt;Let's connect on &lt;a href="https://www.linkedin.com/in/audarya-uttarwar/"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;👋 Thanks for reading, See you next time.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Important PostgreSQL Concepts - 16 psql Command-line Utilities You Don't Want To Miss And A Lot More</title>
      <dc:creator>Audarya</dc:creator>
      <pubDate>Thu, 06 Jan 2022 16:46:26 +0000</pubDate>
      <link>https://dev.to/audarya07/important-postgresql-concepts-16-psql-command-line-utilities-you-dont-want-to-miss-and-a-lot-more-4c4a</link>
      <guid>https://dev.to/audarya07/important-postgresql-concepts-16-psql-command-line-utilities-you-dont-want-to-miss-and-a-lot-more-4c4a</guid>
      <description>&lt;p&gt;PostgreSQL is one of the most advanced database in the open source relational database market.According to db-engines, it is the fourth most used database at the time of writing.&lt;br&gt;&lt;br&gt;
This blog is more of a cheat sheet to quickly know about PostgreSQL and get started with it.&lt;br&gt;&lt;br&gt;
So...lets get started !! &lt;/p&gt;

&lt;h3&gt;
  
  
  Features of Postgres
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;It is an object relational database.
&lt;/li&gt;
&lt;li&gt;It handles concurrency better than MySQL.
&lt;/li&gt;
&lt;li&gt;It implements Multiversion Concurrency Control (MVCC) without read locks.
&lt;/li&gt;
&lt;li&gt;It protects data integrity at transaction level.
&lt;/li&gt;
&lt;li&gt;Less vulnerable to data corruption.
&lt;/li&gt;
&lt;li&gt;Supports parallel query plan that can use multiple CPU/cores.
&lt;/li&gt;
&lt;li&gt;It can create partial indexes.
&lt;/li&gt;
&lt;li&gt;It can create indexes in non-blocking way.
&lt;/li&gt;
&lt;li&gt;Allows us to add our own datatypes, operators and index types.
&lt;/li&gt;
&lt;li&gt;Capable of writing large amounts of data more efficiently.
&lt;/li&gt;
&lt;li&gt;It supports table inheritance.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Disadvantages of Postgres
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Slow for read-heavy operations compared to MySQL.
&lt;/li&gt;
&lt;li&gt;It forks a new process for each new client connection which allocates a non-trivial amount of memory (about 10 MB).
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;PS: If you found some words fancy in the above list, I would suggest you to quickly google about it to get an idea. This tip applies to everything in this blog. You can mention these points in your interviews as well 😎  &lt;/p&gt;
&lt;/blockquote&gt;




&lt;h3&gt;
  
  
  Server and database objects provided by PostgreSQL
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Server service
&lt;/li&gt;
&lt;li&gt;Databases -&amp;gt; container of objects like tables, views, functions, indexes.
&lt;/li&gt;
&lt;li&gt;Tables -&amp;gt; Stores actual data. Belongs to a database.
&lt;/li&gt;
&lt;li&gt;Schema -&amp;gt; Logical container of table and other objects.
&lt;/li&gt;
&lt;li&gt;Tablespaces - place where data is stored physically
Provides 2 default tablespaces:

&lt;ul&gt;
&lt;li&gt;pg_default -&amp;gt; for storing user data
&lt;/li&gt;
&lt;li&gt;pg_global -&amp;gt; for storing system data
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Views -&amp;gt; views are named queries stored in the database.
&lt;/li&gt;
&lt;li&gt;Functions
&lt;/li&gt;
&lt;li&gt;Operators
&lt;/li&gt;
&lt;li&gt;Casts -&amp;gt; to convert one datatype to another.
&lt;/li&gt;
&lt;li&gt;Sequence -&amp;gt; used to manage auto-increment columns in a table.
&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  Evaluation order in Queries
&lt;/h3&gt;

&lt;p&gt;The following sequence shows the decreasing priority(from left to right) given to different clauses in a complex SQL Query.  &lt;/p&gt;

&lt;p&gt;&lt;code&gt;FROM --&amp;gt; WHERE --&amp;gt; SELECT --&amp;gt; ORDER BY&lt;/code&gt;  &lt;/p&gt;




&lt;h3&gt;
  
  
  Most Used Clauses
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;IN&lt;/code&gt;             - Returns true if a value matches any value in the list
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;BETWEEN&lt;/code&gt;    - Return true if a value is between a range of values ex. BETWEEN 3 AND 5
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;LIKE&lt;/code&gt;       - Return true if a value matches a pattern ex. LIKE 'Aud%' means match string starting with 'Aud'.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ILIKE&lt;/code&gt;      - Same as LIKE but case insensitive pattern matching. Notation (~~*)
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;OFFSET&lt;/code&gt;         - Skip a number of rows before returning the resultset
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;LIMIT&lt;/code&gt;      - To constrain the number of rows returned by a query (not a SQl standard)
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;FETCH&lt;/code&gt;      - Same as LIMIT and it a SQL standard. Syntax -&amp;gt; &lt;code&gt;FETCH {FIRST|NEXT} row_cnt {ROW|ROWS} ONLY&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;LEFT(s, n)&lt;/code&gt;     - Extracts first n characters from s
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ALL&lt;/code&gt;            - We can use the word ALL to allow &amp;gt;= or &amp;gt; or &amp;lt; or &amp;lt;= to act over a list ex. on result of select subquery
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;ORDER BY&lt;/code&gt;   - Sort thr column in ASC or DESC order
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;GROUP BY&lt;/code&gt;   - Functions such as SUM and COUNT are applied to groups of items sharing values.ex."GROUP BY continent" ,the result is only one row for each different value of continent. All the other columns must be "aggregated" by one of SUM, COUNT etc.
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;WHERE&lt;/code&gt;      - filters the rows before aggregation operation
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;HAVING&lt;/code&gt;     - filters after the agregation
&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Some important psql commands
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;sudo -u &amp;lt;role name&amp;gt; psql&lt;/code&gt;  -&amp;gt; switched to  and starts psql command prompt&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;\c dbname username&lt;/code&gt;        -&amp;gt; switch connection to new database (dbname) under a user specified by &lt;/li&gt;
&lt;li&gt;
&lt;code&gt;\l&lt;/code&gt;                    -&amp;gt; list all available databases&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;\dt&lt;/code&gt;               -&amp;gt; list all tables in current database&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;\d table_name&lt;/code&gt;      -&amp;gt; describe a table&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;\dn&lt;/code&gt;               -&amp;gt; list all Schemas of current database&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;\df&lt;/code&gt;               -&amp;gt; list all functions of current database&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;\dv&lt;/code&gt;               -&amp;gt; list all Views of current database&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;\du&lt;/code&gt;               -&amp;gt; list all users and their assigned roles
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;psql -h localhost -U username db_name;&lt;/code&gt; -&amp;gt; switch user and database  &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;\s&lt;/code&gt;               -&amp;gt; to display command history&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;\g&lt;/code&gt;               -&amp;gt; to execute previous command&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;\i filename&lt;/code&gt;      -&amp;gt; to execute psql commands from a file &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;\timing&lt;/code&gt;          -&amp;gt; to turn ON/OFF query execution time:w&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;\e&lt;/code&gt;               -&amp;gt; to write command in default editor(vim/nano)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;\q&lt;/code&gt;               -&amp;gt; to quit psql&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;




&lt;h3&gt;
  
  
  Common Queries
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Create new user   -&amp;gt; &lt;code&gt;CREATE USER &amp;lt;username&amp;gt; WITH PASSWORD 'password';&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Drop user     -&amp;gt; &lt;code&gt;DROP USER IF EXISTS &amp;lt;username&amp;gt;;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Create new database   -&amp;gt; &lt;code&gt;CREATE DATABASE &amp;lt;db_name&amp;gt;;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Grant privileges  -&amp;gt; &lt;code&gt;GRANT ALL|SELECT|UPDATE|DELETE PRIVILEGES ON DATABASE &amp;lt;db_name&amp;gt; TO &amp;lt;username&amp;gt;;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Drop database     -&amp;gt; &lt;code&gt;DROP DATABASE IF EXISTS &amp;lt;db_name&amp;gt;;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Create schema     -&amp;gt; &lt;code&gt;CREATE SCHEMA &amp;lt;schema_name&amp;gt; [CASCADE];&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Create table      -&amp;gt; &lt;code&gt;CREATE TABLE &amp;lt;tb_name&amp;gt;;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Insert data       -&amp;gt; &lt;code&gt;INSERT INTO tb_name(col1, col2,...) VALUES (val1, val2,...);&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Update Column     -&amp;gt; &lt;code&gt;UPDATE &amp;lt;tb_name&amp;gt; SET col_name = value WHERE &amp;lt;condition&amp;gt;;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Delete row        -&amp;gt; &lt;code&gt;DELETE FROM &amp;lt;tb_name&amp;gt; WHERE &amp;lt;condition&amp;gt;;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Delete table      -&amp;gt; &lt;code&gt;DROP TABLE IF EXISTS &amp;lt;tb_name&amp;gt;;&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Resources And References
&lt;/h3&gt;

&lt;p&gt;This is one of the most awesome resource I have found to know anything about using PostgreSQL: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.postgresqltutorial.com/"&gt;https://www.postgresqltutorial.com/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Wrap Up
&lt;/h3&gt;

&lt;p&gt;I hope you found this cheat sheet helpful and keep it handy for a quick reference. If you want me to add more information in this blog or need any help please let me know in the comment section.&lt;/p&gt;

&lt;p&gt;Let's connect on &lt;a href="https://www.linkedin.com/in/audarya-uttarwar/"&gt;LinkedIn&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;👋 Thanks for reading, See you next time&lt;/p&gt;

</description>
      <category>postgres</category>
      <category>database</category>
      <category>cheatsheet</category>
    </item>
    <item>
      <title>The Ultimate Guide You Need To Publish Your Python Package In Just 9 Easy Steps</title>
      <dc:creator>Audarya</dc:creator>
      <pubDate>Sun, 26 Dec 2021 18:18:34 +0000</pubDate>
      <link>https://dev.to/audarya07/the-ultimate-guide-you-need-to-publish-your-python-package-in-just-9-easy-steps-39o5</link>
      <guid>https://dev.to/audarya07/the-ultimate-guide-you-need-to-publish-your-python-package-in-just-9-easy-steps-39o5</guid>
      <description>&lt;h3&gt;
  
  
  Directory structure
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Create a directory that is named exactly how you want your package to be named.
&lt;/li&gt;
&lt;li&gt;Place all the files, folders and classes that you want to publish into this directory.&lt;/li&gt;
&lt;li&gt;Create files required by PyPI to prepare the project for distribution. &lt;/li&gt;
&lt;li&gt;It should look something like this: &lt;/li&gt;
&lt;/ul&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%2Fz75fm28j1oeomkys96dl.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%2Fz75fm28j1oeomkys96dl.png" alt="directory structure"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Clean your code
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Remove all "print" statements from the code.
&lt;/li&gt;
&lt;li&gt;Use logs instead of print statements(debug/info/warn etc..)
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Configuring metadata
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;setup.cfg&lt;/code&gt; --&amp;gt; It is the configuration file for &lt;strong&gt;setuptools&lt;/strong&gt;. It tells setuptools about your package(such as the name and version) as well as which code files to include. There are a variety of &lt;a href="https://setuptools.pypa.io/en/latest/userguide/declarative_config.html" rel="noopener noreferrer"&gt;metadata and options supported&lt;/a&gt; here.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;[metadata]
description-file = README.md  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;setup.py&lt;/code&gt; --&amp;gt;  It is the build script for which tells setuptools about your package(such as the name and version) as well as which code files to include.
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;setuptools is a library designed to facilitate packaging Python projects.  &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Open &lt;code&gt;setup.py&lt;/code&gt; and enter the following content. Change the name to include your username; this ensures that you have a unique package name and that your package doesn’t conflict with packages uploaded by other people.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="n"&gt;setuptools&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;find_packages&lt;/span&gt;

&lt;span class="n"&gt;version&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;0.0.1&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt; &lt;span class="c1"&gt;# Any format you want
&lt;/span&gt;
&lt;span class="k"&gt;with&lt;/span&gt; &lt;span class="nf"&gt;open&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;README.md&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;r&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;encoding&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;utf-8&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;long_description&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fh&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="nf"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;your-package-name&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;packages&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="nf"&gt;find_packages&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
  &lt;span class="n"&gt;version&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;version&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;license&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;MIT&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;description&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Short description&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;long_description&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;long_description&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;long_description_content_type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;text/markdown&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;author&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Author Name&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;author_email&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;author@email.com&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;https://gitlab.com/username/repo-name&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;download_url&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;https://gitlab.com/username/repo-name/-/archive/&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;version&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;/repo-name-&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;version&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;.tar.gz&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;keywords&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Some&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;keywords&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="n"&gt;install_requires&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;
          &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;dependency-1&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;  &lt;span class="c1"&gt;# All external pip packages you are importing
&lt;/span&gt;          &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;dependency-2&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="p"&gt;],&lt;/span&gt;
  &lt;span class="n"&gt;classifiers&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Development Status :: 3 - Alpha&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Intended Audience :: Developers&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Operating System :: OS Independent&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Topic :: Software Development :: Build Tools&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;License :: OSI Approved :: MIT License&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Programming Language :: Python :: 3.7&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Programming Language :: Python :: 3.8&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;],&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;  
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can find details about each arguments &lt;a href="https://packaging.python.org/tutorials/packaging-projects/#configuring-metadata" rel="noopener noreferrer"&gt;here&lt;/a&gt;.  &lt;/p&gt;

&lt;h3&gt;
  
  
  Creating README.md (optional but recommended)
&lt;/h3&gt;

&lt;p&gt;Open README.md and enter details about your package. You can customize this as you’d like. This content can be displayed on the homepage of your package on PyPI.  &lt;/p&gt;

&lt;h3&gt;
  
  
  Creating a LICENSE
&lt;/h3&gt;

&lt;p&gt;It’s important for every package uploaded to the Python Package Index to include a license. This tells users who install your package the terms under which they can use your package. For help picking a license, see &lt;a href="https://choosealicense.com/" rel="noopener noreferrer"&gt;https://choosealicense.com/&lt;/a&gt;. Once you have chosen a license, open LICENSE and enter the license text. For example, if you had chosen the MIT license:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Copyright (c) 2021 YOUR NAME
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Create a PyPI account
&lt;/h3&gt;

&lt;p&gt;Register yourself for a PyPI account &lt;a href="https://pypi.org/account/register/" rel="noopener noreferrer"&gt;here&lt;/a&gt;. Remember your username (not the Name, not the E-Mail Address) and your password, you will need it later for the upload process.  &lt;/p&gt;

&lt;h3&gt;
  
  
  Upload your package to github/gitlab
&lt;/h3&gt;

&lt;p&gt;Create a github/gitlab repo including all the above files and folders. Name the repo exactly as the package.&lt;br&gt;&lt;br&gt;
If uploading package to Gitlab, &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After uploading the required files, go to &lt;code&gt;Repository --&amp;gt; Tags --&amp;gt; New Tag&lt;/code&gt; and create new tag(tag name should be same as the version) for every release of the package to PyPI. &lt;/li&gt;
&lt;/ul&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%2Fuuekaftfa9a0btd5ff4j.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%2Fuuekaftfa9a0btd5ff4j.png" alt="Creating Tags"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This copied link should be the same as &lt;em&gt;download_url&lt;/em&gt; argument in the &lt;code&gt;setup.py&lt;/code&gt; file.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If uploading package to GitHub, &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;After uploading the required files, follow steps mentioned &lt;a href="https://docs.github.com/en/repositories/releasing-projects-on-github/managing-releases-in-a-repository" rel="noopener noreferrer"&gt;here&lt;/a&gt; to create a release.
&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;NOTE:&lt;br&gt;&lt;br&gt;
Every time you want to update your package later on, upload a new version to gitlab/github, create a new release as discussed, specify a new release tag and copy-paste the link to Source into the setup.py file (do not forget to also increment the version number).&lt;/strong&gt; &lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Uploading the distribution archives
&lt;/h3&gt;

&lt;p&gt;The first thing to do is register an account on TestPyPI, which is a separate instance of the package index intended for testing and experimentation. To register an account, go to &lt;a href="https://test.pypi.org/account/register/" rel="noopener noreferrer"&gt;here&lt;/a&gt; and complete the steps on that page. You will also need to verify your email address before you’re able to upload any packages.  &lt;/p&gt;

&lt;p&gt;After registration, use &lt;strong&gt;twine&lt;/strong&gt; to upload the distribution packages.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Navigate to folder where you have al the files and package located.
&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;python setup.py sdist&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Install Twine:  &lt;code&gt;pip install twine&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Run twine: &lt;code&gt;twine upload --repository testpypi dist/*&lt;/code&gt;
Upload successful
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Installing newly uploaded package
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;pip install -i https://test.pypi.org/simple/ your-package-name&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When you are ready to publish your package to &lt;strong&gt;PyPI&lt;/strong&gt; after proper testing, run the following command:&lt;br&gt;&lt;br&gt;
&lt;code&gt;twine upload dist/*&lt;/code&gt;&lt;br&gt;&lt;br&gt;
to publish it on PyPI.    &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;NOTE&lt;/strong&gt;:&lt;br&gt;&lt;br&gt;
Now for every future updates to your package:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;change the version number in setup.py file&lt;/li&gt;
&lt;li&gt;create tag/release in gitlab/github&lt;/li&gt;
&lt;li&gt;update the &lt;em&gt;download_url&lt;/em&gt; in setup.py&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;python setup.py sdist&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;twine upload dist/*&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;pip install your-package --upgrade&lt;/code&gt; --&amp;gt; to see whether your changes worked.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;AND IT'S DONE ...YAAAY !!&lt;br&gt;&lt;br&gt;
Visit PyPI and search for your package name. Now you can use your package just like any other python packages by installing it with pip i.e. &lt;code&gt;pip install your-package-name&lt;/code&gt;.  &lt;/p&gt;

&lt;p&gt;I hope this blog helped you understand how to publish your own Python Package easily.&lt;/p&gt;

&lt;p&gt;Happy coding !!&lt;/p&gt;

</description>
      <category>python</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>
