No project description provided
Project description
async7zip
async7zip is an asynchronous interface for interacting with the 7-Zip command line tool. It allows for unpacking archive files in an asynchronous manner and provides properties for accessing the return code, error count, and process return code of the 7-Zip command.
Tested on 22.01 7-Zip english version.
Installation
You can install async7zip via pip:
pip install async7zip
Usage
import asyncio
from async7zip import async7zip, ReturnCodes7zip
async def main():
# Initialize the async7zip object
sevenzip = async7zip(archive_path='path/to/archive.7z', unpack_path='path/to/unpack')
# Unpack the archive
return_code = await sevenzip.unpack()
# Check the return code
if return_code == ReturnCodes7zip.SUCCESS:
print("Archive unpacked successfully!")
else:
print(f"Error code: {return_code}")
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
loop.run_until_complete(main())
Note
Make sure to have 7zz
in your path, otherwise you need to specify path of 7zz
in sevenzip_path
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
async7zip-1.0.1.tar.gz
(3.7 kB
view details)
Built Distribution
File details
Details for the file async7zip-1.0.1.tar.gz
.
File metadata
- Download URL: async7zip-1.0.1.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d0304eeccb18d68009c41adbf64bb0860db74fe2732224b34359f48c6fabde9c |
|
MD5 | 6029d6a4a1ef37fe49bd14e903dc9e7e |
|
BLAKE2b-256 | 0003d81c6249f8a6d3efd3009c455bed8375479d74d32c580222871a12526773 |
File details
Details for the file async7zip-1.0.1-py3-none-any.whl
.
File metadata
- Download URL: async7zip-1.0.1-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e9ff271de9d9db5f8b2431ef26a6ab1daa3413efc5b73041b892ce691c3cf74 |
|
MD5 | 3546801fcba2566074c47c85c36eece0 |
|
BLAKE2b-256 | 9efd5b327059e817687d5ef20f6f0a1e1cbaea15836fa716d507ea08460decb2 |