Web lists-archives.com

Apt Database




Hello,
Im developing a small graphical-application (based on Python) which helps in user installing a software using Apt.
I have been able to use Apt in Python using Subprocess module.

But the problem is, whenever we are installing or doing any activity, we would like to see its progress. So I want to set up a progress bar showing how much download has been completed. How can I do it? If it was simply downloading file from a link, we could do this by setting up chunk size, but Apt offers no such choice.

Or simply Im confused how to set up a progress bar whenever Apt downloads something. Do you have any solution?

Next question is regarding Database. Apt stores everything in a database, is there any "technical" way to access it?
Example- If I give this command-
$ apt recommends python
I get output something like this-
"Apt found the following packages as recommended:
XXX
YYY
ZZZ
You can install them by the following command-
apt install XXX YYY ZZZ
"
But I don't want such chatterbox replies. I want a specific fruitful reply
Like, it can give something like this;
"
{package:python, recommends:XXX, YYY, ZZZ}
"
This would be more useful and less buggy for coding in applications. Is there any way of getting something liks that? If not, then graphical packs like Synaptic are able to do it??

I KINDLY REQUEST FOR YOUR HELP AND HOPE MY QUESTIONS ARE CLEAR.

Thank You
J. Arun Mani