Add summary

This commit is contained in:
Digital Studium
2023-05-16 13:49:25 +03:00
parent c52a554bee
commit c4af2a7ecd
13 changed files with 33 additions and 22 deletions

View File

@@ -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

View File

@@ -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