semvec/pypi-packages huggingface dataset:
is-valid 0.1.0
A small validation library.
License: MIT
Keywords: validation,nested

# Is Valid?
'Is Valid?' is a simple lightweight python library to create validation functions
that check that data is in a certain format.

## Usage
There are a lot of very basic functions like `is_str`:
```python
>>> is_str("foobar")
True
>>> is_str(None)
False
```
But also more complex functions like `is_match` or `is_list_of`:
```python
>>> is_integer_string = is_match(r'^\d+$')
>>> is_integer_string('12345')
True
>>> is_integer_string('12A45')
False
>>> is_list_of_integer_strings = is_list_of(is_integer_string)
>>> is_list_of_integer_strings(['123', '456', '789'])
True
>>> is_list_of_integer_strings(['123', 'ABC', '789'])
False
>>> is_list_of_integer_strings({'123', '456', '789'})
False
```
As you can see in the example above you can nest these functions very easily
creating powerful validation functions that examine complex structures easily.

In some cases just `True` or `False` doesn't cut it, you might want to know why
your data is invalid. For this purpose all validation functions take a
`detailed` keyword argument.
```python
>>> is_str("foobar", detailed=True)
(True, None)
>>> is_str(None, detailed=True)
(False, 'data is not an instance of str')
>>> is_integer_string('12A45', detailed=True)
(False, 'data does not match /^\d+$/')
>>> is_list_of_integer_strings(['123', 'ABC', '789'], detailed=True)
(False, {1: 'data does not match /^\d+$/'})
>>> is_list_of_integer_strings({'123', '456', '789'}, detailed=True)
(False, 'data is not an instance of list')
```
You can also use this module for unittests, the module provides a mixin called
`IsValidMixin` that you can mix in with your `TestCase` class to have access to
`self.assertIsValid(validator, data, msg=None)` in your tests. If you don't
provide a message the message of your assert error will automatically be the
error that the validator gives when `detailed=True`.

# Install
'Is Valid?' is on PyPi, you can install it with:
```
pip install isvalid
```
The module is written in pure python without any dependencies and is only a few
hundred LOC.
SDLCSService 0.0.1
A micro service launcher
License: MIT

本框架是一个service启动框架，适合一些分模块的定时任务

安装说明
  fdfs-client-py pip安装是2.X版本 无法正常在3.X运行 所以安装前需要先手工安装https://github.com/jefforeilly/fdfs_client-py.git

数据库默认支持PostgresSQL

使用说明
  启动方法
    import SDLCSService
    SDLCSService.ServiceManager.Main()

  各模块需要放在应用目录的ServiceMoudels目录 
     各模块单独文件夹以模块名命名 
     各模块的入口也是同样文件名.py
     入口文件里面的入口类也是同样的名字并继承于SDLCSService.Core.ServiceBase 

   
配置文件为应用目录Config.json

内容示例
{
    "ServiceModules":{
        "SDLCSUnit":{
            "loopTime":"5"
        }
    },
    "InterfaceModules": {
        "SDLCTester":{
        }
    },
    "options": {
        "fileSize": "2048",
        "filePath": "/data/",
        "port": "80",
        "debug":"True",
        "host":"0.0.0.0",
        "threadCount":"2",
        "IsPrintError":"True",
        "UnLimitedIP":["*"],
        "AsyncTheadCount":"4",
        "AsyncTimeOut":"20",
        "ExitPassword":"123456",
        "Database":{
            "serverip":"10.86.87.79",
            "port":"5432",
            "dbname":"postgres",
            "username":"postgres",
            "password":"postgres",
            "poolcount":"100",
            "isecho":"False"
        },
        "Logger":{
            "Level":"0",
            "IsPrint":"True",
            "SaveDay":"30"
        }
    }
}
emulate-tornado-server 1.0.0
Collection of short functions to simplify tornado-based clients testing
License: MIT
Keywords: tornado testing http server client

Collection of short functions to simplify tornado-based clients testing.
Provides tools to simplify http server emulation for thorough tests of
tornado-based clients in a closest to real world way.

See [tests/test_async_decorator.py](https://github.com/risboo6909/emulate_tornado_server/blob/master/tests/test_async_decorator.py) for examples.