cryptpickle-0.9
توضیحات
Encrypted python object serialization
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | cryptpickle-0.9 |
| نام | cryptpickle |
| نسخه کتابخانه | 0.9 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | - |
| ایمیل نویسنده | Privtools <privacy-dad@protonmail.com> |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/cryptpickle/ |
| مجوز | - |
# CryptPickle
## Encrypted python object serialization
[](https://www.python.org/downloads/)
[](https://github.com/privtools/CryptPickle/blob/main/LICENSE.txt)
[](https://pepy.tech/project/cryptpickle)

CryptPickle allows you to easily encrypt python objects into a file and decrypt, regardless of their content. It may be any python object, including for example a Pandas DataFrame.
## Install
```
pip install cryptpickle
```
## Examples
Usage example 1 (Encrypt and Decrypt a dict with some sensible data):
```
import cryptpickle
# Create a dictionary with some data
# It could be any other python object. ie: a Pandas Dataframe
ej1 = { 'name1': 'John Doe',
'name2': 'Lisa Doe'}
# Print the data
print(ej1)
# Serialice the data in an encrypted file with a password (file.crypt)
cryptpickle.obj_to_encrypted(ej1,password="SecretPassword",path='./file.crypt')
# Load the serialiced data in other python object. Password is needed to unencrypt the data
ej2 =cryptpickle.obj_from_encrypted(password="SecretPassword",path='./file.crypt')
# Print the data
print(ej2)
```
Usage example 2 (Encrypt and Decrypt a Pandas DataFrame with some sensible data):
```
import cryptpickle
import pandas as pd
# Create a dictionary with some data
df1 = pd.DataFrame({'A': [1, 2, 3],
'B': ['one', 'one', 'four']})
# Print the data
print(df1)
# Serialice the data in an encrypted file (path) with a password (password)
cryptpickle.obj_to_encrypted(df11,password="SecretPassword",path='./pd_data.crypt')
# Load the serialiced data in other Pandas DataFrame.
df2 =cryptpickle.obj_from_encrypted(password="SecretPassword",path='./pd_data.crypt')
# Print the data
print(df2)
```
## Install and try it (Linux)
1. Clone this repository and enter in the directory:
```
git clone https://github.com/privtools/CryptPickle.git
cd CryptPickle
```
2. Create a vitual environment:
```
python3 -m venv .venv
```
3. Activate the virtual environment:
```
source .venv/bin/activate
```
4. Install the package:
```
pip install -r requirements.txt
```
5. Run sample1:
```
python sample1.py
```
5. Run sample2:
```
python sample2.py
```
نیازمندی
| مقدار | نام |
|---|---|
| - | pyzipper |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.7 | Python |
نحوه نصب
نصب پکیج whl cryptpickle-0.9:
pip install cryptpickle-0.9.whl
نصب پکیج tar.gz cryptpickle-0.9:
pip install cryptpickle-0.9.tar.gz