How To Install python-cattrs-doc on Ubuntu 22.04
Introduction
In this tutorial we learn how to install python-cattrs-doc
on Ubuntu 22.04.
What is python-cattrs-doc
python-cattrs-doc is:
cattrs is an open source Python library for structuring and unstructuring data. cattrs works best with attrs classes, dataclasses and the usual Python collections, but other kinds of classes are supported by manually registering converters.
Python has a rich set of powerful, easy to use, built-in data types like dictionaries, lists and tuples. These data types are also the lingua franca of most data serialization libraries, for formats like json, msgpack, yaml or toml.
Data types like this, and mappings like dict s in particular, represent unstructured data. Your data is, in all likelihood, structured: not all combinations of field names or values are valid inputs to your programs. In Python, structured data is better represented with classes and enumerations. attrs is an excellent library for declaratively describing the structure of your data, and validating it.
When you’re handed unstructured data (by your network, file system, database…), uattrs helps to convert this data into structured data. When you have to convert your structured data into data types other libraries can handle, cattrs turns your classes and enumerations into dictionaries, integers and strings.
This package provides documentation for cattrs
There are three methods to install python-cattrs-doc
on Ubuntu 22.04. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install python-cattrs-doc Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install python-cattrs-doc
using apt-get
by running the following command:
sudo apt-get -y install python-cattrs-doc
Install python-cattrs-doc Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install python-cattrs-doc
using apt
by running the following command:
sudo apt -y install python-cattrs-doc
Install python-cattrs-doc Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install python-cattrs-doc
using aptitude
by running the following command:
sudo aptitude -y install python-cattrs-doc
How To Uninstall python-cattrs-doc on Ubuntu 22.04
To uninstall only the python-cattrs-doc
package we can use the following command:
sudo apt-get remove python-cattrs-doc
Uninstall python-cattrs-doc And Its Dependencies
To uninstall python-cattrs-doc
and its dependencies that are no longer needed by Ubuntu 22.04, we can use the command below:
sudo apt-get -y autoremove python-cattrs-doc
Remove python-cattrs-doc Configurations and Data
To remove python-cattrs-doc
configuration and data from Ubuntu 22.04 we can use the following command:
sudo apt-get -y purge python-cattrs-doc
Remove python-cattrs-doc configuration, data, and all of its dependencies
We can use the following command to remove python-cattrs-doc
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge python-cattrs-doc
References
Summary
In this tutorial we learn how to install python-cattrs-doc
package on Ubuntu 22.04 using different package management tools: apt
, apt-get
and aptitude
.