semvec/pypi-packages huggingface dataset:
diet 0.1.10
Dash Import Export Tool

# DIET

Dash Import Export Tool

## Installation

```sh
pip install --user -U diet
```

## Usage

```
Dash Import and Export Tool

positional arguments:
  {import,export}     Action to perform
  {users-orgs,users}  The target of the import/export
  file                Files to import

optional arguments:
  -h, --help          show this help message and exit
```

**Import users into the system**
```sh
diet import users ./user-records.csv
```

## Configuration

**This file must be present for the application to operate**

All configuration settings are stored in ~/.diet/config.json


```json
{
    "auth": {
        "client_id": "",
        "client_secret": "",
        "host": "",
        "verify_ssl": true
    },
    "api": {
        "client_id": "",
        "client_secret": "",
        "host": "",
        "verify_ssl": true
    }
}
```

The top level property determines the service to configure, currently there are two services, **api** and **auth**. Api is the main application services and Auth is Sporga's Authenication service.

| Setting | Description |
|---------|-------------|
|client_id| The client id to authenticate with|
|client_secret| The client secret to authenticate with|
|host| The url of the service to import/export|
|verify_ssl| Enable/disable SSL certificate verifcation 

## Import file structure

### Supported file types
* CSV

#### CSV Structure
The CSV file must include a header row that matches the field's name you wish to import **exactly**

### User Import
| firstName | surname       | email                                                          | gender | address           | suburb    | state | mobilePhoneNumber | password  | postcode |
|-----------|---------------|----------------------------------------------------------------|--------|-------------------|-----------|-------|-------------------|-----------|----------|
| Test      | Administrator | csss@sporga.com.au                                             | Female | 20 resolution Dr  | Caringbah | NSW   | 61410100100       | ******* | 2229     |
settingsjson 1.0.2
getter simple setting json

# settingsjson.py

[![PyPI](https://img.shields.io/pypi/v/settingsjson.svg)](https://pypi.org/project/settingsjson/)

simple setting json getter

## how to use

```sh
pip install settingsjson
```

* write settings to `.settings.json`

```JSON
{
	"DB_PATH": "postgresql://user:secret@host:port/dbname"
}
```

* read settings from your apps

```py
from sqlalchemy import create_engine
import settingsjson

settings = settingsjson.get()
db = create_engine(settings["DB_PATH"])
```

```
echo ".settings.json" >> .gitignore
```
mlcrypto 0.6.297
pyCrypto wrapper, used by various MissingLink.ai libraries

### ML-Crypto
This library is `pycrypto` / `pycryptodome` wrapper that standardises the MissingLink.ai-s encryption and allows easy extentions to support additional encryption schemes.

 ## Overview
 * This library contains a set of `Cipher`s.  Each `Cipher` has 
   * `encrpyt` and `decrypt` functions that *MUST* return/accept byte array and 
   * `encrpyt_string` / `decrypt_string` that work with string objects that will be a `base64` representation of the encrypted byte output of the underlying `[en|de]crypt functions`
   * If your cipher returns structured data (such as `IV` and other data), you SHOULD use `namedtuples` and extend them with `MsgPackNamedTuple` mixin. This will allow you to easly dump the named tuple into optimised byterarray, in order to be flexable with the object, currently we are converting the named tuple into `dict` in order to be able to add fields in the feature 
   * You SHOULD provide key generation function as part of the cipher that will generate key (the function may perform external calls in case of cloud kms and etc.) 
 ## Current Ciphers
   * Symmetric - `AES-CTR` encryption with `256` bits (32 bytes) key length
   * Asymmetric - `PKCS1_OAEP` encryption with `SHA512` hashAlgo
   * Envelope - Envelope encryption where the body is encrypted with the `Symmetric` cipher. the `DEK` (data encryption key) is encrypted using non-specific cipher provided during init

  ## PyCryptoDome vs PyCrypto vs None
  * When installing, no cryptography package is provided by default. Use `mlcrypto[pycryptodome]` or `mlcrypto[pycrypto]` to ensure one is installed or use the default if you know you have one installed
  * As `pycrypto` is dead, prefer using `pycryptodome` and expect some issues (The main one is encrypted ssh private keys) not to work
pyrap 0.0.5
Rsync Wrapper to Backup/Restore all Users.

# BACKUP & RESTORE SCRIPTS

Backup or restore all user profiles on a host.

## USAGE

```
usage: pyrap [-h] (-b | -r) [-u] [-x] [-v | -q] url

Backup or restore users to an rsync server.

positional arguments:
  url             A valid rsync url.

optional arguments:
  -h, --help      show this help message and exit
  -b, --backup    Backup users to rsync server or path.
  -r, --restore   Restore users on from last backup.
  -u, --users     Automate user selection.
  -x, --excludes  Automate excludes selection.
  -v, --verbose   Increase output verbosity.
  -q, --quiet     Run silently.
```

## ARGUMENTS

**[URL]**

Takes an rsync url as an argument:

`rsync://user@host:port/path/to/PARENT/of/Users`

Or alternatively, any mountpoint will work:

`/Volumes/Backups`

## PITFALLS & CAVEATS

**THE PATH ON THE REMOTE HOST MUST POINT TO PARENT OF USERS, NOT USERS!**

Once mounted the mountpoint should contain the Users directory underneath it.

The script backups to or restores from the following directory layout underneath
the mountpoint:

`/mountpoint/Users/user.name/date`

And logs to:

`/mountpoint/Logs/CopyType/user.name/date.log`

*Where CopyType equals either Backup or Restore.*

**If this layout does not exist it will be created under the mountpoint.**

User, group and permissions will be retained and each backup will be hard-linked
against the last to save space and mimic the functionality of Time Machine.

<https://blog.interlinked.org/tutorials/rsync_time_machine.html>

It's also worth pointing out that for the time being preserving extended
attributes is not supported.

## EXAMPLES

To backup from /Users to a rsync server, without prompting for each user:

`pyrap -bu rsync://user@host:port/backups`

To restore from /Users to a rsync server, with increased verbosity:

`pyrap -rv rsync://user@host:port/backups`
pdu 0.0.3
Python Disk Usage

# PYTHON DISK USAGE

Takes a path as an argument and returns it's total disk usage recursively.

## INSTALLATION

`pip install pdu`

## CLI USAGE

```
usage: pdu [-h] [path]

Python Disk Usage Calculator.

positional arguments:
  path        A valid path.

optional arguments:
  -h, --help  show this help message and exit
```

## PYTHON USAGE

```python
path = '/path/to/some/file/or/directory'

from pdu import du

human_readable_size = du(path)

from pdu import calc

size_in_bytes = calc(path)

from pdu import convert

human_readable_units = convert(bytes)
```