<?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: Wael Ramadan</title>
    <description>The latest articles on DEV Community by Wael Ramadan (@wmramadan).</description>
    <link>https://dev.to/wmramadan</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%2F619842%2Fac57a5a0-ba14-485f-b162-f005c1ec9f63.jpeg</url>
      <title>DEV Community: Wael Ramadan</title>
      <link>https://dev.to/wmramadan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wmramadan"/>
    <language>en</language>
    <item>
      <title>GitHub Actions for Python Development</title>
      <dc:creator>Wael Ramadan</dc:creator>
      <pubDate>Thu, 22 Dec 2022 04:25:23 +0000</pubDate>
      <link>https://dev.to/wmramadan/github-actions-for-python-development-3hla</link>
      <guid>https://dev.to/wmramadan/github-actions-for-python-development-3hla</guid>
      <description>&lt;p&gt;If you are developing your application on GitHub, then you might want to consider using GitHub Actions for your CI/CD. In this tutorial we will cover how to use GitHub actions for testing multiple version of python and on different platforms.&lt;/p&gt;

&lt;p&gt;Our example will include a FastAPI application, using pytest to run our tests, pylint for linting check, on python versions (3.8, 3.9, 3.10, 3.11) with (Windows, Mac, Linux) platforms. You can find this example on GitHub &lt;a href="https://github.com/WMRamadan/fastapi-boilerplate" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;First thing you will notice is under the &lt;code&gt;.github/workflows&lt;/code&gt; directory there is a file named &lt;code&gt;python-app.yml&lt;/code&gt; which is the YAML file that will be used for our GitHub Actions Pipeline.&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%2F7p7od53r682gzjkt47ks.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%2F7p7od53r682gzjkt47ks.png" alt="Image description" width="508" height="958"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In this file you will find the below break-down. &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%2Fue65alu751jqy3wy0k5r.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%2Fue65alu751jqy3wy0k5r.png" alt="Image description" width="800" height="559"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You will see that the key &lt;code&gt;runs-on&lt;/code&gt; uses the variable &lt;code&gt;matrix.os&lt;/code&gt; which has the array of operating systems to use. While the key &lt;code&gt;python-versions&lt;/code&gt; uses the variable &lt;code&gt;matrix.python-version&lt;/code&gt; that takes the array of python versions.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
        python-version: ["3.8", "3.9", "3.10", "3.11"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Underneath you will see multiple keys named &lt;code&gt;run&lt;/code&gt; each for installing dependencies, linting and testing.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install -r requirements.txt
    - name: Lint with pylint
      run: |
        pylint --recursive=y api --rcfile=.pylintrc
    - name: Test with pytest
      run: |
        pytest api/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every time you push a change to your repository this action will run.&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%2Fvkqru496iw66udwzuzuv.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%2Fvkqru496iw66udwzuzuv.png" alt="Image description" width="800" height="428"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To learn more about Python automation and testing using GitHub Actions you can visit this &lt;a href="https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python" rel="noopener noreferrer"&gt;link&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>python</category>
      <category>github</category>
      <category>devops</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Complete Python Development Environment With Docker And Linux GUI Apps in WSL2 for Windows 10</title>
      <dc:creator>Wael Ramadan</dc:creator>
      <pubDate>Sun, 04 Sep 2022 14:12:17 +0000</pubDate>
      <link>https://dev.to/wmramadan/complete-python-development-environment-with-docker-and-linux-gui-apps-in-wsl2-2jod</link>
      <guid>https://dev.to/wmramadan/complete-python-development-environment-with-docker-and-linux-gui-apps-in-wsl2-2jod</guid>
      <description>&lt;p&gt;So lets create a development environment based on Linux inside of Microsoft Windows 10. We will be using WSL2 (Windows Subsystem for Linux) version 2.&lt;/p&gt;

&lt;p&gt;As Linus Torvalds once said "It is best to develop on the platform you are deploying to." Since our applications will be deployed on a Linux server it would be the best option to develop on a GNU/Linux operating system.&lt;/p&gt;

&lt;p&gt;Yet why would we want to have Linux running inside of a Windows operating system. Well unfortunately, Windows has a number of benefits as a Desktop operating system over Linux. Although I use a native setup of Linux on a daily basis, Windows has the following advantages:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Dynamically expanding swap&lt;/li&gt;
&lt;li&gt;Better battery life on laptops&lt;/li&gt;
&lt;li&gt;Commercial Software support&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So let's break this down to understand what all of this means and how it is beneficial.&lt;/p&gt;

&lt;h2&gt;
  
  
  Dynamically expanding swap
&lt;/h2&gt;

&lt;p&gt;Swap is a file or partition on your SSD/HDD that is used to swap memory from RAM to disk when your RAM is approaching full capacity. This allows for applications to keep running even if you use more memory than you have in physical RAM.&lt;br&gt;
Microsoft Windows and macOS both offer dynamically expanding swap. Which has no fixed size so it can grow or shrink as needed.&lt;br&gt;
Linux and Unix based operating systems use a fixed swap allocation. This space cannot be dynamically resized, it is a fixed space and cannot grow or shrink according to your needs. The problem with this is that if you run out of swap space your OS will become extremely sluggish.&lt;/p&gt;
&lt;h2&gt;
  
  
  Better battery life on laptops
&lt;/h2&gt;

&lt;p&gt;It has been proven that battery life is just better on Windows due to the optimization made by Microsoft and hardware vendors on Windows. Although this is being improved and is getting better on Linux, Windows still excels in this area.&lt;/p&gt;
&lt;h2&gt;
  
  
  Commercial Software support
&lt;/h2&gt;

&lt;p&gt;As we all know most commercial software is more available to Windows and macOS operating systems. Specifically with media based software such as video editing, audio production and gaming. Yet this is begin improved on Linux, it still does not offer some industry leading software that are used by professionals.&lt;/p&gt;


&lt;h2&gt;
  
  
  Install WSL2 on Windows 10
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1.&lt;/strong&gt; Run PowerShell as administrator&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%2Filwkveknso6609qv1mwd.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%2Filwkveknso6609qv1mwd.png" alt="wsl-step-1" width="800" height="459"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2.&lt;/strong&gt; Enable WSL by entering the following command in PowerShell&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
&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%2Fuz8x1xw0qc0tbz57977e.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%2Fuz8x1xw0qc0tbz57977e.png" alt="wsl-step-2" width="800" height="459"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 3.&lt;/strong&gt; Enable Virtual Machine Platform by entering the following command in PowerShell &lt;em&gt;(You will be prompted to restart Windows, if not please do restart Windows after this step)&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform
&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%2Fcdz48ja91aom5273szc7.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%2Fcdz48ja91aom5273szc7.png" alt="wsl-step-3" width="800" height="459"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Install WSL2 Kernel
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1.&lt;/strong&gt; Download the WSL2 Kernal update from the following link: &lt;a href="https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi" rel="noopener noreferrer"&gt;WSL2 Kernal&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2.&lt;/strong&gt; Set WSL version 2 as your default WSL version by entering the following command in PowerShell&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;wsl --set-default-version 2
&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%2F5uwjw4d576p4pngl7k1n.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%2F5uwjw4d576p4pngl7k1n.png" alt="wsl-step-4" width="800" height="479"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Install a Linux Distro
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1.&lt;/strong&gt; Open the Microsoft Store and search for &lt;code&gt;Linux&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2.&lt;/strong&gt; Pick a Linux distro of your choice to install for example &lt;code&gt;Ubuntu&lt;/code&gt; and click &lt;code&gt;Get&lt;/code&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%2F82ausfgx509mdt2yx4u0.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%2F82ausfgx509mdt2yx4u0.png" alt="Install Linux Distro" width="800" height="622"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After the distro is installed it will open a window to configure your username and password.&lt;/p&gt;




&lt;h2&gt;
  
  
  Install and Configure VcXsrv Windows X Server
&lt;/h2&gt;

&lt;p&gt;This will be used to display all of our Linux GUI apps inside of Windows.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 1.&lt;/strong&gt; Download and install VcXsrv. &lt;a href="https://sourceforge.net/projects/vcxsrv/" rel="noopener noreferrer"&gt;VcXsrv Download Link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 2.&lt;/strong&gt; Configure VcXsrv&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Run &lt;code&gt;XLaunch&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Use all default settings and click next until you reach the &lt;code&gt;Extra settings&lt;/code&gt; section where you will select all options&lt;/li&gt;
&lt;/ul&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%2F9unpa3dq8z3rw90773gc.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%2F9unpa3dq8z3rw90773gc.png" alt="vcxsrv default settings" width="800" height="635"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Choose &lt;code&gt;Save configuration&lt;/code&gt; and save it to the desktop so you can use it to start VcXsrv again which you will need to do every time you restart or logout of Windows&lt;/li&gt;
&lt;/ul&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%2Fsf27wtt9l2nv4pbwtmbl.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%2Fsf27wtt9l2nv4pbwtmbl.png" alt="vcxsrv save config" width="800" height="634"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Install GUI Apps
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1.&lt;/strong&gt; Update your Ubuntu Linux distro by entering the following command in the Ubuntu terminal&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt update
sudo apt upgrade
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2.&lt;/strong&gt; Set the display server by entering the following command in the Ubuntu terminal&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat /etc/resolv.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will show you your nameserver IP, replace the &lt;code&gt;xxx.xx.xx.x&lt;/code&gt; with the IP retrieved from the above command and enter the following in your Ubuntu terminal&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export DISPLAY=xxx.xx.xx.x:0.0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3.&lt;/strong&gt; Install and run Firefox&lt;br&gt;
Lets see our gui apps in action by installing and running Firefox entering the following in your Ubuntu terminal&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt install firefox
firefox
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Congratulations, Firefox should be running now! This browser will come in handy for downloading anything we want to run inside of WSl2.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step 4.&lt;/strong&gt; Install and run PyCharm CE&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Download PyCharm by opening the following &lt;a href="-%20https://www.jetbrains.com/pycharm/download/"&gt;link&lt;/a&gt; inside of the Firefox browser you have just opened from within Ubuntu (WSL2).&lt;/li&gt;
&lt;li&gt;Extract the archive which you should find in your home downloads folder inside your Ubuntu WSL terminal under &lt;code&gt;~/Downloads/&lt;/code&gt; by entering the following command and replace &lt;code&gt;file.tar.gz&lt;/code&gt; with the filename you have downloaded
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;tar xvzf file.tar.gz
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Run PyCharm from within the &lt;code&gt;Downloads&lt;/code&gt; folder
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd pycharm-community/bin
./pycharm.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 5.&lt;/strong&gt; Installing pip and miniconda&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We can install pip for Python3 using the following command
&lt;/li&gt;
&lt;/ul&gt;

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

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Install miniconda by downloading the installation script from the following &lt;a href="https://docs.conda.io/en/latest/miniconda.html" rel="noopener noreferrer"&gt;link&lt;/a&gt; and make sure you open this link from within the firefox browser that is running inside of WSL2&lt;/li&gt;
&lt;li&gt;Once downloaded you can start the installation by going to your Download directory in WSL2 and executing the script using the following command
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;bash ~/Downloads/Miniconda3-latest-Linux-x86_64.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 6.&lt;/strong&gt; Install Docker Desktop for Windows&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Download Docker Desktop for Windows from the following &lt;a href="https://docs.docker.com/desktop/install/windows-install/" rel="noopener noreferrer"&gt;link&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;After installation you will be prompted to logout of Windows&lt;/li&gt;
&lt;li&gt;Once you login to Windows again and docker desktop for Windows is running, you can open Ubuntu WSL2 terminal and run the following commands to make sure that docker is running inside of WSL2:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker -v
docker-compose -v
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Congratulations you now have docker running in your WSL2 instance.&lt;/p&gt;

&lt;p&gt;You can install more tools inside of WSL2 as you would with any Linux distro. This setup should get you going for Python development.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>wsl2</category>
      <category>docker</category>
      <category>python</category>
    </item>
    <item>
      <title>How to Install Docker on Raspberry Pi 4 with Raspbian Buster</title>
      <dc:creator>Wael Ramadan</dc:creator>
      <pubDate>Fri, 26 Aug 2022 13:07:00 +0000</pubDate>
      <link>https://dev.to/wmramadan/installing-docker-on-raspberry-pi-4-57dm</link>
      <guid>https://dev.to/wmramadan/installing-docker-on-raspberry-pi-4-57dm</guid>
      <description>&lt;p&gt;This is a simple guide to creating a &lt;a href="https://www.docker.com/" rel="noopener noreferrer"&gt;Docker&lt;/a&gt; development environment with your &lt;a href="https://www.raspberrypi.org/" rel="noopener noreferrer"&gt;Raspberry Pi 4&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This has been tested on a &lt;em&gt;Raspberry Pi 4 Model B Rev 1.1&lt;/em&gt; using &lt;em&gt;Raspbian Buster&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;You can check your Raspberry Pi model by running the following command in the Raspberry Pi terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat /proc/cpuinfo
&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%2Fjcmmzxxe8760x1huxjim.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%2Fjcmmzxxe8760x1huxjim.png" alt="Check cpu info in raspbian" width="800" height="790"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can also check your Raspbian OS version by running the following command in the Raspberry Pi terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat /etc/os-release
&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%2F8ktzvmljaftsnq3gltbj.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%2F8ktzvmljaftsnq3gltbj.png" alt="Check OS info in raspbian" width="746" height="356"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  Steps
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Install Docker
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;curl -sSl https://get.docker.com | sh
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Install dependencies
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo apt-get install -y python python-pip

sudo apt-get install libffi-dev libssl-dev
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Add permissions for Pi User to run Docker Commands
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo usermod -aG docker $USER
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Install Docker Compose
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo pip install docker-compose

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Test Docker installation
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;docker run hello-world
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Note: you might need to restart your Raspberry Pi to use docker without sudo persissions.&lt;/em&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%2F6hzssqt862k9429lmxjf.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%2F6hzssqt862k9429lmxjf.png" alt="docker hello-world" width="800" height="564"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If the installation was completed successfully, you will get the "Hello from Docker!" message. You can then check out &lt;a href="https://hub.docker.com/search?q=&amp;amp;type=image&amp;amp;architecture=arm" rel="noopener noreferrer"&gt;Docker Hub&lt;/a&gt; for &lt;em&gt;arm&lt;/em&gt; based images to run on your Raspberry Pi.&lt;/p&gt;

</description>
      <category>docker</category>
      <category>raspberrypi</category>
      <category>linux</category>
    </item>
    <item>
      <title>Textual is the only Python Terminal UI Framework you will need.</title>
      <dc:creator>Wael Ramadan</dc:creator>
      <pubDate>Wed, 24 Aug 2022 03:43:00 +0000</pubDate>
      <link>https://dev.to/wmramadan/textual-is-the-only-python-terminal-ui-framework-you-will-need-3f4e</link>
      <guid>https://dev.to/wmramadan/textual-is-the-only-python-terminal-ui-framework-you-will-need-3f4e</guid>
      <description>&lt;p&gt;IF you ever wanted to build rich User Interfaces that work in the terminal with mouse support written in Python, then &lt;a href="https://www.textualize.io/" rel="noopener noreferrer"&gt;Textual&lt;/a&gt; is the Library for you.&lt;/p&gt;

&lt;p&gt;The framework is completely written in Python and supports CSS for styling. You can use the mouse or shortcut keys for navigation.&lt;/p&gt;

&lt;p&gt;You may be asking why would you need a UI framework for the terminal, well to me here are some of the benefits:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;UI Applications that can be accessed through SSH&lt;/li&gt;
&lt;li&gt;Single point of maintenance similar to web applications&lt;/li&gt;
&lt;li&gt;No GUI dependencies&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Yet it is still a work in progress according to the creator of Textual &lt;a href="https://twitter.com/willmcgugan" rel="noopener noreferrer"&gt;Will McGugan&lt;/a&gt;, so lets look at some examples of what can be done with Textual so far.&lt;/p&gt;

&lt;p&gt;First lets install Textual using pip:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;pip3 &lt;span class="nb"&gt;install &lt;/span&gt;textual
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once installed we can try out some examples which can be found in the Textual github repository (&lt;a href="https://github.com/Textualize/textual" rel="noopener noreferrer"&gt;https://github.com/Textualize/textual&lt;/a&gt;). So let's clone the repo:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git clone https://github.com/Textualize/textual.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once cloned lets run some examples like the Calculator app:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cd textual/examples/
python3 calculator.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can either use your numpad/keyboard to enter in numbers or use your mouse by pointing and clicking right in your terminal. You will also notice that as you resize your terminal window the whole app adjusts to fit the screen size.&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%2Fevj2sznuk9afdqgr1wek.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%2Fevj2sznuk9afdqgr1wek.png" alt="Textual Calculator" width="800" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How about something a little more complicated like a code viewer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;python3 code_viewer.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Select the file you would like to view from the left-side file browser by clicking on it, you will then see the preview on the right-side. On the bottom bar you can either use your keyboard for the shortcut keys or click on the required function.&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%2Fcqegto78uv9i8jzu0nfu.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%2Fcqegto78uv9i8jzu0nfu.png" alt="Textual Code Viewer" width="800" height="401"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As you can see the potential with Textual is endless, your imagination is the limit. For inspiring ideas or to see some use-cases of Textual you can visit the &lt;a href="https://www.textualize.io/textual/gallery" rel="noopener noreferrer"&gt;Textual gallery&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>terminal</category>
    </item>
  </channel>
</rss>
