semvec/pypi-packages huggingface dataset:
azlet 0.9.1
Python package to create/renew certificates using azure DNS and azure KeyVault
License: MIT
Requires Python: >=3.6

# azlet : Azure lets encrypt library

[![PyPI - License](https://img.shields.io/pypi/l/azlet)](https://pypi.org/project/azlet/)
[![PyPI](https://img.shields.io/pypi/v/azlet)](https://pypi.org/project/azlet/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/azlet)



* azlet creates SSL certificates using letsencrypt and stores them in a key vault as certificate.
* The keyvault then can be used by azure APIM, Functions or Webservices to consume the certificates.
* You can create new certificates, or rotate existing certificates.
* to use azlet, you need an azure key vault an an azure DNS.
* azlet uses azure identity to access the key vault as well as the azure dns server. You can use your identity from azure cli, managed identity or enviromnent variables.
* azlet creates an account with letsencrypt, making sure all requests come from the same account. The account is stored in the key vault as secret.
* azlet uses the [sewer](https://github.com/komuw/sewer) library to create certificates.

## Usage

the identity that uses azlet must have secret get/set permissions as well as certificate get/list/update/create/import permissions on the key vault.

create a new certificate:
```bash
python -m azlet create --keyvault-name my-vault --dns-zone dns.zone.com --dns-subscription 11111111-1111-1111-1111-11111111111" --dns-resource-group dns --prefix test
```

create new certificates for all certificates that are valid less that 14 days:
```bash
python -m azlet rotate --keyvault-name my-vault --dns-zone dns.zone.com --dns-subscription 11111111-1111-1111-1111-11111111111" --dns-resource-group dns
```

see `python -m azlet -h` fro a full list of commands.
datasafe 0.1.0
Setup file for datasafe.
License: MIT
Requires Python: >=3.8.0

# DataSafe - Utilities for data encryption / decryption

## Table of contents
  * [Installation](#installation)
    * [Docker](#docker)
  * [Command-line](#command-line)
    * [Encrypt](#encrypt)
    * [Decrypt](#decrypt)
  * [Python](#python)
    * [Pandas](#pandas)
    * [Files](#files)
  * [License](#license)
  * [Contact](#contact)

## Installation
```bash
pip install datasafe
```

### Docker
```bash
git clone --depth 1 https://github.com/StephenRicher/datasafe.git
cd datasafe/
docker build -t datasafe .
docker run datasafe --help
```

## Command-line

#### Encrypt
```bash
datasafe encrypt data.csv > data.encrypted
```

#### Decrypt
```bash
datasafe decrypt data.encrypted > data.decrypted.csv
```

## Python
`datasafe` can be imported as a python module to encrypt and decrypt files.

### Pandas
If a Pandas DataFrame is provided to `datasafe.encrypt` then it will be encrypted in `.parquet` format.
Following decryption, an in-memory buffer is returned which should be passed to `pd.read_parquet` to recover the dataframe and datatypes.

```python
import pandas as pd
from datasafe import encrypt, decrypt

df = pd.DataFrame({
    'A': [1, 2, 3],
    'B': ['dog', 'cat', 'bat']
})

encrypt(df, 'df-encrypted.pq')

df = pd.read_parquet(decrypt('df-encrypted.pq'))
```

### Files
The command line functionality can also be achieved within Python.
In addition the `datasafe.decrypt` function returns an in-memory buffer which can be read directly.

#### Encrypt and write encrypted data to file
```python
import pandas as pd
from datasafe import encrypt, decrypt

with open('data.encrypted', 'wb') as fh:
    fh.write(encrypt('data.csv'))
```

#### Decrypt and write decrypted data to file
```python
with open('data.decrypted.csv', 'w') as fh:
    fh.write(decrypt('data.encrypted').getvalue())
```

#### Decrypt and read in-memory buffer to Pandas
```python
df = pd.read_csv(decrypt('data.encrypted'))
```

## License
Distributed under the MIT License. _See [LICENSE](./LICENSE) for more information._


## Contact
If you have any other questions please contact the author **[Stephen Richer](https://www.linkedin.com/in/stephenricher/)**
at stephen.richer@proton.me