<?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: Morgan-Phoenix</title>
    <description>The latest articles on DEV Community by Morgan-Phoenix (@morgan_phoenix).</description>
    <link>https://dev.to/morgan_phoenix</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%2F653766%2F2d0b6cf1-18de-4466-98de-368b4c8c5cad.jpeg</url>
      <title>DEV Community: Morgan-Phoenix</title>
      <link>https://dev.to/morgan_phoenix</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/morgan_phoenix"/>
    <language>en</language>
    <item>
      <title>How to anonymously browse the internet</title>
      <dc:creator>Morgan-Phoenix</dc:creator>
      <pubDate>Sun, 29 May 2022 09:03:00 +0000</pubDate>
      <link>https://dev.to/morgan_phoenix/how-to-anonymously-browse-the-internet-4jea</link>
      <guid>https://dev.to/morgan_phoenix/how-to-anonymously-browse-the-internet-4jea</guid>
      <description>&lt;h4&gt;
  
  
  So this is a really heated topic for common people now a days that "how can i be completely anonymous on the internet"
&lt;/h4&gt;

&lt;h4&gt;
  
  
  Well this is not about "completely", cause maybe that not really what you can do with that ease, I mean no one is stopping you from using tor, if you know how to, but lets assume you don't want to get in that much of trouble to setup tor and other stuff like proxychains.
&lt;/h4&gt;

&lt;h4&gt;
  
  
  So lets talk about the most basic way how you can not be easily tracked
&lt;/h4&gt;

&lt;h4&gt;
  
  
  So the basic way how you reach a website is you type a URL in the browser, your computer goes to a DNS server, grabs the IP address of the sever that's bound to that URL and then reaches out to that website. In this whole process you used two major things
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;DNS&lt;/li&gt;
&lt;li&gt;Public IP&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So if you hide these two things you'll be good to go for just normal use when you are not planning to do any mischief in others system, anyways here's the trick &lt;/p&gt;

&lt;h3&gt;
  
  
  Use a VPN and a Specific DNS
&lt;/h3&gt;

&lt;h4&gt;
  
  
  What i mean by this is just using these two basic things can hide your tracks much easily. Use any VPN you like but right now i'll stick to proton VPN as claimed by the company they have log-less systems, who knows, anyway this was about the VPN. I don't really know if this trick works with all DNS or just 1.1.1.1 but for now just use 1.1.1.1
&lt;/h4&gt;

&lt;h3&gt;
  
  
  The Trick
&lt;/h3&gt;

&lt;h4&gt;
  
  
  So the trick is to use both of these simultaneously which on default settings isn't really gonna work so what you have to do is that you have to go in 1.1.1.1 settings and just use its DNS and then you can use both of these together easily
&lt;/h4&gt;

&lt;p&gt;~ for any query or support please write a comment below&lt;br&gt;
see you in the next blog &lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>security</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Learn FastAPI With Me (Part 2)</title>
      <dc:creator>Morgan-Phoenix</dc:creator>
      <pubDate>Tue, 29 Jun 2021 11:32:29 +0000</pubDate>
      <link>https://dev.to/morgan_phoenix/learn-fastapi-with-me-part-2-3k05</link>
      <guid>https://dev.to/morgan_phoenix/learn-fastapi-with-me-part-2-3k05</guid>
      <description>&lt;p&gt;So In The Previous Part We Made Our First Ever API In This Part I Will Explain What Was The Code Actually Doing. If You Don't Know What I Am Talking About Check The First Part Of This Series &lt;a href="https://dev.to/morgan_phoenix/learn-fastapi-with-me-part-1-48jd"&gt;Here&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The Explaination
&lt;/h2&gt;

&lt;p&gt;This Is The Code I Shared&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from fastapi import FastAPI
app = FastAPI()
@app.get('/')
def home():
    return {'data':'Get This And Be Happy'}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now In The First Line We Imported &lt;code&gt;FastAPI&lt;/code&gt; from &lt;code&gt;fastapi&lt;/code&gt;&lt;br&gt;
&lt;code&gt;from fastapi import FastAPI&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  What Is FastAPI?
&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;FastAPI&lt;/code&gt; Is The Main Class You Will Use To Start With The API&lt;/p&gt;

&lt;p&gt;Now We Made A Object Called &lt;code&gt;app&lt;/code&gt; Of The Class &lt;code&gt;FastAPI&lt;/code&gt; So We Can Use All The Functions And Methods Provided By This Class.&lt;/p&gt;

&lt;p&gt;Then We Did Something Like This &lt;code&gt;@app.get('/)&lt;/code&gt;, If You Don't Know What The &lt;code&gt;@&lt;/code&gt; Symbol Is, Let Me Tell You (If You Know What Is it Please Skip To "Explaining An Endpoint")&lt;br&gt;
These Things Are Called &lt;code&gt;Decorators&lt;/code&gt; In Python(A Decorator allows a user to add new functionality to an existing object without modifying its structure.)&lt;br&gt;
So What Do I Mean Here Is, Lets Say I Created A Function &lt;code&gt;foo&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;def foo(f):
    print('doing')
    f()
    print('done')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And Then I Created A Function &lt;code&gt;func&lt;/code&gt;&lt;br&gt;
And Then Run This&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@foo
def func():
    print('inside foo')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here The Function &lt;code&gt;func&lt;/code&gt; Will Be Give To Function &lt;code&gt;foo&lt;/code&gt; As A Parameter, So By Now You Know What Will Be The Result,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;doing
inside foo
done
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You Will Get This As The Result&lt;br&gt;
Now Enough About Decorators, Lets See What An Endpoint Is&lt;/p&gt;

&lt;h2&gt;
  
  
  Explaining An Endpoint
&lt;/h2&gt;

&lt;p&gt;Now An Endpoint Is A &lt;code&gt;/some_address&lt;/code&gt;(slash some address) Where Clients Can Come And Do Stuff Like We Have &lt;code&gt;google.com/home&lt;/code&gt;, Here We Defined Our Endpoint As &lt;code&gt;/&lt;/code&gt;. This Means Who Ever Comes To &lt;code&gt;http://127.0.0.1:8000&lt;/code&gt;(or whatever domain name our api is running), That Client Is Recived Where We Defined &lt;code&gt;/&lt;/code&gt;.&lt;br&gt;
Now We Wrote A Function Just Below It, This Function Runs Everytime A Clients Visits &lt;code&gt;/&lt;/code&gt; and may return something, Similarly If We Create &lt;code&gt;/hello&lt;/code&gt;, The Function Defined Below Will Be Executed If Someone Visits &lt;code&gt;/hello&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;In The Function We Did Not Do Something Crazy, All We Did Is Returned A Dictonary. But.... Why A Dictonary?&lt;/p&gt;

&lt;h2&gt;
  
  
  Why A Dictonary?
&lt;/h2&gt;

&lt;p&gt;Now If You Noticed We Used A Dictonary, This Raises a Question, Why? Why A Dictonary? We Use A Dictonary Because We Can't Use Strings To Send Data Over HTTP, We Use Something Called JSON. JSON Is a Format Of Data That Is Commomly Used To Talk Over HTTP. A JSON Data Looks Something Like This &lt;code&gt;{'data':'I AM JSON'}&lt;/code&gt;. Get The Point Now? FastAPI Converts A &lt;code&gt;Dict&lt;/code&gt; object to a &lt;code&gt;JSON&lt;/code&gt; Object.(See &lt;a href="https://www.json.org/json-en.html"&gt;here&lt;/a&gt; or &lt;a href="https://en.wikipedia.org/wiki/JSON"&gt;here&lt;/a&gt; to read more about JSON)&lt;/p&gt;

&lt;p&gt;And That's All We Did.&lt;/p&gt;

&lt;p&gt;In The Next Post I Will Tell How To Accept Something As A Parameter And Will Explain It In The Same Post&lt;/p&gt;

&lt;p&gt;See You All In The Next Post, Till Then Keep Practicing.&lt;/p&gt;

</description>
      <category>python</category>
      <category>api</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Learn FastAPI With Me (Part 1)</title>
      <dc:creator>Morgan-Phoenix</dc:creator>
      <pubDate>Tue, 22 Jun 2021 12:35:56 +0000</pubDate>
      <link>https://dev.to/morgan_phoenix/learn-fastapi-with-me-part-1-48jd</link>
      <guid>https://dev.to/morgan_phoenix/learn-fastapi-with-me-part-1-48jd</guid>
      <description>&lt;p&gt;Hey there, Today I'm going to start this series of "Learn FastAPI With Me". So those how don't know what a api is, let me tell you:&lt;/p&gt;

&lt;p&gt;According to Wikipedia:&lt;/p&gt;

&lt;p&gt;An application programming interface(api) is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build such a connection or interface is called an API specification.&lt;/p&gt;

&lt;p&gt;But if you are just starting and don't care about definition and want things in simple and clear words,&lt;/p&gt;

&lt;p&gt;An API is just a program that helps two programs to talk to each other. Imagine an API as the mouth and ears of a program, using which the program can talk and listen to other programs.&lt;/p&gt;

&lt;p&gt;Want an API in your web app now?&lt;br&gt;
Fine, Normally APIs are made using javascript, but it takes time to make one.&lt;br&gt;
So let's take the easy path insted and use our beloved programming language that we all know, Python.&lt;/p&gt;

&lt;p&gt;We will use FastAPI for now&lt;br&gt;
You can use other API frameworks too (like flask), but we are using FastAPI for now&lt;/p&gt;
&lt;h3&gt;
  
  
  Why FastAPI?
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;It's Fast&lt;/li&gt;
&lt;li&gt;It easy &lt;/li&gt;
&lt;li&gt;Supports async functions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And that should be it to convince you&lt;/p&gt;

&lt;p&gt;Not convinced yet?&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It supports rendering of html pages&lt;/li&gt;
&lt;li&gt;File transfers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's continue now,&lt;/p&gt;
&lt;h3&gt;
  
  
  Installation:
&lt;/h3&gt;

&lt;p&gt;It's very easy to install FastAPI just type this(↓) in your terminal&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;&lt;code&gt;$ pip install fastapi&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;p&gt;If you don't get an error, you're solid let's create out first api&lt;/p&gt;

&lt;h3&gt;
  
  
  The API:
&lt;/h3&gt;

&lt;p&gt;Now let's create our first api&lt;br&gt;
Create a file &lt;code&gt;main.py&lt;/code&gt; in any folder&lt;br&gt;
Copy-Paste the code given below in the &lt;code&gt;main.py&lt;/code&gt; file&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from fastapi import FastAPI
app = FastAPI()
@app.get('/')
def home():
    return {'data':'Get This And Be Happy'}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And done, your first basic API is ready!&lt;br&gt;
but, how do you test if this is working?&lt;br&gt;
we use a server to check if it is working.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Server
&lt;/h3&gt;

&lt;p&gt;We will be using &lt;code&gt;uvicorn&lt;/code&gt; to test our api&lt;br&gt;
Let's install it!&lt;br&gt;
&lt;code&gt;$ pip install uvicorn&lt;/code&gt;&lt;br&gt;
now open a terminal and go to the folder where &lt;code&gt;main.py&lt;/code&gt; is and type the following&lt;br&gt;
&lt;code&gt;uvicorn main:app --reload&lt;/code&gt;&lt;br&gt;
And hit enter&lt;br&gt;
A URL will be provided to you in the terminal, Go to that URL&lt;br&gt;
(It will mostly be &lt;a href="http://127.0.0.1:8000"&gt;http://127.0.0.1:8000&lt;/a&gt;)&lt;br&gt;
If you see &lt;code&gt;{'data':'Get This And Be Happy'}&lt;/code&gt;, Then do what you see, be happy, your api is working!! &lt;/p&gt;

&lt;p&gt;In the next post I will explain what that code is, until then be happy&lt;/p&gt;

&lt;p&gt;See you in the next post.&lt;/p&gt;

</description>
      <category>python</category>
      <category>api</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
