semvec/pypi-packages huggingface dataset:
AgileP 1.0.0
Python parametric check tools
License: MIT

# AgileP

### 简介
AgileP 是一个灵活的参数校验工具，支持绝大多数参数校验。



### 安装

```
pip install 
```





### 示例

```python
from AgileP.central import Agp
from AgileP.model.extension import SizedString, UnsignedInteger, UnsignedFloat, Email, Bool


class Params(Agp):
    """
    定义数据校验类
    """
    name = SizedString(size=8)
    age = UnsignedInteger(min=100)
    salary = UnsignedFloat(max=10000)
    admin = Bool()
    email = Email()

params = Params("zhang", 100, 9800.1, True, "1234567@qq.com")
print(params.values)

```



### 规划

+ [x] 去除字段类型中的名称 
+ [x] 支持更多类型 
+ [ ] 支持更多参数传入方式 
+ [ ] 更新优化错误提示
hadoop-yarn-rest-api 1.1.0
Python wrapper for Hadoop YARN REST API
License: MIT
Keywords: hadoop,yarn,rest,api,resourcemanager

This is Python Library for Hadoop YARN REST api.

This project follows the [Hadoop YARN REST Api](https://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-site/ResourceManagerRest.html) document.

We have implemented the following APIs.

	- Cluster Information API
	- Cluster Metrics API
	- Cluster Scheduler API
	- Cluster Applications API
	- Cluster Application Statistics API
	- Cluster Application API
	- Cluster Application Attempts API
	- Cluster Nodes API
	- Cluster Node API

Usage
=====

Install it::

    pip install hadoop-yarn-rest-api

Usage::

    from hadoop.yarn import Yarn
    import xml.etree.ElementTree as ET
    import json
    import xml.dom.minidom

    def main():
        yarn = Yarn("http://localhost:8088", 'json')

        response_obj = yarn.cluster_information()
        response_obj = yarn.cluster_metrics()
        response_obj = yarn.cluster_scheduler()
        response_obj = yarn.cluster_applications()
        response_obj = yarn.cluster_applications({"limit":100})
        response_obj = yarn.cluster_appstatistics()
        response_obj = yarn.cluster_appstatistics({"states":"accepted,running,finished","applicationTypes":"mapreduce"})
        response_obj = yarn.cluster_application("job_id")
        response_obj = yarn.cluster_application_attempts("job_id")
        response_obj = yarn.cluster_nodes()
        response_obj = yarn.cluster_nodes({"states":"RUNNING"})  # NEW, RUNNING, UNHEALTHY, DECOMMISSIONING, DECOMMISSIONED, LOST, REBOOTED, SHUTDOWN
        response_obj = yarn.cluster_node("node_id")

        if yarn.response_type == 'json':
            print(json.dumps(response_obj, indent=4, sort_keys=True))
        elif yarn.response_type == 'xml':
            print(xml.dom.minidom.parseString(ET.tostring(response_obj)).toprettyxml())
        else:
            print(response_obj)

    if __name__ == '__main__':
        main()
apidoc2runner 0.0.1
Convert apidoc data to JSON testcases for HttpRunner.
License: MIT
Keywords: apidoc converter json

# apidoc2runner


Convert apidoc data to JSON testcases for HttpRunner.

## apidoc规范
[apidoc2runner规范](http://apidoc.b9bb.cn/)

## usage

To see ``apidoc2runner`` version:

```shell
$ python main.py -V
```

To see available options, run

```shell
$ python main.py -h
usage: main.py [-h] [-V] [--log-level LOG_LEVEL]
               [apidoc_testset_file] [-- output_dir] [-- output_file_type]

Convert apidoc testcases to JSON testcases for HttpRunner.

positional arguments:
  apidoc_testset_file  Specify apidoc testset file.
  -- output_dir   Optional. Specify converted JSON testset folder.
  -- output_file_type  Optional. Generate file format , default json.

optional arguments:
  -h, --help            show this help message and exit
  -V, --version         show version
  --log-level LOG_LEVEL Specify logging level, default is INFO.
```

## examples

In most cases, you can run ``apidoc2runner`` like this:

```shell
$ python3 main.py tests/data/test.json --output_dir tests/apidoc2runner --output_file_type yaml
INFO:root:Generate JSON testset successfully: output.json
```

As you see, the first parameter is apidoc source file path, and the second is converted JSON file path.

The output testset file type is detemined by the suffix of your specified file.

If you only specify apidoc source file path, the output testset is in JSON format by default and located in the same folder with source file.

```shell
$ python3 main.py tests/data/test.json
INFO:root:Generate JSON testset successfully: test/test.output.json
```

## generated testset

generated JSON testset ``output.json`` shows like this:

```json
[
    {
        "test": {
            "name": "/api/v1/Account/Login",
            "request": {
                "method": "POST",
                "url": "https://httprunner.top/api/v1/Account/Login",
                "headers": {
                    "Content-Type": "application/json"
                },
                "json": {
                    "UserName": "test001",
                    "Pwd": "123",
                    "VerCode": ""
                }
            },
            "validate": []
        }
    }
]
```

## 参考来源
【[HttpRunner](https://github.com/HttpRunner/apidoc2case)】