setpwef

set password excel file in python


License
MIT
Install
pip install setpwef==0.1.6

Documentation

setpwef

PyPI GitHub license

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)