www.xbdev.net
xbdev - software development
Sunday July 21, 2024
Home | Contact | Support | Python Language... Power of the Snake .. ..
     
 

Python Language...

Power of the Snake .. ..

 



Python > Web Programming with Python


Python has very good support for web development with its frameworks like Django, Flask, and others.

It can be used to build server-side web applications and can be integrated with any frontend.

Generally, developers use JavaScript in frontend and python for supporting server-side operations. Python is not used directly in browsers.


Python Server


Example – Access to the computer file system from mobile
You can access your file system by running a file server on your machine. Go to the desired directory that you want to access and run the following command –


This starts a file server that can be accessed on the same network. To access your files on mobile, simply connect to the same network(wifi or use the phone's hotspot on a laptop). Now in your phone browser open –


Check your IP by running – ifconfig. Check your local IP (should start with
192.168.---.---
)

Suppose your IP is –
192.168.43.155
and you use the default port. Then, you should open –



Web Scraping


You see a lot of data every day across multiple sites. Think how cool it would be if you can access that data easily; that is what web scraping is, and python makes it even easier with its amazing support and libraries. Data on the web is unstructured, and python provides an easy way to parse and consume this data and even do further analysis and operations.

Some popular scraping libraries are:

• Beautiful Soup
• Scrapy

Let me show you an example on how you can scrape currency values from a website – x-rates.com

Example – Get currency value compared to USD


Let's use scraping in python to fetch currency values –

















 
Advert (Support Website)

 
 Visitor:
Copyright (c) 2002-2024 xbdev.net - All rights reserved.
Designated articles, tutorials and software are the property of their respective owners.