setpwef
setpwef๋ set password excel file์ ์ค์๋ง๋ก ์์ ํ์ผ์ ์ํธ๋ฅผ ๊ฑธ ์ ์๋ ํ์ด์ฌ ํจํค์ง์ ๋๋ค. ์ด ํจํค์ง๋ Rust ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ฅผ ํ์ด์ฌ์์ ์ฌ์ฉํ ์ ์๋๋ก ๋ฐ์ธ๋ฉํ ๊ฒ์ด๋ฉฐ, ์ฌ์ฉํ Rust ๋ผ์ด๋ธ๋ฌ๋ฆฌ๋ umya-spreadsheet ์ ๋๋ค. ๋ฐ์ธ๋ฉ์ ๊ฒฝ์ฐ PyO3์ Maturin์ ์ฌ์ฉํ์์ต๋๋ค.
setpwef is an abbreviation for set password excel file, which is a Python package that can set a password for an excel file. This package binds the Rust library for use in Python, and the Rust library used is umya-spreadsheet. For binding, PyO3 and Maturin were used.
How to Use
ํจํค์ง ์ค์นํ๊ธฐ
๋จผ์ ํจํค์ง๋ฅผ ์ค์นํฉ๋๋ค.
you have to install kbodata package first.
pip install setpwef
ํ์ผ ๋น๋ฐ๋ฒํธ ์ค์ ํ๊ธฐ
์์ ํ์ผ์ ๋น๋ฐ๋ฒํธ๋ฅผ ์ค์ ํฉ๋๋ค. Set a password for the excel file.
import os
import setpwef
filename = "test.xlsx"
prefix = os.path.join(os.path.dirname(os.path.abspath("test.xlsx")))
path = prefix + "/" + filename
password = "test123"
setpwef.encrypt_excelfile(path, path, password)