Skip to main content

autounrar - 自动解压 RAR 压缩包的 Python 库

autounrar - Automatically Unrar RAR Archives in Python


简介 / Introduction

autounrar 是一个 Python 库,旨在简化 RAR 压缩包的处理。它会自动下载 unrar.exe,并使用它来解压 RAR 压缩包或列出压缩包中的文件列表。无需手动安装或配置 unrar.exe,所有操作均可通过 Python 脚本完成。

autounrar is a Python library designed to simplify handling RAR archives. It automatically downloads unrar.exe and uses it to extract RAR archives or list their contents. No need to manually install or configure unrar.exe; all operations can be done via Python scripts.


安装 / Installation

通过 pip 安装 autounrar:
Install autounrar via pip:

pip install autounrar

使用示例 / Usage Example

from autounrar import unrar

# 列出RAR压缩包中的文件 / List files in the RAR archive  
file_list = unrar.list('example.rar')  
print("Files in the archive:", file_list)  

# 解压RAR压缩包到指定目录 / Extract RAR archive to a specific directory  
unrar.extract('example.rar', 'output_directory')  

# 解压RAR压缩包到当前目录 / Extract RAR archive to the current directory  
unrar.extract('example.rar')  

功能 / Features

  • 自动下载 unrar.exe:无需手动安装,直接通过库完成下载。
    • Automatically download unrar.exe: No need for manual installation; directly handled by the library.
  • 列出压缩包内容:快速查看 RAR 压缩包中的文件列表。
    • List archive contents: Quickly view the file list in a RAR archive.
  • 解压文件:将 RAR 压缩包解压到指定目录。
    • Extract files: Extract RAR archives to a specified directory.

依赖 / Dependencies

  • Python 3.6 或更高版本。
    • Python 3.6 or higher
  • subprocess 库
    • subprocess library
  • requests 库
    • requests library
  • appdirs 库
    • appdirs library
  • os 库
    • os library
  • 需要网络连接以下载 unrar.exe。
    • Internet connection required to download unrar.exe

许可证 / License

本项目基于 MIT 许可证发布,请查看 LICENSE 文件获取更多信息。
This project is released under the MIT License. See the LICENSE file for more details.


贡献 / Contribution

欢迎提交 Pull Request 或 Issue 来改进本库!
We welcome Pull Requests or Issues to improve this library!


支持 / Support

如有问题或建议,请在 Issues 中反馈。
If you have any issues or suggestions, please report them in the Issues section.


Note: 本项目仅为学习目的,请勿用于非法用途。
Note: This project is for educational purposes only. Do not use it for illegal purposes.


Metadata

Release files for autounrar 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for autounrar 0.1.0
File Size Uploaded
autounrar-0.1.0.tar.gz 4.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for autounrar 0.1.0
File Interpreter ABI Platform
autounrar-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.6 kB

Release files / autounrar-0.1.0.tar.gz

Download URL autounrar-0.1.0.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a5c9860a8b29e4c1d44bfba3c58f6f0ae7b6e83c6c51fbadbb7dc6a84ef9aca0
BLAKE2b-256 checksum
How to use checksums
34bf848988639fcd1ac70274f43f2dc660de164fa2d7f0f07f8c397b0fb05cf9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.0

Release files / autounrar-0.1.0-py3-none-any.whl

Download URL autounrar-0.1.0-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3e07331efbea9a3fa00eb4cd53717209a5b638c1cc36e25f207f9137a4d4b552
BLAKE2b-256 checksum
How to use checksums
81f6c6f7dbe2710c097774d7b0034705765baf27d56ba5f28a23c45a210ca931
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.0

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page