<?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: Reincoder</title>
    <description>The latest articles on DEV Community by Reincoder (@reincoder).</description>
    <link>https://dev.to/reincoder</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%2F903246%2F1806f8d3-dac9-43e4-aab1-f85064c43930.jpg</url>
      <title>DEV Community: Reincoder</title>
      <link>https://dev.to/reincoder</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/reincoder"/>
    <language>en</language>
    <item>
      <title>You shouldn’t put your IPinfo token in the frontend! Or, should you….?</title>
      <dc:creator>Reincoder</dc:creator>
      <pubDate>Thu, 22 Dec 2022 21:37:18 +0000</pubDate>
      <link>https://dev.to/reincoder/you-shouldnt-put-your-ipinfo-token-in-the-frontend-or-should-you-27lj</link>
      <guid>https://dev.to/reincoder/you-shouldnt-put-your-ipinfo-token-in-the-frontend-or-should-you-27lj</guid>
      <description>&lt;p&gt;How to secure your IPinfo token on the frontend, a brief primer on filtering referring domains.&lt;/p&gt;

&lt;p&gt;The classic advice of API access tokens is that you should &lt;strong&gt;NEVER&lt;/strong&gt; put your API access token in the frontend or website directly. This is very true. It is fairly easy to extract an API access token from the frontend. All you have to do is open up the DevTools and…. I digress.&lt;/p&gt;

&lt;p&gt;Let’s see how you can secure your &lt;a href="http://IPinfo.io" rel="noopener noreferrer"&gt;IPinfo.io&lt;/a&gt; IP geolocation access token, if you have put it directly on your website’s frontend.&lt;/p&gt;

&lt;h2&gt;
  
  
  API Access Token in the frontend?
&lt;/h2&gt;

&lt;p&gt;What if, for convenience or for speed or for any reason, you need to put your API access token in the front-end. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;For example:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let’s say you want to see if a visitor of your website is based in the EU zone, and therefore your site is now subjected to the GDPR regulations. Now, GDPR comes with a whole host of user privacy related rules and regulation.&lt;/p&gt;

&lt;p&gt;To check whether a visitor is from Europe you can check it using their IP address and IPinfo. Once you are sure that the user is from a country that is covered under GDPR regulation, you can ask the visitor to agree to your privacy statement, redirect them to another page, or you can simply block their access to your site. &lt;strong&gt;It is your choice.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Should you put your IPinfo Token in the frontend?
&lt;/h2&gt;

&lt;p&gt;Now, how can you find out where the user is from. It is quite simple with IPinfo. IPinfo takes the visitor’s IP address and provides you with their geolocation information.&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%2Fdumq6yquyk8ihyciy7cg.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%2Fdumq6yquyk8ihyciy7cg.png" alt="Basics of IP geolocation" width="617" height="330"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, you can instantly get the visitor’s geolocation (city, region, country) from their IP address using IPinfo’s API services and make any kind of decision necessary. IPinfo has a ton of resources to get you started.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;But&lt;/em&gt; you need to put your access token in the backend, right? Well, putting your access token in the backed is the best practice. However, if:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;you have a static site with no backend&lt;/li&gt;
&lt;li&gt;you want instant geolocation confirmation&lt;/li&gt;
&lt;li&gt;you want to block the user from accessing your site based on geolocation&lt;/li&gt;
&lt;li&gt;you want to redirect the user to another page based geolocation&lt;/li&gt;
&lt;li&gt;you want  to change the language to suite the user's geolocation based preferences&lt;/li&gt;
&lt;li&gt;you need to update taxes, shipping costs or prices based on geolocation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;or if you have any specific needs or wants, you might need to put the IPinfo access token in the front end.&lt;/p&gt;

&lt;p&gt;But the important part is doing it safely!&lt;/p&gt;

&lt;p&gt;IPinfo provides an added level of token security with their domain and IP address filtering security measures.&lt;/p&gt;

&lt;h2&gt;
  
  
  IPinfo Token Security
&lt;/h2&gt;

&lt;p&gt;After you signed up for IPinfo, visit:&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://ipinfo.io/account/token" rel="noopener noreferrer"&gt;https://ipinfo.io/account/token&lt;/a&gt;&lt;br&gt;
Or you can go to your dashboard, click on the token section and scroll to the bottom.&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%2F7d9q5lkoi81jzzcxnxjd.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%2F7d9q5lkoi81jzzcxnxjd.png" alt="IPinfo Dashboard" width="800" height="547"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you have two options to secure your website:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Whitelist Referring Domains&lt;/li&gt;
&lt;li&gt;White Requesting IPS&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But for this case, you will need to use the “whitelist referring domains” security measure.&lt;/p&gt;

&lt;h3&gt;
  
  
  Whitelist Referring Domains
&lt;/h3&gt;

&lt;p&gt;This is one of the simplest way to block/allow API requests using your token based on the domain name.&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%2Fs7gfhahsele24rlssgqw.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%2Fs7gfhahsele24rlssgqw.png" alt="Whitelist" width="800" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Simply add your website to the input field of the “Whitelist Referring Domains” and “Save” the settings. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;So how does it work?&lt;/em&gt; After this setup, requests using IPinfo Access Token will be limited to only your website (domain) or to any other website domains you may mention there. This includes the subdomains as well.&lt;/p&gt;

&lt;p&gt;This is done with the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer" rel="noopener noreferrer"&gt;Referer&lt;/a&gt; HTTP Header of the request. The “Referer header” is a kind of header that shows, from which domain, the request has originated from.&lt;/p&gt;

&lt;p&gt;IPinfo will simply allow only API requests containing the referrer header domains you have set.&lt;/p&gt;

&lt;p&gt;This is not exactly foolproof, as HTTP headers can be modified. But it is better than nothing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;TLDR:&lt;/em&gt;&lt;/strong&gt; visit: &lt;a href="https://ipinfo.io/account/token" rel="noopener noreferrer"&gt;https://ipinfo.io/account/token&lt;/a&gt;, put your domain name in the “Whitelist Referring Domains” and save.&lt;/p&gt;

&lt;p&gt;IPinfo’s Token security features, makes your token security a bit more enhanced, but it isn’t 100% secure. You should always consider putting your token in the backend, where access to it can be limited and controlled. You can even select from which IP addresses the IPinfo service can be using your token. Visit the &lt;a href="https://ipinfo.io/faq/article/127-how-to-use-the-token-security-feature" rel="noopener noreferrer"&gt;FAQ section&lt;/a&gt; to learn more.&lt;/p&gt;

</description>
      <category>linux</category>
      <category>devops</category>
    </item>
    <item>
      <title>Getting hired as a DE (Data Engineer)</title>
      <dc:creator>Reincoder</dc:creator>
      <pubDate>Sun, 28 Aug 2022 12:14:00 +0000</pubDate>
      <link>https://dev.to/reincoder/getting-hired-as-a-de-data-engineer-j05</link>
      <guid>https://dev.to/reincoder/getting-hired-as-a-de-data-engineer-j05</guid>
      <description>&lt;p&gt;If you are applying to an entry-level Data Engineering role and you are being interviewed exclusively by someone who is from the engineering or data team, the recruiters only have two criteria-&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;They need a few basic DE specific skills&lt;/li&gt;
&lt;li&gt;They need something that they NEED&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4dF0Ze4i--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o5lqf5t1u00xz1rvw7bo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4dF0Ze4i--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/o5lqf5t1u00xz1rvw7bo.png" alt="Header Graphics" width="659" height="345"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. The few thangs!
&lt;/h3&gt;

&lt;p&gt;The standard DE tools are Airflow, SQL, Python+Pandas, and dbt. And you need to cover a DE cloud stack. For GCP it is: BQ and Cloud Storage. For the ETL process, it could be anything: Cloud Function, Compute Engine or Dataflow.&lt;/p&gt;

&lt;p&gt;BI tool... to be honest, you don't need a BI tool that much in DE. The BI tool domain is a slippery slope for DEs because the list of BI tools is endless and BI is a distinct field from DE. A serious recruiter wouldn't demand anything other than that you have heard of the tool they are using. But it is always good if you have built a dashboard or something, but in my opinion, it isn't super necessary.&lt;/p&gt;

&lt;p&gt;It's almost the same advice for Spark or Kafka. Get an understanding of what they do, and have some idea of the syntax. If the data team is using Spark or Kafka, they wouldn't expect you to touch those projects in your first 2-3 months.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. The need
&lt;/h3&gt;

&lt;p&gt;I think you can get operational knowledge of the basic DE skillset in 6 months. But the catch is the NEED factor. The NEED factor can be many things. Every company is different, and they all need that thing that makes them different.&lt;/p&gt;

&lt;p&gt;Like Scala. If you know Scala and someone is using Scala in their stack, they will try their absolute best to hire you even if you don't have the hands-on Spark experience. If they are using something like Rust, where there are only a handful of DEs who use Rust, they will try to hire you.&lt;/p&gt;

&lt;p&gt;If they are using a method extensively that is often not prioritized in DE, they will try to hire for it. In my case, it is web scraping. Because I am confident in my web scraping skills, companies with large web scraping operations try their best to hire me even though I don't have much DE experience. I also got a few interviews because they were dealing with obscure documentation. I said, I have built a project based on the OLD YouTube API docs (those who knows, knows). They tried their best to hire me.&lt;/p&gt;

&lt;p&gt;Now the interesting part is that BI/Dashboard and Spark/Kafka fit in here. In my opinion, they don't fall under the basic needs criteria. These are specialized needs for some DE teams. If you have used them or built projects using them, you would have an edge in a team that uses those tools extensively. But they wouldn't give you an edge everywhere, as not all DE teams use them.&lt;/p&gt;

&lt;p&gt;That need factor is why some DE recruiters would prefer to have programmers instead of data analysts or vice-versa, because the skillset a recruit brings meets their specific needs.&lt;/p&gt;

&lt;h3&gt;
  
  
  To summarize...
&lt;/h3&gt;

&lt;p&gt;Essentially, I am saying the need criteria is so diverse, you can't predict your way into it. So specialize in something that relates to DE that you enjoy.&lt;/p&gt;

&lt;p&gt;It sounds like feel-good advice, but that is just what I figured. Someone who is able to write Java shouldn't focus on building dashboards; they can focus on learning Scala or Rust. If you have data analytics or BI interests, you are wasting your time if you attempt to learn Scala without getting paid for it.&lt;/p&gt;




&lt;p&gt;Author: &lt;a href="https://www.twitter.com/anyfactor"&gt;anyfactor&lt;/a&gt;, DevRel at &lt;a href="https://www.ipinfo.io"&gt;IPinfo.io&lt;/a&gt; | The views and opinion expressed here are personal :)&lt;/p&gt;

</description>
      <category>data</category>
      <category>dataengineering</category>
      <category>python</category>
      <category>beginners</category>
    </item>
    <item>
      <title>IP Address Geolocation data with Python in under 30 Seconds</title>
      <dc:creator>Reincoder</dc:creator>
      <pubDate>Wed, 24 Aug 2022 09:44:00 +0000</pubDate>
      <link>https://dev.to/reincoder/ip-address-geolocation-data-with-python-in-under-30-seconds-1k1f</link>
      <guid>https://dev.to/reincoder/ip-address-geolocation-data-with-python-in-under-30-seconds-1k1f</guid>
      <description>&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%2Fw04c19gpcmm77hfuaoov.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%2Fw04c19gpcmm77hfuaoov.png" alt="post header: Getting Started with IP Address data with Python in under 30 seconds and in 2 steps"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://ipinfo.io/" rel="noopener noreferrer"&gt;IPinfo’s IP Address API&lt;/a&gt; service that keeps it simple. Whether it is making requests to the &lt;a href="https://ipinfo.io/developers" rel="noopener noreferrer"&gt;API&lt;/a&gt; or using the &lt;a href="https://github.com/ipinfo/python" rel="noopener noreferrer"&gt;official Python library&lt;/a&gt; you can get up and running in no time. &lt;/p&gt;

&lt;p&gt;The API service allows you to get tons of data and insights from an IP address including - &lt;br&gt;
🗺 Geolocation data&lt;br&gt;
🌎 ISP, hosting and company related data&lt;br&gt;
🔐 Privacy and security data like VPN, Tor and Proxy usage&lt;/p&gt;

&lt;p&gt;The IPinfo’s API gets you what you need in no time. They are pretty generous with their free tier too - they provide up to 50,000 free geolocation requests per month. Even better, no credit card is required and you can signup with your Google or Github account in under few seconds.&lt;/p&gt;

&lt;p&gt;So start the clock and let’s see if it is possible to get IP address data in under 30 seconds! &lt;/p&gt;
&lt;h1&gt;
  
  
  Signing up to IPinfo &amp;amp; getting your access token (&amp;lt;10 Seconds)
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://ipinfo.io/signup" rel="noopener noreferrer"&gt;Sign up with IPinfo&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;You can use your Google account or your GitHub account&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://ipinfo.io/account/home" rel="noopener noreferrer"&gt;Go to your dashboard&lt;/a&gt; and copy your access token from the bottom of the page!&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%2F9gvp4timi5bakq75h5h6.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%2F9gvp4timi5bakq75h5h6.png" alt="IPinfo Dashboard"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  Installing the Python Module (&amp;lt;15 Seconds)
&lt;/h1&gt;

&lt;p&gt;Assuming you have Python and Pip installed properly - &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Install the &lt;a href="https://github.com/ipinfo/python" rel="noopener noreferrer"&gt;IPinfo Python module&lt;/a&gt; using &lt;code&gt;pip&lt;/code&gt;-&lt;/p&gt;

&lt;p&gt;&lt;code&gt;pip install ipinfo&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Once installed you are ready to go!&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To use the Python Module -&lt;/p&gt;

&lt;p&gt;Import → initialize the handler → getting information from the IP address using the handler.&lt;br&gt;
&lt;/p&gt;


&lt;/li&gt;

&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;ipinfo&lt;/span&gt;

&lt;span class="c1"&gt;# get your access token from your dashboard
&lt;/span&gt;&lt;span class="n"&gt;access_token&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;0df49bbbc5e4eb&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;

&lt;span class="c1"&gt;# initialize the handler
&lt;/span&gt;&lt;span class="n"&gt;handler&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;ipinfo&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getHandler&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;access_token&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;# declare the IP address
&lt;/span&gt;&lt;span class="n"&gt;ip_address&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;216.239.36.21&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt; 

&lt;span class="n"&gt;details&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;handler&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getDetails&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ip_address&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;details&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;all&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you can write as fast me (I doubt that 😎) you can even do all that in less than 20 seconds. &lt;a href="https://twitter.com/anyfactor/status/1562375803941560320" rel="noopener noreferrer"&gt;Want me to prove it?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So what kind of information you can get from a mere IP Address? Lots of information actually.&lt;/p&gt;

&lt;p&gt;Here is the full data output&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="p"&gt;{&lt;/span&gt;
  &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;ip&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;216.239.36.21&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;hostname&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;any-in-2415.1e100.net&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;anycast&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;city&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;Mountain View&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;region&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;California&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;country&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;US&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;loc&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;37.4056,-122.0775&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;postal&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;94043&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;timezone&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;America/Los_Angeles&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;asn&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="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;asn&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;AS15169&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;name&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;Google LLC&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;domain&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;google.com&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;route&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;216.239.36.0/24&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;type&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;business&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;company&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="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;name&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;Google LLC&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;domain&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;google.com&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;type&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;business&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;privacy&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="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;vpn&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; 
       &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;proxy&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;tor&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;relay&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;hosting&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;service&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="p"&gt;},&lt;/span&gt; 
  &lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;country_name&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;United States&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;latitude&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;37.4056&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;longitude&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;-122.0775&lt;/span&gt;&lt;span class="sh"&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 also access individual data by calling specific functions&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="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;details&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;city&lt;/span&gt;
&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Mountain View&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;details&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;country&lt;/span&gt;
&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;US&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;details&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;asn&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;asn&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;AS15169&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;name&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;Google LLC&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;domain&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;google.com&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;route&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;216.239.36.0/24&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;type&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;business&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="n"&gt;details&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;asn&lt;/span&gt;
&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;37.4056,-122.0775&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, if you want to get even faster you could try out our brand-spanking-new &lt;a href="https://github.com/ipinfo/cli" rel="noopener noreferrer"&gt;IPinfo CLI&lt;/a&gt;. It lets you skip all that Python stuff and get all the information from your terminal.&lt;/p&gt;




&lt;p&gt;Want to reach out to me? Hit me up on Twitter at &lt;a href="https://twitter.com/anyfactor" rel="noopener noreferrer"&gt;@anyfactor&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>webdev</category>
      <category>security</category>
      <category>ipaddress</category>
    </item>
  </channel>
</rss>
