tf-persistent-data
Project description
"# tf-persistent-data"
설명
- 데이터를 암호화하여 저장 / 복구
- 데이터 형태에 상관없이 저장가능하고 해당 타입으로 복구한다.
- 암호화 키를 반드시 지정하여 사용 (persist = TfPersistentData(b'p@ssw0rd'))
사용법1
from tfpersistentdata.tfpersistentdata import TfPersistentData
if __name__ == '__main__':
persist = TfPersistentData(b'p@ssw0rd')
data = {'a': 123, 'b': 'text1234'}
filename = 'data1.tpd'
persist.write(data, filename)
rdata = persist.read(filename)
print('filename:', filename, '| data:', rdata, '| type:', type(rdata))
사용법2
from tfpersistentdata.tfpersistentdata import TfPersistentData
if __name__ == '__main__':
persist = TfPersistentData(b'p@ssw0rd')
data = 3.14
filename = 'data1.tpd'
persist.write(data, filename)
rdata = persist.read(filename)
print('filename:', filename, '| data:', rdata, '| type:', type(rdata))
사용법3
from tfpersistentdata.tfpersistentdata import TfPersistentData
class A:
a = 1
b = 'text2'
if __name__ == '__main__':
persist = TfPersistentData(b'p@ssw0rd')
data = A()
filename = 'data1.tpd'
persist.write(data, filename)
rdata = persist.read(filename)
print('filename:', filename, '| data:', rdata, '| type:', type(rdata))
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tf_persistent_data-1.0.1-py3-none-any.whl.
File metadata
- Download URL: tf_persistent_data-1.0.1-py3-none-any.whl
- Upload date:
- Size: 2.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f14f75c34c3b4c842860eb83990d78503b19e3becf2005dcd3b9dc59962f822
|
|
| MD5 |
c62e60c4bde4771d688633738f22fa11
|
|
| BLAKE2b-256 |
40bc4610d71084e1a4b1dc2402aad2a9d0f278536348fb91925931b4bb13c9fe
|