semvec/pypi-packages huggingface dataset:
pyxiaoheihe 1.0.13
用Python实现的小黑盒客户端

# PYXIAOHEIHE

[![Codacy Badge][codacy_b]][Codacy] [![PyPI][pypi_v_b]][pypi] [![License][license_b]][License]  

一个使用requests库完成的小黑盒客户端, 覆盖了30%左右的客户端功能.

例程: [XHH_AUTO][xhh_auto]

> 使用第三方客户端有封号风险, 后果自负.

## 安装

```bash
>$ pip install pyxiaoheihe
```

## 使用

```python
from pyxiaoheihe import HeyBoxClient

account={'heybox_id': 1234, 'imei': '0000', 'pkey': 'TEST'}
hbxcfg= {'channel': 'heybox_yingyongbao', 'os_type': 1, 'os_version': '10', 'sleep_interval': 1.0, 'auto_report': True}
debug=False

hbc = HeyBoxClient(account,hbxcfg,debug)

# 获取首页新闻
rs = hbc.get_news(5)
print(rs)
# [(44856495, '8月28日20：00，《原神》公测前瞻直播即将开启', '旅行者们大家好~又到了预告时间。……', 21569078),
#  (44837161, 'steam商店限时免费领取《Destin...Fate/命运之幽》', '领取链接：《Destiny or Fa……', 7386593),
#  (44855908, '剧场版《Fate[HF]》最终章票房突破...藤惠生日联动活动公开', '剧场版《Fate[HF]》……', 20495862),
#  (44741441, '关于盒友杂谈的杂谈', '我已经不记得使用小黑盒多久了，从签到天数...兴趣的小标题……', 16243337),
#  (44856136, '[Wallpaper Engine][东...ect]视频壁纸推荐', '个人觉得比较好康的视频壁纸，名字……', 18852508)]
```

> 部分`API`需要真实的账号信息才可用
> 有关`heybox_id`, `imei`, `pkey`的获取方法可以参考[XHH_AUTO][xhh_auto]中的教程
> 或者使用`HeyBoxClient._login()`方法自动获取（会顶掉原客户端的登陆）

[codacy_b]: https://app.codacy.com/project/badge/Grade/ec2842e7b7a94265869679c6620fb109
[codacy]: https://www.codacy.com/manual/chr233/pyxiaoheihe?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=chr233/pyxiaoheihe&amp;utm_campaign=Badge_Grade
[pypi_v_b]: https://img.shields.io/pypi/v/pyxiaoheihe
[pypi]: https://pypi.org/project/pyxiaoheihe/
[license]: https://github.com/chr233/pyxiaoheihe/blob/master/license
[license_b]: https://img.shields.io/github/license/chr233/pyxiaoheihe
[xhh_auto]: ttps://github.com/chr233/xhh_auto
aws-mlops 1.2.2
AWS MLOps Python package
Requires Python: >=3.6

Getting started
===============

AWS MLOps package is implemented to help you like a framework for deploying what it is necessary to manage your models.

The goal is to implement this package to keep your focus on your prep and test code using the AWS SageMaker services, AWS Step Functions and AWS Lambda.

It is part of the `educational repositories <https://github.com/pandle/materials>`_ to learn how to write stardard code and common uses of the TDD and CI / CD.

Prerequisites
#############

You can use `Serverless framework <https://www.serverless.com/framework/docs/providers/aws/guide/installation/>`_ for deploying the AWS services:
if you want to use the guide below, you have to install `npm <https://www.npmjs.com/get-npm>`_ (`Node Package Manager <https://docs.npmjs.com/cli/v6/commands>`_) before.

If you want to use another AWS tool, you can see the repository `aws-tool-comparison <https://github.com/bilardi/aws-tool-comparison>`_ before to implement your version.

Installation
############

The package is not self-consistent. So you have to download the package by github and to install the requirements before to deploy the **example** on AWS:

.. code-block:: bash

    git clone https://github.com/bilardi/aws-mlops
    cd aws-mlops/
    npm install
    export AWS_PROFILE=your-account
    export STAGE=studio
    bash example/deploy.sh

Or if you want to use this package into your code, you can install by python3-pip:

.. code-block:: bash

    pip3 install aws_mlops
    python3
    >>> import aws_mlops
    >>> help(aws_mlops)

Read the documentation on `readthedocs <https://aws-mlops.readthedocs.io/en/latest/>`_ for

* Usage
* Development

Change Log
##########

See `CHANGELOG.md <https://github.com/bilardi/aws-mlops/blob/master/CHANGELOG.md>`_ for details.

License
#######

This package is released under the MIT license.  See `LICENSE <https://github.com/bilardi/aws-mlops/blob/master/LICENSE>`_ for details.
fastapi-router-controller 0.5.0
A FastAPI utility to allow Controller Class usage
Requires Python: >=3.6

# fastapi-router-controller

[![Build](https://github.com/KiraPC/fastapi-router-controller/workflows/fastapi-router-controller/badge.svg)](https://github.com/KiraPC/fastapi-router-controller)
[![PyPI version fury.io](https://badge.fury.io/py/fastapi-router-controller.svg)](https://pypi.python.org/pypi/fastapi-router-controller)

#### A FastAPI utility to allow Controller Class usage

## Installation: 

install the package
```
pip install fastapi-router-controller
```

## How to use

Here we see a Fastapi CBV (class based view) application
with class wide Basic Auth dependencies.

```python
import uvicorn

from pydantic import BaseModel
from fastapi_router_controller import Controller
from fastapi import APIRouter, Depends, FastAPI, HTTPException, status
from fastapi.security import HTTPBasic, HTTPBasicCredentials

router = APIRouter()
controller = Controller(router)
security = HTTPBasic()


def verify_auth(credentials: HTTPBasicCredentials = Depends(security)):
    correct_username = credentials.username == "john"
    correct_password = credentials.password == "silver"
    if not (correct_username and correct_password):
        raise HTTPException(
            status_code=status.HTTP_401_UNAUTHORIZED,
            detail="Incorrect auth",
            headers={"WWW-Authenticate": "Basic"},
        )
    return credentials.username


class Foo(BaseModel):
    bar: str = "wow"


async def amazing_fn():
    return Foo(bar="amazing_variable")


@controller.resource()
class ExampleController:

    # add class wide dependencies e.g. auth
    dependencies = [Depends(verify_auth)]

    # you can define in the Controller init some FastApi Dependency and them are automatically loaded in controller methods
    def __init__(self, x: Foo = Depends(amazing_fn)):
        self.x = x

    @controller.route.get(
        "/some_api", summary="A sample description", response_model=Foo
    )
    def sample_api(self):
        print(self.x.bar)  # -> amazing_variable
        return self.x


# Load the controller to the main FastAPI app

app = FastAPI(
    title="A sample application using fastapi_router_controller", version="0.1.0"
)

app.include_router(ExampleController.router())

uvicorn.run(app, host="0.0.0.0", port=9090)
```

### Screenshot

All you expect from Fastapi

![Swagger UI](./swagger_ui.png?raw=true)

Also the login dialog

![Swagger UI Login](./swagger_ui_basic_auth.png?raw=true)


## For some Example use-cases visit the example folder