semvec/pypi-packages huggingface dataset:
encrypted-credentials 0.0.4
Encrypt credentials/Django settings to store in repositories
Requires Python: >=3.6

[![PyPI version](https://badge.fury.io/py/encrypted-credentials.svg)](https://badge.fury.io/py/encrypted-credentials)

**encrypted-credentials** encrypts credentials to allow them to be securely added to git repositories.

It can import encrypted settings into Django defined in a python module and or a json file. 
Encrypted files are automatically generated.


### Django settings

_example_


**PRIVATE_settings.py**

File stored in folder with django settings.py file

    private_settings = {
      "AWS_ACCESS_KEY_ID":"ABCDEFGHIJKLMNOP",
      "AWS_SECRET_ACCESS_KEY":"ABCDEFGHIJKLMNOP"
    }

**settings.json** 

File stored in folder with django settings.py file

    {
      "AWS_ACCESS_KEY_ID":"ABCDEFGHIJKLMNOP",
      "AWS_SECRET_ACCESS_KEY":"ABCDEFGHIJKLMNOP"
    }
    

**settings.py**

    from encrypted_credentials.django_credentials import add_encrypted_settings
    
    add_encrypted_settings(globals())


Upon first execution a PRIVATE_KEY.env file will be generated with a random encryption key. DO NOT check this into repository.
if PRIVATE_settings.py does not exist it will generate a template module.

        
**set environment variable**

    export SETTINGS_KEY=FQQcgYWCBPE8l8IbHdcNie0WARbYHeFwCl4hIL3ecF0=

   
1. If the `settings.json` file exists and `settings.json.enc` does not exist then `settings.json.enc` will be created.**(development)**
2. If `settings.json` and `settings.json.enc` exist then they will be compared and if different `settings.json.enc` will be overwritten.**(development)**
3. If `settings.json` does not exist then `settings.json.enc` will be used **(production)**

settings.json.enc and or PRIVATE_settings.enc can be checked into git as it is encrypted with Fernet AES128 encryption 

 
## Credential files

`get_decrypted_file` will automatically encrypt the original file and supply the decrypted data

    from encrypted_credentials.encrypted_file import get_decrypted_file
    
    get_decrypted_file('full_path/orginal.pem')

original.pem.enc can be checked into a repository


## Credential files with Django

By default environment variable SETTINGS_KEY will be used as key

**settings.py**

    CREDENTIAL_FOLDER = os.path.join(BASE_DIR, 'credentials')
    CREDENTIAL_FILES = {
        'gmail': 'service-account-abcd.json',
        'drive': 'service-account-efgh.json',
    }


service-account-abcd.json.enc

usage

    from encrypted_credentials.django_credentials import get_credentials
    
    
    credentials = get_credentials('gmail')
ARPES-GUI 0.0.4
software to visualize and treat the micro-ARPES spatial maps from ANTARES beamline
Requires Python: >=3.7

# ANTARES data browser for micro-ARPES spatial maps

This is an interactive software allowing to visualize and treat the micro-ARPES spatial maps from ANTARES beamline at syncrotron radiation facility SOLEIL (France).
The micro-ARPES data are stored in Nexus files with HDF5.

Main features:
- visualize the ARPES image from the selected point in spatial map,
- visualize integrated ARPES image from the selected area,
- convert ARPES data from real (E vs. angle) to momentum (E vs. k) space
- select the region of interest in real and momentum space and integrate the spatial map inside the selected region,
- save images (cvg, jpg etc.) and data (ARPES or spatial) in 'csv' format. 

![ARPES_GUI](https://user-images.githubusercontent.com/81705695/149383129-2ddd80c9-31a8-4cee-94b3-6241c02d6483.png)
cleangram 0.0.0.dev1
Cleangram - Telegram Bot API wrapper

[![Pypi](https://img.shields.io/pypi/v/cleangram?style=flat-square)](https://pypi.org/project/cleangram/)
[![Telegram Bot API](https://img.shields.io/badge/Bot%20API-5.7-blue?logo=telegram&style=flat-square)](https://core.telegram.org/bots/api)
[![Channel](https://img.shields.io/badge/dynamic/xml?color=blue&label=Channel&query=.%2F%2F*[%40class%3D%27tgme_page_extra%27]&url=https%3A%2F%2Ft.me%2Fcleangram&logo=telegram&link=https://t.me/cleangram&style=flat-square)](https://t.me/+_IGqbnmF5fZmZDky)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square)](https://github.com/psf/black)
# Cleangram

## Getting Started

```commandline
pip install cleangram
```

### Echo bot

```python
from cleangram import App, Bot, Message, env

tg = App()


@tg.message()
async def echo(msg: Message, bot: Bot):
    await bot.send_message(msg.chat.id, msg.text)


tg.polling.run(env.TELEGRAM_BOT_TOKEN)
```