mirror of
https://git.digitalstudium.com/digitalstudium/digitalstudium.com
synced 2023-12-29 08:06:35 +00:00
Add summary
This commit is contained in:
@@ -6,13 +6,13 @@ date: 2023-04-09
|
||||
---
|
||||
I want to share the easiest way I know to write a CLI tool for Linux administration
|
||||
using python and Fire.
|
||||
<!--more-->
|
||||
## Step 1: Install Fire
|
||||
```bash
|
||||
pip install fire
|
||||
```
|
||||
## Step 2. Create a simple CLI tool
|
||||
Here is an example of a CLI tool that prints the Linux version to the terminal:
|
||||
<!--more-->
|
||||
```python
|
||||
#!/usr/bin/env python3
|
||||
import fire
|
||||
|
@@ -4,11 +4,16 @@ category: python-lifehacks
|
||||
filename: how-to-load-multiple-web-pages-in-parallel-using-python
|
||||
date: 2022-05-15
|
||||
---
|
||||
This article describes how to load the content of multiple web pages from multiple urls in parallel with python.
|
||||
<!--more-->
|
||||
## Step 1. Installation of aiohttp
|
||||
First you need to install an aiohttp package. To install aiohttp run the command:
|
||||
```bash
|
||||
pip install aiohttp[speedups]
|
||||
```<!--more-->
|
||||
The `[speedups]` suffix is needed to install aiohttp accelerating packages - aiodns and cchardet. Then create a main.py file with this code:
|
||||
```
|
||||
The `[speedups]` suffix is needed to install aiohttp accelerating packages - aiodns and cchardet.
|
||||
## Step 2. Creation of a script
|
||||
Then create a main.py file with this code:
|
||||
```python
|
||||
import aiohttp
|
||||
import asyncio
|
||||
|
Reference in New Issue
Block a user