semvec/pypi-packages huggingface dataset:
xcoscmd 1.8.6.4
simple command for cos, forked from https://github.com/tencentyun/coscmd
License: MIT

XCOSCMD
#######################

.. image:: https://img.shields.io/pypi/v/coscmd.svg
   :target: https://pypi.org/search/?q=coscmd
   :alt: Pypi
.. image:: https://travis-ci.org/tencentyun/coscmd.svg?branch=master
   :target: https://travis-ci.org/tencentyun/coscmd
   :alt: Travis CI 

介绍
_______

腾讯云COS命令行工具, 目前可以支持Python2.6与Python2.7以及Python3.x。

安装指南
__________

::

    python setup.py install
    cd dist
    sudo easy_install coscmd-1.8.6.3-py3.6.egg # 提前安装easy_install
    ln -s {{PYTHON_DIR}}/bin/coscmd xcoscmd # [可选]为避免和官方coscmd冲突，通过软链使用此版本

改造
__________
上传命令，支持上传同名文件不覆盖，直接跳过

命令::

    xcoscmd -rm ./app /app

上传结果输出优化：上传失败的log红色显示，上传成功的log绿色显示，更加直观的显示上传结果

使用方法
__________

使用coscmd，参照 https://cloud.tencent.com/document/product/436/10976
Flask-PASETO 0.0.4
Paseto integration for flask
License: MIT

# FLASK-PASETO
#### FLASK-PASETO add basic supports for [paseto](https://github.com/josharian/paseto) v2 to your flask app.

### Installation 
FLask-Paseto relies on [paseto](https://github.com/josharian/paseto) which in turns relies on pysodium.
pysoduim is a wrapper for the popular [libsoduim](https://github.com/jedisct1/libsodium) cryptography library.
This [guide](https://py-ipv8.readthedocs.io/en/latest/preliminaries/install_libsodium/) shows how to install libsodium on mac and windows.
on linux libsodium could be install using ```sudo apt-get install -y libsodium-dev``` or ```yum install libsodium``` depending on your linux distribution.

To install FLask-Paseto used the command below to get the latest version
```
    pip install flask_paseto
```

#### Example  usage
``` 
    import pysodium

    from flask_paseto import (
        Paseto,
        paseto_required,
        create_access_token,
        create_access_token_public,
        get_paseto_claim,
        get_paseto_claim_public
    )

    app = Flask(__name__)

    app.config['PASETO_SECRET_KEY'] = '0'*32 # must be 32 byte
    pk, sk = pysodium.crypto_sign_keypair()
    app.config['PASETO_PRIVATE_KEY']=sk
    app.config['PASETO_PUBLIC_KEY']=pk


    paseto = Paseto(app)

    @app.route('/protected/local/')
    @paseto_required
    def protected():
        claims = get_paseto_claim()
        return jsonify(claims), 200

    @app.route('/create/local/token/')
    def create_token():
        ret = {'access_token': create_access_token({'test user':'yes'})}
        return jsonify(ret), 200
    
    @app.route('/create/public/token/')
    def create_public_token():
        ret = {'access_token': create_access_token_public({'public test user':'yes'})}
        return jsonify(ret), 200

    @app.route('/protected/public/')
    @paseto_required
    def protected_public():
        claims = get_paseto_claim_public()
        return jsonify(claims), 200

    app.run()
````
The client http request must provide a generated paseto token 
``` 
    GET /protected/public HTTP/1.1
    Authorization: Bearer v2.local.epxJJp-rchdlMondp12dxN9MV7GACjW0swwyOgo5pliQo2fJmC-1WqhrmWDTQBkg08In7zXD6ieM-xpaY2eMWr-mAu64nVi8VvTWi5bc3dhGHGR-Mg8QQ8HJIzPldLfSDLQXwQ
```
#### Configuration Options
| Option                | Description                                                                                     |
|-----------------------| ------------------------------------------------------------------------------------------------|
|PASETO_SECRET_KEY      | This is the secret key used by paseto to sign your data. *It requires 32 byte strings*          |
|PASETO_PUBLIC_KEY      | This is the public key generated as part of the key pair generated for paseto                   |
|PASETO_PRIVATE_KEY     | This is the private key generated as part of the key pair generated for paseto                  |
|PASETO_EXPIRATION_DELTA| The additional time from the current time the token was created before expiration               |
lazy-lxd 1.1.0
Easy creating LXD containers with included routine.
License: MIT
Requires Python: >=3.6

# Lazy LXD

**A tool for easy creating [LXD](https://linuxcontainers.org/lxd/introduction/) containers.**

> Installing OpenSSH right from the script, for accessing into container thru SSH. And running [Ansible](https://www.ansible.com/) playbooks over container.

> Also have Russian language version of [README](README_RU.md)

## Requirements

- Python >= 3.6
- [LXD](https://linuxcontainers.org/lxd/getting-started-cli/#installation)
- [Ansible](https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html) (_Optionally_). If you wish to run playbooks over created container.

## Install

Just use the packet manager [pip](https://pip.pypa.io/en/stable/).

```bash
pip install lazy-lxd
```

### Requirements

**LXD**

LXD need to be.

How to install:

apt:
```bash
$ apt install lxd lxd-client
```

snap:
```bash
$ snap install lxd
```

For centos use following [article](https://discuss.linuxcontainers.org/t/lxd-on-centos-7/1250).
Or use snap way.

> For more information see [official guide](https://linuxcontainers.org/lxd/getting-started-cli).

**Ansible**

If you want to run Ansible playbooks over container, you should have installed Ansible.

Python way:
```bash
$ pip install ansible
```

## Usage

Help:
```bash
$ lazy-lxd --help
```

Simple container with default OS/version (_Ubuntu/18.04_):
```bash
$ lazy-lxd
```

### Examples

Container with given name and OS/version is Centos 6:
```bash
$ lazy-lxd --name centos-container --os centos --release 6
```

Container with OS/version is Ubuntu 20.04 and with your path to Ansible playbooks:
```bash
$ lazy-lxd --os ubuntu --release 20.04 --playbooks-path $HOME/ansible/playbooks
```

Container with given name, default OS/version and exists SSH keys:
```bash
$ lazy-lxd --name ubuntu-focal --ssh-key-private $HOME/.ssh/id_rsa --ssh-key-public $HOME/.ssh/id_rsa.pub
```

## Why script?

Why not to user utilities from CLI?

Needs to remember arguments of lxc, check that the container name is free,
set OpenSSH into container every time, create keys manually, doing requests by container IP.
All that this in one wrapper as script.

Run Ansible playbooks from script as bonus.

## Why LXD?

In my opinion, [LXD](https://linuxcontainers.org/lxd/introduction/) is better as container with OS for experiments, than [Docker](https://docs.docker.com/get-started/).
It stateful, shouldn't think about data if container went down.

Docker is better choice for one service per container.
But for OS experiments LXD is better.

## License

This project uses the following license: [MIT](LICENSE)