python3-rpm
安装
pip3 install python3-rpm
设置变量
修改 env.sh 中变量的值,然后执行如下命令使变量生效
source env.sh
用法
rpm_ai 命令用法
- 获取指定软件包的所有服务
rpm_ai rpm get_service httpd
- 获取指定软件包的命令参数列表
rpm_ai rpm get_cmd_and_param acl
rpm 库用法
- 获取软件包提供的服务列表
from rpm.rpm import RpmService
rpm=RpmService()
service_list=rpm.get_service("httpd")
print(service_list)
其中 service_list 的内容为:
[
"htcacheclean.service",
"httpd.service"
]
- 获取命令参数列表
cmd_param_list=rpm.get_cmd_and_param("acl")
print(cmd_param_list)
其中 cmd_param_list 格式如下:
[
{"cmd": "getfacl", "param": "-a"},
{"cmd": "getfacl", "param": "-d"},
{"cmd": "getfacl", "param": "-c"},
{"cmd": "getfacl", "param": "-e"},
{"cmd": "getfacl", "param": "-E"},
{"cmd": "getfacl", "param": "-s"},
{"cmd": "getfacl", "param": "-R"},
{"cmd": "getfacl", "param": "-L"},
{"cmd": "getfacl", "param": "-P"},
{"cmd": "getfacl", "param": "-t"},
{"cmd": "getfacl", "param": "-n"},
{"cmd": "getfacl", "param": "-p"},
{"cmd": "getfacl", "param": "-v"},
{"cmd": "getfacl", "param": "-h"},
{"cmd": "getfacl", "param": "--access"},
{"cmd": "getfacl", "param": "--default"},
{"cmd": "getfacl", "param": "--omit-header"},
{"cmd": "getfacl", "param": "--all-effective"},
{"cmd": "getfacl", "param": "--no-effective"},
{"cmd": "getfacl", "param": "--skip-base"},
{"cmd": "getfacl", "param": "--recursive"},
{"cmd": "getfacl", "param": "--logical"},
{"cmd": "getfacl", "param": "--physical"},
{"cmd": "getfacl", "param": "--tabular"},
{"cmd": "getfacl", "param": "--numeric"},
{"cmd": "getfacl", "param": "--absolute-names"},
{"cmd": "getfacl", "param": "--version"},
{"cmd": "getfacl", "param": "--help"},
{"cmd": "setfacl", "param": "-m"},
{"cmd": "setfacl", "param": "-M"},
{"cmd": "setfacl", "param": "-x"},
{"cmd": "setfacl", "param": "-X"},
{"cmd": "setfacl", "param": "-b"},
{"cmd": "setfacl", "param": "-k"},
{"cmd": "setfacl", "param": "-n"},
{"cmd": "setfacl", "param": "-d"},
{"cmd": "setfacl", "param": "-R"},
{"cmd": "setfacl", "param": "-L"},
{"cmd": "setfacl", "param": "-P"},
{"cmd": "setfacl", "param": "-v"},
{"cmd": "setfacl", "param": "-h"},
{"cmd": "setfacl", "param": "--modify=acl"},
{"cmd": "setfacl", "param": "--modify-file=file"},
{"cmd": "setfacl", "param": "--remove=acl"},
{"cmd": "setfacl", "param": "--remove-file=file"},
{"cmd": "setfacl", "param": "--remove-all"},
{"cmd": "setfacl", "param": "--remove-default"},
{"cmd": "setfacl", "param": "--no-mask"},
{"cmd": "setfacl", "param": "--default"},
{"cmd": "setfacl", "param": "--recursive"},
{"cmd": "setfacl", "param": "--logical"},
{"cmd": "setfacl", "param": "--physical"},
{"cmd": "setfacl", "param": "--version"},
{"cmd": "setfacl", "param": "--help"}
]
Metadata
Release files for python3-rpm 0.2.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| python3_rpm-0.2.4.tar.gz | 5.1 kB | Without provenance | Details for python3_rpm-0.2.4.tar.gz |
Release files / python3_rpm-0.2.4.tar.gz
| Download URL | python3_rpm-0.2.4.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
08f8dce7580f4aa241a258c1340947fe9a3c321b127f5516b0c48c694ab9eb3a
|
|
BLAKE2b-256 checksum How to use checksums |
4b5ae44b2a2289b2dbd6edf4bfd43170b58d1504c96e66025cb03f1bf2fee2bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.9
|
Security for python3-rpm 0.2.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.