PY-packArch


NamePY-packArch JSON
Version 1.9.3.post1 PyPI version JSON
download
home_pagehttps://github.com/Tom5521/PY-PackArch
SummarySmall library to manage pacman package manager and install packages from AUR
upload_time2023-04-14 07:43:39
maintainer
docs_urlNone
authorTom5521
requires_python>=3.10
licenseGPL-3.0
keywords pacman arch linux linux aur
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <img src="https://res.cloudinary.com/dqjsgmkxo/image/upload/v1676571071/Captura_de_pantalla_de_2023-02-16_15-08-13_iiarxj.png" width="1000" height="100" />


[![CodeFactor](https://www.codefactor.io/repository/github/tom5521/py-packarch/badge)](https://www.codefactor.io/repository/github/tom5521/py-packarch)
![GitHub repo size](https://img.shields.io/github/repo-size/Tom5521/PY-pacman)
![GitHub last commit](https://img.shields.io/github/last-commit/Tom5521/PY-pacman)


#### A Python library to be able to handle pacman package manager from Python



You can quickly add or update in to your project running this command in the folder wherever it is
```
wget https://raw.githubusercontent.com/Tom5521/PY-pacman/master/packarch.py
```
Or can install it using this command ```pip install py-packarch```

To update the library use ```pip install py-packarch --upgrade``` or the function ```upgrade_me()``` 

You can import it in a more comfortable way by writing ```import packarch as pacman``` at the top of the file

## Functions:



#### Version

print version of this library with ```packarch.version()```

#### Manual
Go to this page whith ```packarch.manual()```
#### Check

Check if the package entered is installed

returning the True value if it is affirmative

```
check = packarch.check("spotify")
print(check)

>>>True
```
You can check several packages by separating them by spaces

#### Install

Install the packages or in the entry of the function
```
packarch.install("wine-stable neovim")
```
If you want to install more than one package you can separate through spaces
You can add more arguments after packages as I would do with Pacman
```
packarch.install("vim --needed")
```
If you want to show the exit you can put the condition ```,"-v"```
Something like that:
```
packarch.install("wine","-v")
```
If you want to add more arguments to that you will have to do something like that
```
packarch.install("wine","-v","--needed")
```


#### Update

It serves to update the repositories
```
packarch.update()
```
#### Aur.Install

It serves to install packages from the AUR
```
packarch.aur.install("visual-studio-code-bin")
```
You can put several apps to be installed for example
```
packarch.aur.install("lutris wine proton vim")
```
The apps to be installed must be separated by spaces

##### Conditions:
- ```h``` It serves to hide any text output
- ```f``` It serves to force installation
Both conditions are combinable regardless of order
The syntax of conditions is more or less like that: 
```
packarch.aur.install("visual-studio-code-bin","h")
                                               ^-It can also be f or be together regardless of order
```
#### Aur.Manager
This option is to install from the AUR but with a manager like Yay or Paru

Your syntax is something like that :
```
packarch.aur.manager("paru","vim base-devel","-v")
                      ^        ^             ^-Condition
                      |        |-Packages to be installed     
                      |-AUR manager 
```
- Compatible package managers:
    -yay
    -pikaur
    -paru
    -pacman(It is recommended to use ```packarch.install()```)
    -Any other that has a syntax similar to the above
Condiciones:
    "-v" It is used to see the terminal output (recommended to see errors)
    "-s" It serves to get a selector for example when you put ```yay <package>``` It is only compatible with the managers who have this function
- Upgrade

It serves to update the system and tabien can add arguments such as ```packarch.install()```

```
packarch.upgrade()
```
It also has the function to see what it does in the console adding the condition "-v", if it places the aforementioned function, if you want to add to that pacman conditions have to do it as shown forward
```
packarch.upgrade("-v","--needed --noconfirm")
```
You can also put conditions as it does in pacman

#### Remove
It serves to erase packages its syntax is following
```
packarch.remove("Package1 Package2","vf")
                   ^         ^      ^-Condition to execute 
                   |---------packages to remove
```
##### Conditions:
- "f" It serves to force the deletion of a program regardless of what apps depend on it
- "v" It serves to see pacman exit
Conditions can be combined regardless of order
#### Verbose
What it does is that the exit of the console is seen to the functions of the library
##### Functions:
- ```verbose.all()``` makes all installation operations show their output on console
- ```verbose.aur()``` makes all operations regarding the AURs show their exit in console
- ```verbose.pacman()``` makes all installation operations of ```packarch.install``` are shown in the console
- ```verbose.quit_clear``` Remove the terminal cleaning
#### An example of syntax
```
packarch.aur.install("wine") #Does not show output on the console

packarch.verbose.aur()
packarch.aur.install("grapejuice") #This you see if it shows the exit on the console
#It is used in the same way with its other functions previously explained
```

#### Get List

An example of its syntax
```
packarch.get_list("package names","condition")
```
##### Conditions
- ```o``` search in repositories
- ```l``` search locally
- Above conditions + ```e``` :Take out a description of the package depending on the first condition 

#### Aur Clone
It serves to clone a package from the aur

An example of its syntax:
``` 
packarch.aur.clone("lutris neovim-git","/home/tom","i")
                   î        î        î-Condition
                   |        |-Route where you are going to clone, if this empty will clone in /tmp
                   |-Attack package to clone
```

You can clone many repositories on the same route by putting the name in the Aur followed by a space
##### Conditions
- ```i``` It serves so that after the package is clone it is installed immediately
- ```f``` It serves that if the package is already cloned and clone again
- ```c``` It serves to execute a command in the folder where it is cloned
    It is used like this:
    ```
    packarch.aur.clone("lutris","/tmp","c","sudo pacman -Syu")
                                        ^       ^-The command that will be executed
                                        |-The condition
Both conditions are combinable regardless of order

#### Clone
It is the same as the above but it serves to clone any repository

An example of its syntax:
```
packarch.clone("https://github.com/Tom5521/PY-PackArch.git","/tmp","fi")
```

You can clone several repositories on the same route separating the URLs by spaces

##### Conditions
- ```i``` It serves so that after the package is clone it is installed immediately  ,It only serves if it is installable with MakePkg
- ```f``` It serves that if the package is already cloned and clone again
- ```c``` It serves to execute a command in the folder where it is cloned
    It is used like this:
    ```
    packarch.clone("https://github.com/Tom5521/PY-PackArch.git","/tmp","c","sudo pacman -Syu")
                                                                        ^       ^-The command that will be executed
                                                                        |-The condition
    ```
#### Info
Print information about a package
```
packarch.info("lutris")
```
Exit:
```
Repositorio               : community
Nombre                    : lutris
Versión                   : 0.5.12-2
Descripción               : Open Gaming Platform
Arquitectura              : any
URL                       : https://lutris.net
Licencias                 : GPL3
Grupos                    : Nada
Provee                    : Nada
Depende de                : cabextract  curl  glib2  gnome-desktop  gtk3  mesa-utils  p7zip  psmisc  python-certifi
                            python-dbus  python-distro  python-evdev  python-gobject  python-lxml  python-pillow
                            python-requests  python-yaml  unzip  webkit2gtk  xorg-xrandr
Dependencias opcionales   : gamemode: Allows games to request a temporary set of optimisations
                            gvfs: GVFS backend
                            innoextract: Extract Inno Setup installers
                            lib32-gamemode: Allows games to request a temporary set of optimisations
                            lib32-vkd3d: Vulkan 3D support
                            lib32-vulkan-icd-loader: Vulkan support
                            vkd3d: Vulkan 3D support
                            vulkan-icd-loader: Vulkan support
                            wine: Windows support
                            xorg-xgamma: Restore gamma on game exit
En conflicto con          : Nada
Remplaza a                : Nada
Tamaño de la descarga     : 745,27 KiB
Tamaño de la instalación  : 2806,23 KiB
Encargado                 : Maxime Gauduin <alucryd@archlinux.org>
Fecha de creación         : mié 07 dic 2022 13:30:26
Validado por              : Suma MD5  Suma SHA-256  Firma
```
#### Get version
An example of its syntax:
```
packarch.get_version("lutris wine nano")
```
Exit:
```
lutris is in version 0.5.12-2
wine is in version 8.3-1
nano is in version 7.2-1
```
Conditions:
```h``` It only shows the version without the name of the package
sintaxis:
```
packarch.get_version("lutris wine nano","h")
```
Exit:
```
0.5.12-2
8.3-1
7.2-1
```
### Adding some extra data:
This project was created as a dipurcation of my other project named [**Arch-App-Installer**](https://github.com/Tom5521/Arch-App-Installer)
And this project will apparently take its own path since the packarch.py of the project mentioned above will stay in version 1.0.0 for syntax issues
or maybe take your own course adapting to that project
For now that's all

#### PD:
### I still without ideas 

<img src="https://miro.medium.com/v2/resize:fit:400/0*BZKe97Qy_Z_jCqwu.gif">

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Tom5521/PY-PackArch",
    "name": "PY-packArch",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "pacman,arch linux,linux,AUR",
    "author": "Tom5521",
    "author_email": "mismarttv321@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/48/4d/13a6f6df30b337824410f31bb66c83fbebefd1e6cba4dcf8da51187e0849/PY-packArch-1.9.3.post1.tar.gz",
    "platform": null,
    "description": "<img src=\"https://res.cloudinary.com/dqjsgmkxo/image/upload/v1676571071/Captura_de_pantalla_de_2023-02-16_15-08-13_iiarxj.png\" width=\"1000\" height=\"100\" />\n\n\n[![CodeFactor](https://www.codefactor.io/repository/github/tom5521/py-packarch/badge)](https://www.codefactor.io/repository/github/tom5521/py-packarch)\n![GitHub repo size](https://img.shields.io/github/repo-size/Tom5521/PY-pacman)\n![GitHub last commit](https://img.shields.io/github/last-commit/Tom5521/PY-pacman)\n\n\n#### A Python library to be able to handle pacman package manager from Python\n\n\n\nYou can quickly add or update in to your project running this command in the folder wherever it is\n```\nwget https://raw.githubusercontent.com/Tom5521/PY-pacman/master/packarch.py\n```\nOr can install it using this command ```pip install py-packarch```\n\nTo update the library use ```pip install py-packarch --upgrade``` or the function ```upgrade_me()``` \n\nYou can import it in a more comfortable way by writing ```import packarch as pacman``` at the top of the file\n\n## Functions:\n\n\n\n#### Version\n\nprint version of this library with ```packarch.version()```\n\n#### Manual\nGo to this page whith ```packarch.manual()```\n#### Check\n\nCheck if the package entered is installed\n\nreturning the True value if it is affirmative\n\n```\ncheck = packarch.check(\"spotify\")\nprint(check)\n\n>>>True\n```\nYou can check several packages by separating them by spaces\n\n#### Install\n\nInstall the packages or in the entry of the function\n```\npackarch.install(\"wine-stable neovim\")\n```\nIf you want to install more than one package you can separate through spaces\nYou can add more arguments after packages as I would do with Pacman\n```\npackarch.install(\"vim --needed\")\n```\nIf you want to show the exit you can put the condition ```,\"-v\"```\nSomething like that:\n```\npackarch.install(\"wine\",\"-v\")\n```\nIf you want to add more arguments to that you will have to do something like that\n```\npackarch.install(\"wine\",\"-v\",\"--needed\")\n```\n\n\n#### Update\n\nIt serves to update the repositories\n```\npackarch.update()\n```\n#### Aur.Install\n\nIt serves to install packages from the AUR\n```\npackarch.aur.install(\"visual-studio-code-bin\")\n```\nYou can put several apps to be installed for example\n```\npackarch.aur.install(\"lutris wine proton vim\")\n```\nThe apps to be installed must be separated by spaces\n\n##### Conditions:\n- ```h``` It serves to hide any text output\n- ```f``` It serves to force installation\nBoth conditions are combinable regardless of order\nThe syntax of conditions is more or less like that: \n```\npackarch.aur.install(\"visual-studio-code-bin\",\"h\")\n                                               ^-It can also be f or be together regardless of order\n```\n#### Aur.Manager\nThis option is to install from the AUR but with a manager like Yay or Paru\n\nYour syntax is something like that :\n```\npackarch.aur.manager(\"paru\",\"vim base-devel\",\"-v\")\n                      ^        ^             ^-Condition\n                      |        |-Packages to be installed     \n                      |-AUR manager \n```\n- Compatible package managers:\n    -yay\n    -pikaur\n    -paru\n    -pacman(It is recommended to use ```packarch.install()```)\n    -Any other that has a syntax similar to the above\nCondiciones:\n    \"-v\" It is used to see the terminal output (recommended to see errors)\n    \"-s\" It serves to get a selector for example when you put ```yay <package>``` It is only compatible with the managers who have this function\n- Upgrade\n\nIt serves to update the system and tabien can add arguments such as ```packarch.install()```\n\n```\npackarch.upgrade()\n```\nIt also has the function to see what it does in the console adding the condition \"-v\", if it places the aforementioned function, if you want to add to that pacman conditions have to do it as shown forward\n```\npackarch.upgrade(\"-v\",\"--needed --noconfirm\")\n```\nYou can also put conditions as it does in pacman\n\n#### Remove\nIt serves to erase packages its syntax is following\n```\npackarch.remove(\"Package1 Package2\",\"vf\")\n                   ^         ^      ^-Condition to execute \n                   |---------packages to remove\n```\n##### Conditions:\n- \"f\" It serves to force the deletion of a program regardless of what apps depend on it\n- \"v\" It serves to see pacman exit\nConditions can be combined regardless of order\n#### Verbose\nWhat it does is that the exit of the console is seen to the functions of the library\n##### Functions:\n- ```verbose.all()``` makes all installation operations show their output on console\n- ```verbose.aur()``` makes all operations regarding the AURs show their exit in console\n- ```verbose.pacman()``` makes all installation operations of ```packarch.install``` are shown in the console\n- ```verbose.quit_clear``` Remove the terminal cleaning\n#### An example of syntax\n```\npackarch.aur.install(\"wine\") #Does not show output on the console\n\npackarch.verbose.aur()\npackarch.aur.install(\"grapejuice\") #This you see if it shows the exit on the console\n#It is used in the same way with its other functions previously explained\n```\n\n#### Get List\n\nAn example of its syntax\n```\npackarch.get_list(\"package names\",\"condition\")\n```\n##### Conditions\n- ```o``` search in repositories\n- ```l``` search locally\n- Above conditions + ```e``` :Take out a description of the package depending on the first condition \n\n#### Aur Clone\nIt serves to clone a package from the aur\n\nAn example of its syntax:\n``` \npackarch.aur.clone(\"lutris neovim-git\",\"/home/tom\",\"i\")\n                   \u00ee        \u00ee        \u00ee-Condition\n                   |        |-Route where you are going to clone, if this empty will clone in /tmp\n                   |-Attack package to clone\n```\n\nYou can clone many repositories on the same route by putting the name in the Aur followed by a space\n##### Conditions\n- ```i``` It serves so that after the package is clone it is installed immediately\n- ```f``` It serves that if the package is already cloned and clone again\n- ```c``` It serves to execute a command in the folder where it is cloned\n    It is used like this:\n    ```\n    packarch.aur.clone(\"lutris\",\"/tmp\",\"c\",\"sudo pacman -Syu\")\n                                        ^       ^-The command that will be executed\n                                        |-The condition\nBoth conditions are combinable regardless of order\n\n#### Clone\nIt is the same as the above but it serves to clone any repository\n\nAn example of its syntax:\n```\npackarch.clone(\"https://github.com/Tom5521/PY-PackArch.git\",\"/tmp\",\"fi\")\n```\n\nYou can clone several repositories on the same route separating the URLs by spaces\n\n##### Conditions\n- ```i``` It serves so that after the package is clone it is installed immediately  ,It only serves if it is installable with MakePkg\n- ```f``` It serves that if the package is already cloned and clone again\n- ```c``` It serves to execute a command in the folder where it is cloned\n    It is used like this:\n    ```\n    packarch.clone(\"https://github.com/Tom5521/PY-PackArch.git\",\"/tmp\",\"c\",\"sudo pacman -Syu\")\n                                                                        ^       ^-The command that will be executed\n                                                                        |-The condition\n    ```\n#### Info\nPrint information about a package\n```\npackarch.info(\"lutris\")\n```\nExit:\n```\nRepositorio               : community\nNombre                    : lutris\nVersi\u00f3n                   : 0.5.12-2\nDescripci\u00f3n               : Open Gaming Platform\nArquitectura              : any\nURL                       : https://lutris.net\nLicencias                 : GPL3\nGrupos                    : Nada\nProvee                    : Nada\nDepende de                : cabextract  curl  glib2  gnome-desktop  gtk3  mesa-utils  p7zip  psmisc  python-certifi\n                            python-dbus  python-distro  python-evdev  python-gobject  python-lxml  python-pillow\n                            python-requests  python-yaml  unzip  webkit2gtk  xorg-xrandr\nDependencias opcionales   : gamemode: Allows games to request a temporary set of optimisations\n                            gvfs: GVFS backend\n                            innoextract: Extract Inno Setup installers\n                            lib32-gamemode: Allows games to request a temporary set of optimisations\n                            lib32-vkd3d: Vulkan 3D support\n                            lib32-vulkan-icd-loader: Vulkan support\n                            vkd3d: Vulkan 3D support\n                            vulkan-icd-loader: Vulkan support\n                            wine: Windows support\n                            xorg-xgamma: Restore gamma on game exit\nEn conflicto con          : Nada\nRemplaza a                : Nada\nTama\u00f1o de la descarga     : 745,27 KiB\nTama\u00f1o de la instalaci\u00f3n  : 2806,23 KiB\nEncargado                 : Maxime Gauduin <alucryd@archlinux.org>\nFecha de creaci\u00f3n         : mi\u00e9 07 dic 2022 13:30:26\nValidado por              : Suma MD5  Suma SHA-256  Firma\n```\n#### Get version\nAn example of its syntax:\n```\npackarch.get_version(\"lutris wine nano\")\n```\nExit:\n```\nlutris is in version 0.5.12-2\nwine is in version 8.3-1\nnano is in version 7.2-1\n```\nConditions:\n```h``` It only shows the version without the name of the package\nsintaxis:\n```\npackarch.get_version(\"lutris wine nano\",\"h\")\n```\nExit:\n```\n0.5.12-2\n8.3-1\n7.2-1\n```\n### Adding some extra data:\nThis project was created as a dipurcation of my other project named [**Arch-App-Installer**](https://github.com/Tom5521/Arch-App-Installer)\nAnd this project will apparently take its own path since the packarch.py of the project mentioned above will stay in version 1.0.0 for syntax issues\nor maybe take your own course adapting to that project\nFor now that's all\n\n#### PD:\n### I still without ideas \n\n<img src=\"https://miro.medium.com/v2/resize:fit:400/0*BZKe97Qy_Z_jCqwu.gif\">\n",
    "bugtrack_url": null,
    "license": "GPL-3.0",
    "summary": "Small library to manage pacman package manager and install packages from AUR",
    "version": "1.9.3.post1",
    "split_keywords": [
        "pacman",
        "arch linux",
        "linux",
        "aur"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f538520cb840df9732501b20846d96619d01379750bd8d891b81bb6f13003d07",
                "md5": "113c1fe47d21c6b6069619da5962f630",
                "sha256": "98b985ca848d84e8175dad64b33961b13479d906269b81634299f5d55842b1c7"
            },
            "downloads": -1,
            "filename": "PY_packArch-1.9.3.post1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "113c1fe47d21c6b6069619da5962f630",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 19013,
            "upload_time": "2023-04-14T07:43:37",
            "upload_time_iso_8601": "2023-04-14T07:43:37.883462Z",
            "url": "https://files.pythonhosted.org/packages/f5/38/520cb840df9732501b20846d96619d01379750bd8d891b81bb6f13003d07/PY_packArch-1.9.3.post1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "484d13a6f6df30b337824410f31bb66c83fbebefd1e6cba4dcf8da51187e0849",
                "md5": "f4a817c3752be494b0496600e1417abe",
                "sha256": "1c75091e8506a49213ec6084cd0f2e944ae41925cb8026737cbb77f7a058341a"
            },
            "downloads": -1,
            "filename": "PY-packArch-1.9.3.post1.tar.gz",
            "has_sig": false,
            "md5_digest": "f4a817c3752be494b0496600e1417abe",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 18992,
            "upload_time": "2023-04-14T07:43:39",
            "upload_time_iso_8601": "2023-04-14T07:43:39.976986Z",
            "url": "https://files.pythonhosted.org/packages/48/4d/13a6f6df30b337824410f31bb66c83fbebefd1e6cba4dcf8da51187e0849/PY-packArch-1.9.3.post1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-04-14 07:43:39",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "Tom5521",
    "github_project": "PY-PackArch",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "py-packarch"
}
        
Elapsed time: 0.06506s