semvec/pypi-packages huggingface dataset:
mini-color 0.1.0
mini_color
Keywords: colored-text,library,彩色文本

# 一个易于使用的终端输出彩色文本库

## 环境及安装

对于python版本没有太多的要求，只要不低于python 3.6应该都可以正常使用

使用pip安装：`pip install mini-color`

## 快速上手

在终端打印一串某个颜色的文本，你只需要像这样：

```python
from mini_color.color import red

print(red('我只是一个输出'))
```
color中包含了所有可以使用print函数输出彩色字符的颜色方法

这将在终端输出红色的字符串

color中的内容：

    black(),white(),red(),yellow(),blue(),green(),cyan(),purple(),

    random_color()

其中random_color()是一个能够将输入的字符串转为随机颜色的方法

## 进阶：使用背景色

你只需要导入一个Color类，并在颜色方法中将Color中的属性传入back参数：

```python

from mini_color.color import Color,green

text = green(
    '我只是一个输出',
    back=Color.BLUE
)
print(text)
```
这将在终端输出绿色字体、蓝色背景的字符串

Color的属性内容同上面的color类似，因为在所有的颜色方法中都调用了Color中的颜色属性

Color类：

    BLACK,WHITE,RED,YELLOW,BLUE,GREEN,CYAN,PURPLE,

    random()

random()是一个方法，他能返回随机一个Color的颜色属性，这在color方法中也是可以作为参数传入的
    

## 进阶：使用样式

你只需要导入一个Style类，并在颜色方法中将Style中的属性传入style参数

```python

from mini_color.color import Color,Style,red

text = red(
    '我只是一个输出',
    back=Color.BLUE,
    style=Style.HighLight
)
print(text)
```
这将在终端输出红色字体、蓝色背景、带有高亮效果的字符串

Style中包含的样式：

    Default：默认样式，没有任何显示效果
    
    HighLight：高亮显示

    UnderLine：下划线效果

    Flash：闪烁效果

    AntiWhite：反白的显示效果

    Invisible：不可见

## 联系我

QQ:1435608435
simplegoogleapi 0.1.1
A simple way to work with Google API

# Simple Google API
Python package simple Google API for non-technical users

## How to install
### Install with Pip

Install new package.

```
pip install simplegoogleapi
```

Upgrade to the latest version.

```
pip install simplegoogleapi --upgrade
```

### Install with GitHub

Install new package.

```
pip install git+https://github.com/tranngocminhhieu/simple-googl-eapi.git
```

Upgrade to the latest version.

```
pip install git+https://github.com/tranngocminhhieu/simple-google-api.git --upgrade
```

## How to use SimpleDrive

### Import packages

```python
from simplegoogleapi.drive import SimpleDrive
from simplegoogleapi.auth import BuildAuth
```
### Build auth
Build auth with a service account
```python
gauth = BuildAuth(service_account='service_account.json').build_gauth_from_service_account()
```
Build auth with client secrets and credentials
```python
gauth = BuildAuth(client_secrets_file='client_secrets.json', credentials_file='credentials.json').build_gauth_from_client_secrets()
```
Build auth automation anyway
```python
gauth = BuildAuth().build_gauth_auto_anyway(client_secrets_file='client_secrets.json', credentials_file='credentials.json', credentials_raw='https://rentry.co/example/raw', service_account_json='service_account.json')
```

### Use functions
```python
my_drive = SimpleDrive(gauth=gauth)
```
Upload a file
```python
my_drive.upload_file(local_file='your-file-path', folder_id=None, rename=None)
```
Create a folder
```python
my_drive.create_folder(new_folder_name='New folder', parent_folder_id=None)
```
Check usage limit
```python
my_drive.check_usage()
```
List files
```python
files = my_drive.list_files(title_contains=None, owner_email=None)
```
Delete a file
```python
my_drive.delete_file(file_id='your-file-id')
```
Move a file
```python
my_drive.move_file(file_id='your-file-id', to_folder_id='your-folder-id')
```
Copy a file
```python
my_drive.copy_file(file_id='your-file-id', same_name=True, prefix=None, suffix=None, to_folder_id=None)
```
Rename a file
```python
my_drive.rename_file(file_id='your-file-id', new_name='A new name')
```
Add a permission
```python
my_drive.add_permission(file_id='your-file-id', email='example@mail.com', role='reader')
```
Delete a permission
```python
# With a permission ID
my_drive.delete_permission(file_id='your-file-id', permission_id='a-permission-id', email=None)
# With an email
my_drive.delete_permission(file_id='your-file-id', permission_id=None, email='example@mail.com')
```
### Transfer ownership

#### Transfer ownership with different organization
Method: Copy the old file to a new file > Delete the old file
```python
from simplegoogleapi.drive.help import transfer_owner_by_copy
```
```python
gauth_from = BuildAuth(service_account='service_account.json').build_gauth_from_service_account()
gauth_to = BuildAuth(client_secrets_file='client_secrets.json', credentials_file='credentials.json').build_gauth_from_client_secrets()
```
```python
transfer_owner_by_copy(gauth_from, gauth_to, file_id='your-file-id', same_name=True)
```