<?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>Forem: Zetta</title>
    <description>The latest articles on Forem by Zetta (@zettasoft).</description>
    <link>https://forem.com/zettasoft</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%2Forganization%2Fprofile_image%2F6260%2F3361e0ec-a153-45df-9f76-b8c0a4a6ea67.png</url>
      <title>Forem: Zetta</title>
      <link>https://forem.com/zettasoft</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/zettasoft"/>
    <language>en</language>
    <item>
      <title>Creating routing API with Express JS</title>
      <dc:creator>Hendra Kusuma</dc:creator>
      <pubDate>Sat, 18 Feb 2023 22:43:57 +0000</pubDate>
      <link>https://forem.com/zettasoft/creating-routing-api-with-express-js-2ilh</link>
      <guid>https://forem.com/zettasoft/creating-routing-api-with-express-js-2ilh</guid>
      <description>&lt;p&gt;Hello everyone, back again with me. Now I want to share again about creating routing API with express JS. This article continues the previous article so make sure you have read the previous article. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Background&lt;/strong&gt;&lt;br&gt;
In this case, currently, I'm on learning Javascript backend, I want to give a tutorial about make a routing API using Node JS Express for backend developer for those who all read this article&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Task&lt;/strong&gt;&lt;br&gt;
making a routing in coding&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Getting Started&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;routing has 3 method, it has 'App method', 'chain method', and 'modular method'. I show you in the code.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;express = require('express')
app = express()
//this is a 'APP METHOD'
  app.get(`/`, (req, res) =&amp;gt; {
    res.send('Hello World!')
  })

 // /user/create
  app.post('/create', (req, res) =&amp;gt; {
    res.send('Create Order!')
  })

  // /user/update
  app.put('/update', (req, res) =&amp;gt; {
    res.send('Update Order')
  })

app.listen(3000, () =&amp;gt; {
  console.log('server is running on port 3000')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;you can running and check on your browser &lt;code&gt;localhost:3000/&lt;/code&gt;, or &lt;code&gt;localhost:3000/user/create&lt;/code&gt;, or &lt;code&gt;localhost:3000/user/update&lt;/code&gt;. You can check it one by one on Postman. And for Chaining Method, you can see on below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// this is 'CHAINING METHOD'
app.route('/product')
 .get(req, res)) =&amp;gt; {
 res.send('get a route /product')
}
.post(req, res)) =&amp;gt; {
 res.send('post a route /product')
}
.put(req, res)) =&amp;gt; {
 res.send('put a route /product')
}
.delete(req, res)) =&amp;gt; {
 res.send('delete a route  /product')
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The chaining method looks almost the same but for the initial invocation using 'app.route', it remains only to call '.get' 'post', 'put', 'delete'.&lt;/p&gt;

&lt;p&gt;And the next is 'modular method'. In simple terms, this method is to separate the route file javascript, lets say we make new file JS from the main file, let say we name it "mainFile.JS". so the route code is not combined with the main file, this functions to make our files more tidy and structured. let's see in the code&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const express = require('express')
const app = express()
const routes = require('router')
const router = express.Router()

// Routing 'MODULAR METHOD'
app.use('/api', (routes(router)

app.listen(8000, () =&amp;gt; {
  console.log('Server is running on port', 8000)
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To configuration for router in express, There we call the default function express module, namely &lt;code&gt;const router = express.Router()&lt;/code&gt;. We can see there how the routing module is called by using &lt;code&gt;app.use&lt;/code&gt; with its link function &lt;code&gt;/api&lt;/code&gt;. the function of 'app.use' we can use any routing, midelware, or plugin external. And then we calling/import the routes variable which is the file routing JS its has been called outside the main file JS by using &lt;code&gt;require&lt;/code&gt;, so we can create a new file for routing example 'routes.js', let's code the contents in routes.js.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module.exports = function (router) {
  router.get('/', function (req, res) {
    res.send('Routes Modular!')
  })

  router.post(`/create`, function (req, res) {
    res.send('create')
  })

  return router
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;if the routing goes well, it will run as it should and if the application is run it using command &lt;code&gt;node main.js run&lt;/code&gt; can be checked according to the routing link e.g. &lt;code&gt;localhost:3000/user/update/api/create&lt;/code&gt;. If you successfully appear create on the browser page, it means that you have succeeded in using the modular method.&lt;/p&gt;

&lt;p&gt;okay thanks for your read, see you in the next post :)&lt;/p&gt;

&lt;p&gt;Github :&lt;a href="https://github.com/Hendra-Kusuma"&gt;https://github.com/Hendra-Kusuma&lt;/a&gt;&lt;br&gt;
Email : &lt;a href="mailto:hendrakusuma.vegas@gmail.com"&gt;hendrakusuma.vegas@gmail.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Create server using Node JS with Framework Express</title>
      <dc:creator>Hendra Kusuma</dc:creator>
      <pubDate>Wed, 21 Dec 2022 07:45:30 +0000</pubDate>
      <link>https://forem.com/zettasoft/create-server-using-node-js-with-framework-express-39d9</link>
      <guid>https://forem.com/zettasoft/create-server-using-node-js-with-framework-express-39d9</guid>
      <description>&lt;p&gt;Hello, come back again with me, this time I want to give you a tutorial on how to create a server using Node JS with the framework Express. this time is different from the previous article. if previously discussed how to create a server natively, now I will explain about creating a server using the Express framework&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Background&lt;/strong&gt;&lt;br&gt;
In this case, currently, I'm on learning Javascript backend, there are 2 ways to native and use the framework Express JS, I want to give a tutorial for those who all read this article&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Task&lt;/strong&gt;&lt;br&gt;
create a server locally with the Javascript language using the framework Express&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Getting Started&lt;/strong&gt;&lt;br&gt;
For the first step, you can use in command line &lt;code&gt;npm init&lt;/code&gt;, and you can input information there about your package or your file. that is a starter pack and will add file package.json and there is store all the information that you have entered. After that, you can add file js, for example, you can add server.js. you can install library express on the command line, the command is &lt;code&gt;npm install express&lt;/code&gt;. We can see the code below&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const express = require('express')

const app = express()

app.get('/', (req, res) =&amp;gt; {
  res.send('Hello Handsome!')
})

app.listen(8000, () =&amp;gt; {
    console.log('Example app listening on port 8000!')
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AAJ89hsL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rpzjic3ltcix13p4qho8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AAJ89hsL--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rpzjic3ltcix13p4qho8.png" alt="preview on http://localhost:8000/" width="454" height="158"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We can see the improvement in code there is easier to understand and simple for code than using native. You can call the express function using require, and all stored functions on the variable &lt;code&gt;app&lt;/code&gt;.  Now there is to use the method &lt;code&gt;get&lt;/code&gt; you can use: &lt;code&gt;app.get('/', (req, res) =&amp;gt; {&lt;br&gt;
  res.send('Hello Handsome!')&lt;br&gt;
})&lt;/code&gt;&lt;br&gt;
now on framework Express, the method you use is &lt;code&gt;res.send&lt;/code&gt; not res.end.&lt;/p&gt;

&lt;p&gt;you can make routing on Express, I show you the code below :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const express = require('express')

const app = express()

const auth = 'Bearer 1234'

app.get('/', (req, res) =&amp;gt; {
  res.send('Hello Handsome!')
})

app.get('/user', (req, res) =&amp;gt; {
    console.log('req.headers.authorization', req.headers.authorization)
    if (req.headers.authorization === auth) {
        res.send({
            name: 'Hendra Kusuma',
            job : 'Programmer',
            age : 33,
            favorite_food : 'Nasi Goreng'
         })
    }   else {
        res.status(401).send('Unauthorized')
    } 

})

app.listen(8000, () =&amp;gt; {
    console.log('Example app listening on port 8000!')
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;you can see that, routing can be created using the function 'if' and 'else'. If you look at the routing, it is distinguished by the '/' and '/user' signs after the URL address. &lt;/p&gt;

&lt;p&gt;The data type for 'res' can be HTML or JSON text. exemplified in the '/user' routing it is in the form of JSON, and for other than status code 200, for example, 401 the contents are in the form of an unauthorized text file. I have added coding to check authorization, to read the headers it needs a Postman application, and I have tried to check how it looks when using authorize bearer Token in the postman application. The display can be seen below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RhIaOds7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/17oafexrshm1j0f1186x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RhIaOds7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/17oafexrshm1j0f1186x.png" alt="Preview Postman" width="880" height="552"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;okay, that is the simple ways to make server using Express. thanks for your read, see you in the next post :)&lt;/p&gt;

&lt;p&gt;Email : &lt;a href="mailto:hendrakusuma.vegas@gmail.com"&gt;hendrakusuma.vegas@gmail.com&lt;/a&gt;&lt;br&gt;
Source code : &lt;a href="https://github.com/Hendra-Kusuma/Express-Web"&gt;https://github.com/Hendra-Kusuma/Express-Web&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Scrapping Top Repositories for GitHub Topics</title>
      <dc:creator>Muchamad Faiz</dc:creator>
      <pubDate>Sun, 18 Dec 2022 23:08:09 +0000</pubDate>
      <link>https://forem.com/zettasoft/scrapping-top-repositories-for-github-topics-21l9</link>
      <guid>https://forem.com/zettasoft/scrapping-top-repositories-for-github-topics-21l9</guid>
      <description>&lt;p&gt;GitHub is a popular website for sharing open source projects and code repositories. For example, the tensorflow repository contains the entire source code of the Tensorflow deep learning framework.&lt;/p&gt;

&lt;p&gt;Repositories in GitHub can be tagged using topics. For example, the tensorflow repository has the topics python, machine-learning, deep-learning etc.&lt;/p&gt;

&lt;p&gt;The page &lt;a href="https://github.com/topics" rel="noopener noreferrer"&gt;https://github.com/topics&lt;/a&gt; provides a list of the top topics on Github. In this project, we'll retrive information from this page using web scraping: the process of extracting information from a website in an automated fashion using code. We'll use the Python libraries Requests and Beautiful Soup to scrape data from this page.&lt;/p&gt;

&lt;h2&gt;
  
  
  Project Outline
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;1. We're going to scrape &lt;a href="https://github.com/topics" rel="noopener noreferrer"&gt;https://github.com/topics&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;2. We'll get a list of topics. For each topic, we'll get topic title, topic page URL and topic description&lt;/li&gt;
&lt;li&gt;3. For each topic, we'll get the top 25 repositories in the topic from the topic page&lt;/li&gt;
&lt;li&gt;4. For each repository, we'll grab the repo name, username, stars and repo URL&lt;/li&gt;
&lt;li&gt;5. By the end of the project, we'll create a CSV and XLX file in the following format:&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%2Fy80s9nc99b51mdfwuzsj.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%2Fy80s9nc99b51mdfwuzsj.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Instal and import all library needed
&lt;/h3&gt;

&lt;p&gt;Before we begin lets install the library with pip&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;then, lets import all the library into code editor&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import requests as req
from bs4 import BeautifulSoup
import pandas as pd
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Write a function to download the page
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def get_topic_link(base_url):
    response = req.get(url=base_url)
    page_content = response.text
    print(response.status_code)

    soup = BeautifulSoup(page_content, "html.parser")
    tags = soup.find_all("div", class_ = "py-4 border-bottom d-flex flex-justify-between")
    topic_links = []
    for tag in tags:
        url_end = tag.find("a")["href"]
        topic_link = f"https://www.github.com{url_end}"
        topic_links.append(topic_link)
    return topic_links
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  write a function to extract information
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def get_info_topic(topic_link):
    response1 = req.get(topic_link)
    topic_soup = BeautifulSoup(response1.text, "html.parser")
    topic_tag = topic_soup.find("h1").text.strip() #3D
    topic_desc = topic_soup.find("p").text
    info_topic = {
        "title" : topic_tag,
        "desc" : topic_desc
    }
    return info_topic


def get_info_tags(topic_link):
    response = req.get(topic_link)
    info_soup = BeautifulSoup(response.text, "html.parser")
    repo_tags = info_soup.find_all("div", class_ = "d-flex flex-justify-between flex-items-start flex-wrap gap-2 my-3")
    return repo_tags


def get_info(tag):
    repo_username = tag.find_all("a")[0]
    repo_name = tag.find_all("a")[1]

    url_end = tag.find("a")["href"]
    repo_url = f"https://www.github.com{url_end}"

    repo_star = tag.find("span",{"id":"repo-stars-counter-star"}).text.strip()
    repo_value = int(float(repo_star[:-1]) * 1000)

    topics_data = {
        "repo_name" : "repo_name",
        "repo_username" : repo_username.text.strip(),
        "repo_name" : repo_name.text.strip(),
        "repo_url" : repo_url,
        "repo_star" : repo_value,
        }
    return topics_data
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Create CSV file(s) with the extracted information
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def save_CSV(results):
    df = pd.DataFrame(results)
    df.to_csv("github.csv", index=False)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Create XLX file(s) with the extracted information
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def save_XLX(results):
    df = pd.DataFrame(results)
    df.to_excel("github.xlsx", index=False)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Putting it all together
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;we have a function to get the list of topics&lt;/li&gt;
&lt;li&gt;we have a function to create a CSV file for scraped repos from a topics page&lt;/li&gt;
&lt;li&gt;Let's create a function to put them together
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;def main():
    base_url = "https://github.com/topics"
    topic_links = get_topic_link(base_url) # list of url ex: https://github.com/topics/3d, https://github.com/topics/AJAX, etc
    result2 = []
    for topic_link in topic_links: # https://github.com/topics/3d
        print(f"getting info {topic_link}")
        topic_tags = get_info_topic(topic_link) #title, desc
        repo_tags = get_info_tags(topic_link) # some repo tags, so we can use for loop
        result1 = []
        for tag in repo_tags:
            repo_info = get_info(tag)
            result1.append(repo_info)
        for x in result1:
            gabungan = topic_tags | x
            result2.append(gabungan)
        save_CSV(result2)
        save_XLX(result2)


if __name__ == "__main__":
    main()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;We are done here, i hope this simple project can be valuable to your practice in python web scrapping. &lt;/p&gt;

&lt;p&gt;Github :&lt;a href="https://github.com/muchamadfaiz" rel="noopener noreferrer"&gt;https://github.com/muchamadfaiz&lt;/a&gt;&lt;br&gt;
Email : &lt;a href="mailto:muchamadfaiz@gmail.com"&gt;muchamadfaiz@gmail.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Create server using Node JS Native Javascript</title>
      <dc:creator>Hendra Kusuma</dc:creator>
      <pubDate>Fri, 16 Dec 2022 04:03:26 +0000</pubDate>
      <link>https://forem.com/zettasoft/create-server-using-node-js-native-javascript-45k7</link>
      <guid>https://forem.com/zettasoft/create-server-using-node-js-native-javascript-45k7</guid>
      <description>&lt;p&gt;Hello, in this post I want to share with you how to create a simple server on your local host.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Background&lt;/strong&gt;&lt;br&gt;
In this case, I'm on learning Javascript backend, there are 2 ways to native and use the framework Ekspress JS, I want to give a tutorial for those who all read this article&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Task&lt;/strong&gt;&lt;br&gt;
create a server locally with the Javascript language&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Getting Started&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;the first step is you need to make an index.js file and call a module/library Https, the code is just like this &lt;code&gt;const http = require('http')&lt;/code&gt;. this method "require" is calling the HTTP method, the "http is a built-in library in Node JS, so you can only call it on your code. &lt;/p&gt;

&lt;p&gt;then to create a server, the code can be like below&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const http = require('http')

const listener = http.createServer((req, res) =&amp;gt; {
    console.log('req.headers.autorization', req.headers.authorization)
    if (req.url === '/user'){
        res.writeHead(200, {'Content-Type': 'application/json'})
        res.end(JSON.stringify({ name : 'John Doe'}))
    }   else {
        res.writeHead(200)
        res.end('Hello World')
    }

})

listener.listen(8000, 'localhost', () =&amp;gt; {
    console.log('Server is listening on port 8000')
})
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;the method &lt;code&gt;http.createServer&lt;/code&gt; have the callback parameter req and res, as we know req for a request and res for a response. if we want to make a routing in native node JS we can use &lt;code&gt;if (req.url === '/user')&lt;/code&gt;. it is just an example for /user. if we run it will show &lt;code&gt;name: 'John Doe'&lt;/code&gt; and for "else" or other it will show &lt;code&gt;'Hello World'&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;And we can run in terminal command bash with &lt;code&gt;node index.js&lt;/code&gt;. And then notice will prompt on the terminal "Server is listening on port 8000". We can see on our browser on locallost:8000. We have already succeeded to build a server with native node JS, the preview is below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy5bw7ny8pk45bfxqbctv.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%2Fy5bw7ny8pk45bfxqbctv.png" alt="preview localhost:8000 on browser"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwwf13v6e9sfcxebypzzf.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%2Fwwf13v6e9sfcxebypzzf.png" alt="preview localhost:8000/user on browser"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;okay thanks for your read, see you in the next post :)&lt;/p&gt;

&lt;p&gt;Github :&lt;a href="https://github.com/Hendra-Kusuma" rel="noopener noreferrer"&gt;https://github.com/Hendra-Kusuma&lt;/a&gt;&lt;br&gt;
Email : &lt;a href="mailto:hendrakusuma.vegas@gmail.com"&gt;hendrakusuma.vegas@gmail.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>node</category>
      <category>javascript</category>
    </item>
    <item>
      <title>How to manage browser driver with Web Driver Manager</title>
      <dc:creator>Muchamad Faiz</dc:creator>
      <pubDate>Thu, 15 Dec 2022 21:09:28 +0000</pubDate>
      <link>https://forem.com/zettasoft/how-to-manage-browser-driver-with-web-driver-manager-3k53</link>
      <guid>https://forem.com/zettasoft/how-to-manage-browser-driver-with-web-driver-manager-3k53</guid>
      <description>&lt;p&gt;In this article i will explain how to use Web Driver Manager to manage browser driver easily&lt;/p&gt;

&lt;h2&gt;
  
  
  Background
&lt;/h2&gt;

&lt;p&gt;when we make a project using selenium library every time there is a newer version of the driver we need to download it and we have to set the corresponding executable path explicitly. After that, we make object from the driver and continue with the code we want to run. these steps become complicated as we need to repeat these steps out every time the versions change.So therefore, we use WebDriverManager to easily manage it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Task
&lt;/h2&gt;

&lt;p&gt;Create a simple session to open google.com and search with keyword "web scrapping"&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;p&gt;assuming python is intalled on your machine or virtual environment, then you must install WebDriverManager and selenium&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;after that on code editor lets import all library we need&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.chrome.service import Service as ChromeService
from webdriver_manager.chrome import ChromeDriverManager
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;next we start the session by instatiating driver object&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;driver = webdriver.Chrome(options=Options, service=ChromeService(ChromeDriverManager().install()))
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;the script above will install driver browser automatically, &lt;br&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%2Fvf0g46gd0akvsup3m6wd.jpg" 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%2Fvf0g46gd0akvsup3m6wd.jpg" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
then, lets call the driver object to take action on google.com&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;driver.get("https:www.google.com")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and lets find element search and send key "web scraping" on it&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;search_el = driver.find_element(By.CSS_SELECTOR,"input[title='Search']")
search_el.send_keys("web scrapping")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;if you have arrived at this step, then your screen will be the same as this image&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7brlrtd5j2kom6pchlii.jpg" 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%2F7brlrtd5j2kom6pchlii.jpg" alt="Web Scraping"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;now we know that WebDriverManager automates the browser setup in the Selenium code and this make the difficult steps to store newer version of driver become automatic so we can focus on our execution script rather than browser settings&lt;/p&gt;

&lt;p&gt;Github :&lt;a href="https://github.com/muchamadfaiz" rel="noopener noreferrer"&gt;https://github.com/muchamadfaiz&lt;/a&gt;&lt;br&gt;
Email : &lt;a href="mailto:muchamadfaiz@gmail.com"&gt;muchamadfaiz@gmail.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>beginners</category>
      <category>tutorial</category>
      <category>python</category>
    </item>
    <item>
      <title>Google Image Scraping Using Selenium - Part 1</title>
      <dc:creator>Muchamad Faiz</dc:creator>
      <pubDate>Tue, 13 Dec 2022 09:35:06 +0000</pubDate>
      <link>https://forem.com/zettasoft/google-image-scraping-using-selenium-part-1-1nl7</link>
      <guid>https://forem.com/zettasoft/google-image-scraping-using-selenium-part-1-1nl7</guid>
      <description>&lt;p&gt;If you wanna learn automation scrapping with selenium, then this simple project can be the starting point of your journey. In this tutorial i will explain how to scrape image from google using selenium.&lt;/p&gt;

&lt;h2&gt;
  
  
  Background
&lt;/h2&gt;

&lt;p&gt;on my case i want to scrape image on google with some keyword, lets say "cat" then i will store some links as csv files.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting Started
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is Selenium
&lt;/h3&gt;

&lt;p&gt;before we go any further we must know what is selenium. Selenium is a tool for controlling web browsers through programs and performing browser automation. It is mainly used as a testing framework for cross-web browser platforms. However, Selenium is also a very capable tool to use for general web automation, as we are able to program it to do what a human user can do on a browser (in this case, to programmatically download images from Google).&lt;/p&gt;

&lt;h3&gt;
  
  
  Scraping with Selenium
&lt;/h3&gt;

&lt;p&gt;So how does Selenium exactly work? well, Selenium provides the mechanisms to locate elements on a web page and it mimic the user behaviour. here is the table for most used attribute and locator&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ch5FrzJH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/17xhe3nt2a2kxqb39uee.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ch5FrzJH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/17xhe3nt2a2kxqb39uee.jpg" alt="test" width="184" height="121"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These elements can be found in feature Developer Tools on web browsers&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---dbpyfNk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/74m2kjk5ozctooxo6kkr.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---dbpyfNk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/74m2kjk5ozctooxo6kkr.jpg" alt="Developer Tools" width="880" height="365"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;and now lets start coding!&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Set up the necessary libraries required for the script
&lt;/li&gt;
&lt;/ol&gt;

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

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Import Libraries
for this tutorial i will be using google chrome so,
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from selenium.webdriver import Chrome
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;go get into google.com then search with keyword "cat"
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;driver = Chrome()
driver.get("https://www.google.com/")
search_el = driver.find_element(By.XPATH, "//input[@title='Search']")
search_el.send_keys("cat")
search_el.send_keys("Keys.ENTER")
image_el = driver.find_element(By.XPATH, "//a[href]")
image_el.click()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;the google window will pop up with cat image&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--N8k6jjeA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pnycc2zam9v6606f2sk1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--N8k6jjeA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pnycc2zam9v6606f2sk1.jpg" alt="test2" width="880" height="367"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Congratulations! You have successfully open a browser and and navigate to cat images automatically, next we will scroll the page and extract the url image. i will cover it in next part&lt;/p&gt;

&lt;p&gt;Github :&lt;a href="https://github.com/muchamadfaiz"&gt;https://github.com/muchamadfaiz&lt;/a&gt;&lt;br&gt;
Email : &lt;a href="mailto:muchamadfaiz@gmail.com"&gt;muchamadfaiz@gmail.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>scrapping</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How to make a Calendar using Python Tkinter</title>
      <dc:creator>Hendra Kusuma</dc:creator>
      <pubDate>Mon, 12 Dec 2022 08:52:48 +0000</pubDate>
      <link>https://forem.com/zettasoft/how-to-make-a-calendar-using-python-tkinter-4ijj</link>
      <guid>https://forem.com/zettasoft/how-to-make-a-calendar-using-python-tkinter-4ijj</guid>
      <description>&lt;p&gt;Hello, I want to teach you to make a calendar with Python language programming, &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Background&lt;/strong&gt;&lt;br&gt;
In my case I want to make a simple GUI for an app that need a calendar to see and maintain that app. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Getting started&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;To do that we need a library python which is name is "Tkinter". lets we do it first you must import &lt;code&gt;from tkinter import *&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;as you know, Tkinter is the built-in library in python, so you don't need to install them, you can just call them in command import as above. and the next step is basic standard code to run Tkinter, you can follow this code to run Tkinter.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from tkinter import *

window = Tk()
window.title("Welcome to Helloworld app") #this for your title

width = 400 #this is for the width size of the window
height = 400 #this is for the height size of the window
x = 500 #this is the distance your window with the border screen of your laptop/PC from up and down
y = 200 #this is the distance between your window with your border screen of the laptop/PC from left and right

window.geometry(f"{width}x{height}+{x}+{y}") #this for size window

window.mainloop() #this to run your tkinter
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;this is the first step you can run your Tkinter, it opened as you run it, but not done yet because it's empty in your window. We can fill it with code to make a calendar. now the next step you can add import &lt;code&gt;from tkcalendar import *&lt;/code&gt; or if you don't have this you can install it with this command &lt;code&gt;pip install tkcalendar&lt;/code&gt; on your terminal.&lt;/p&gt;

&lt;p&gt;And then, we can input the code like this,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;from tkinter import *
from tkcalendar import *

window = Tk()
window.title("Welcome to Helloworld app")
width = 400
height = 400
x = 500
y = 200

window.geometry(f"{width}x{height}+{x}+{y}")

def date_picker():
    date = myCal.get_date()
    date_label = Label(window, text="This date is" + date)
    date_label.grid(row=7, column=1, ipadx=10, ipady=10, sticky="wesn", pady=10)

myCal = Calendar(window, selectmode="day", date_pattern="dd/mm/yyyy", )
myCal.grid(row=0, column=0, columnspan=3, rowspan=5, sticky="wesn", pady=50)
OpenCal = Button(window, text="Select Date", command=date_picker)
OpenCal.grid(row=6, column=1, ipadx=10, ipady=10, sticky="wesn", pady=10)

window.mainloop()

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

&lt;/div&gt;



&lt;p&gt;I add widget button and function &lt;code&gt;date_picker&lt;/code&gt;&lt;br&gt;
to get data of date in calendar, so we can see the result on below&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%2Fwbg5d9m05fm8lxw592qu.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%2Fwbg5d9m05fm8lxw592qu.png" alt="the result of calendar with button widget" width="502" height="539"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;we can see if we chose date on calendar and click the button, we can get the date on label column.&lt;/p&gt;

&lt;p&gt;okay thanks for your read, see you in the next post :)&lt;/p&gt;

&lt;p&gt;Github :&lt;a href="https://github.com/Hendra-Kusuma" rel="noopener noreferrer"&gt;https://github.com/Hendra-Kusuma&lt;/a&gt;&lt;br&gt;
Email : &lt;a href="mailto:hendrakusuma.vegas@gmail.com"&gt;hendrakusuma.vegas@gmail.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>tutorial</category>
    </item>
    <item>
      <title>Create Beautiful CLI Tools using Typer</title>
      <dc:creator>perymerdeka</dc:creator>
      <pubDate>Sun, 11 Dec 2022 12:50:31 +0000</pubDate>
      <link>https://forem.com/zettasoft/create-beautiful-cli-tools-using-typer-4ee</link>
      <guid>https://forem.com/zettasoft/create-beautiful-cli-tools-using-typer-4ee</guid>
      <description>&lt;p&gt;In this post i will discuss about how to create beautiful CLI Tools using library call &lt;a href="https://typer.tiangolo.com/"&gt;typer&lt;/a&gt; with this library we can create amazing CLI Tools with that&lt;/p&gt;

&lt;h3&gt;
  
  
  Background
&lt;/h3&gt;

&lt;p&gt;on my case i want to create interactive Scraping tools based on python without make confuse my client, then i look helper from my bash terminal, then i search tools on the internet and found the cool  library.&lt;/p&gt;

&lt;h3&gt;
  
  
  Task
&lt;/h3&gt;

&lt;p&gt;create sample tools using typer, the case is creating simple greeting apps with object oriented paradigm&lt;/p&gt;

&lt;h3&gt;
  
  
  Getting Started
&lt;/h3&gt;

&lt;p&gt;first create repo on github and save your source code and install &lt;code&gt;poetry&lt;/code&gt; for dependency management &lt;a href="https://python-poetry.org/"&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and then install the dependencies&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;poetry add typer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and then create class &lt;code&gt;Greetings&lt;/code&gt; on &lt;code&gt;greet.py&lt;/code&gt;&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="nn"&gt;typing&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Optional&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;pprint&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;pprint&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Greetings&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;object&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;__init__&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;address&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Optional&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;None&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;city&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Optional&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;None&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Optional&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;None&lt;/span&gt;&lt;span class="p"&gt;,):&lt;/span&gt;
        &lt;span class="bp"&gt;self&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="n"&gt;name&lt;/span&gt;
        &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;address&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;address&lt;/span&gt;
        &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;city&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;city&lt;/span&gt;
        &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;intro&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="s"&gt;"""introduce yourself in informal event
        """&lt;/span&gt;
        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello My name is {}, Nice to meet You"&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;formal_event&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="s"&gt;"""introduce youself in formal event
        """&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;address&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="bp"&gt;None&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello Nice to meet you, my name is {} i live in {}, {}, {}"&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;format&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;city&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
        &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Hello Nice to meet you, my name is {} Nice to Meet Yo Bro"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;identity&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
        &lt;span class="s"&gt;"""Print your identity
        """&lt;/span&gt;

        &lt;span class="n"&gt;data_dict&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;dict&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="s"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s"&gt;"address"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s"&gt;"city"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;city&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
            &lt;span class="s"&gt;"state"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="bp"&gt;self&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"here your identity"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;pprint&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data_dict&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;then on &lt;code&gt;main.py&lt;/code&gt; adding typer configuration&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="nn"&gt;typer&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Typer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Option&lt;/span&gt;
&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;typing&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Optional&lt;/span&gt;

&lt;span class="kn"&gt;from&lt;/span&gt; &lt;span class="nn"&gt;greet&lt;/span&gt; &lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="n"&gt;Greetings&lt;/span&gt;

&lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Typer&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="o"&gt;@&lt;/span&gt;&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;command&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;str&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Option&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;help&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Enter Your Name"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Optional&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Option&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
        &lt;span class="s"&gt;"unformal"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;help&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"help you print greeting text with unformal format"&lt;/span&gt;
    &lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;address&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Optional&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Option&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;help&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Your Address"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;city&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Optional&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Option&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;help&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Your City"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
    &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Optional&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nb"&gt;str&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Option&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;help&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Your State Address"&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;greeting&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Greetings&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;Greetings&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="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;address&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;address&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;city&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;city&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;state&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;mode&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s"&gt;"unformal"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;greeting&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;intro&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;mode&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s"&gt;"formal"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;greeting&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;intro&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;mode&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s"&gt;"unformal"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;greeting&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;formal_event&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;mode&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s"&gt;"indentity"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;greeting&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;identity&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;__name__&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s"&gt;"__main__"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;here is an help pages&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python src/main.py &lt;span class="nt"&gt;--help&lt;/span&gt;       
Usage: main.py &lt;span class="o"&gt;[&lt;/span&gt;OPTIONS]

Options:
  &lt;span class="nt"&gt;--name&lt;/span&gt; TEXT           Enter Your Name
  &lt;span class="nt"&gt;--mode&lt;/span&gt; TEXT           &lt;span class="nb"&gt;help &lt;/span&gt;you print greeting text with unformal format
                        &lt;span class="o"&gt;[&lt;/span&gt;default: unformal]
  &lt;span class="nt"&gt;--address&lt;/span&gt; TEXT        Your Address
  &lt;span class="nt"&gt;--city&lt;/span&gt; TEXT           Your City
  &lt;span class="nt"&gt;--state&lt;/span&gt; TEXT          Your State Address
  &lt;span class="nt"&gt;--install-completion&lt;/span&gt;  Install completion &lt;span class="k"&gt;for &lt;/span&gt;the current shell.
  &lt;span class="nt"&gt;--show-completion&lt;/span&gt;     Show completion &lt;span class="k"&gt;for &lt;/span&gt;the current shell, to copy it or
                        customize the installation.
  &lt;span class="nt"&gt;--help&lt;/span&gt;                Show this message and exit.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Examples
&lt;/h3&gt;

&lt;p&gt;here is an examples results&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;python src/main.py &lt;span class="nt"&gt;--name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"Siti"&lt;/span&gt;
Hello My name is Siti, Nice to meet You &lt;span class="c"&gt;# &amp;lt;- the results&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;in this post just demonstrate usage of typer packages, so explore more at &lt;a href="https://typer.tiangolo.com/"&gt;docs&lt;/a&gt;, see you in the next post :)&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: Source Code Available at &lt;a href="https://github.com/perymerdeka/greeting-apps"&gt;here&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>python</category>
      <category>programming</category>
      <category>opensource</category>
      <category>tooling</category>
    </item>
    <item>
      <title>This 5 Reasons of Web Scraping May Benefit Your Business</title>
      <dc:creator>Muchamad Faiz</dc:creator>
      <pubDate>Thu, 10 Nov 2022 04:59:18 +0000</pubDate>
      <link>https://forem.com/zettasoft/this-5-reasons-of-web-scraping-may-benefit-your-business-3e4h</link>
      <guid>https://forem.com/zettasoft/this-5-reasons-of-web-scraping-may-benefit-your-business-3e4h</guid>
      <description>&lt;p&gt;As the digital economy expands, the role of web scraping becomes ever more important. In this article i will explain how web scraping can benefit your business&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Real Estate Listing Scraping
&lt;/h3&gt;

&lt;p&gt;In this era, the housing industry more like a complicated system of housing sites having big datas about travel destinations, reviews of places to stay, comments, and user profiles.&lt;br&gt;
Many real estate agents use web scraping to populate their database of available properties for sale or for rent.&lt;/p&gt;

&lt;p&gt;For example, a real estate agency will scrape MLS (private databases that are created, maintained and paid for by real estate professionals to help their clients buy and sell property) listings to build an API that directly populates this information onto their website. This way, they get to act as the agent for the property when someone finds this listing on their site.&lt;/p&gt;

&lt;p&gt;Most listings that you will find on a Real Estate website are automatically generated by an API.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Shopping Sites Comparison
&lt;/h3&gt;

&lt;p&gt;Some websites and applications can help you to easily compare pricing between several retailers for the same product.&lt;/p&gt;

&lt;p&gt;One way that these websites work is by using web scrapers to scrape product data and pricing from each retailer daily. This way, they can provide their users with the comparison data they need.&lt;/p&gt;

&lt;p&gt;High-quality web scraped data obtained in large volumes can be very helpful in analyzing the product trends and forecasting the price.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Lead Generation
&lt;/h3&gt;

&lt;p&gt;web scraping is used by many companies to collect contact information about potential customers or clients. This is incredibly common in the business-to-business space, where potential customers will post their business information publicly online. You can take your target persona: education, company, job title, etc. and then find relevant websites on your niche: physicians on health care providers; plumbers, drycleaner, restaurant, etc from Yell.com; KOL (key opinion leader) from big-leap start-up companies&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Investment Decisions
&lt;/h3&gt;

&lt;p&gt;Investment decisions are complex, as it usually involves a series of process before a sound decision can be made from setting up a hypothetical thesis, experimenting, to researching. The most effective way to test an investment thesis is through historical data analysis. It allows you to gain insights into the root cause of past failures or successes, pitfalls you should have avoided, and future investment returns you might gain.&lt;/p&gt;

&lt;p&gt;However, web scraping does not guarantee improved returns on its own. With some financial knowledge and a little for data gathering and analysis, it can prove to be an invaluable tool in today’s information-driven economy.&lt;/p&gt;

&lt;p&gt;Web data has no limitation. It’s ever-growing and full of information that can influence the market. Knowing how to harness the power of a web scraping tool can pave the way to better returns. &lt;/p&gt;

&lt;h3&gt;
  
  
  5. Product Optimization
&lt;/h3&gt;

&lt;p&gt;Suppose you want to collect customers’ feedback to cross-examine your product and make improvements. The sentiment analysis technique is widely used to analyze customers’ attitudes, whether it is positive, neutral or negative. However, the analysis needs a considerable amount of data. Web scraping can automate the extraction process faster which saves tons of time and effort for such work.&lt;/p&gt;

&lt;p&gt;That’s all, if you have any comment or question please dont mind me.&lt;/p&gt;

</description>
      <category>python</category>
    </item>
    <item>
      <title>What’s RESTful API?</title>
      <dc:creator>MDKovalesky</dc:creator>
      <pubDate>Thu, 10 Nov 2022 02:15:09 +0000</pubDate>
      <link>https://forem.com/zettasoft/whats-restful-api-2ha</link>
      <guid>https://forem.com/zettasoft/whats-restful-api-2ha</guid>
      <description>&lt;p&gt;what are RESTful APIs? but before we go further we know what a RESTful API is, we must first know what an API is? API (Application Programming Interface) is An application programming interface is a connection between computers or between computer programs. It is a type of software interface, offering a service to other pieces of software. In simple terms, it can be interpreted as an interface in the form of a collection of functions that can be executed by other programs. We see in the image below:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--gpYQNmFU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kfubtuu6urpwwvbkq5ju.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--gpYQNmFU--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kfubtuu6urpwwvbkq5ju.png" alt="Image description" width="500" height="444"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As we saw in the case of facebook above we can synchronize between services. Facebook can be accessed via the web or can be accessed by mobile. The data from each service will also be in sync even though it is opened on two different platforms/devices. So through the API we can access the data that is on Facebook and allow us to cross platforms and share the same data and can be accessed from the mobile platform or website platform.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--K7KKhGVq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fhtjh5hpzxallwx1s15o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--K7KKhGVq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fhtjh5hpzxallwx1s15o.png" alt="Image description" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The application of the API is also still very broad, so it can also be applied to:&lt;br&gt;
• API can be in Programming Language&lt;br&gt;
• API can be in the Library &amp;amp; Framework&lt;br&gt;
• API can exist on the Operating System&lt;br&gt;
• API can exist in Web Service / Web API&lt;br&gt;
Now if anyone where is the REST API? Web Service / Web API in it usually there are two components, the first is SOAP (Simple Object Access Protocol) and the second is REST (REpresentational State Transfer). In this article, we will know what REST is. REST (Representational State Transfer) is a software architectural style that was created to guide the design and development of the architecture for the World Wide Web. REST defines a set of constraints for how the architecture of an Internet-scale distributed hypermedia system, such as the Web. So actually REST is Can be seen more clearly in the image below&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--CTgx_aEB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g0l9ckektcncqnq0vbsv.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CTgx_aEB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g0l9ckektcncqnq0vbsv.png" alt="Image description" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the REST API architecture we can divide it into two parts, namely: Client side and Server side. The server contains databases and applications that serve various client applications. While the Client is an application that consumes the API.&lt;br&gt;
How the API works can be described simply as follows:&lt;br&gt;
• Client application access API&lt;br&gt;
The client will access the API by firing at a specified endpoint. Inside an endpoint there are: the HTTP method used, the endpoint url, and the body (data) that you want to send.&lt;br&gt;
• API makes requests to the server&lt;br&gt;
When an endpoint is accessed, the API will forward it as a request to the server.&lt;br&gt;
• Server processing requests&lt;br&gt;
The server application will then process the request according to the intent and purpose requested on the request.&lt;br&gt;
• Server returns response to Client&lt;br&gt;
When the request is successfully processed, the server will return a response to the client. Response contains the requested/needed data according to the request given. Usually this response is in the form of data (JSON and XML)&lt;br&gt;
Request clients or HTTP requests in order to perform a RESTful API can use the HTTP Method. The HTTP method consists of:&lt;br&gt;
• Create = Post for create a post: Post /users&lt;br&gt;
• Read = Get for find user data details: Get /users/:id&lt;br&gt;
• Update = Patch for update a user: Patch /users/:id&lt;br&gt;
• Delete = Delete for delete a user: Delete /users/:id&lt;br&gt;
RESTful APIs are Stateless, which means there is no state in an application. The stateless nature makes every HTTP request done in isolation, the server does not store any state regarding the client session, each request from the client must contain all the information needed by the server including authentication information, and stateless is one of the requirements to create a RESTful API.&lt;br&gt;
So, it can be concluded that in making a RESTful API there are several conditions, namely as follows.&lt;br&gt;
• Using the correct HTTP methods (GET, PUT, POST, DELETE)&lt;br&gt;
• ENDPOINTS used are nouns&lt;br&gt;
• Stateless&lt;br&gt;
• Using REST correctly&lt;br&gt;
So, do you understand what a RESTful API is? it looks difficult but it would be nice for you to be able to practice the method directly in the next article:&lt;/p&gt;

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