معرفی شرکت ها


configchecker-0.95


Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر
Card image cap
تبلیغات ما

مشتریان به طور فزاینده ای آنلاین هستند. تبلیغات می تواند به آنها کمک کند تا کسب و کار شما را پیدا کنند.

مشاهده بیشتر

توضیحات

INI-config validator
ویژگی مقدار
سیستم عامل -
نام فایل configchecker-0.95
نام configchecker
نسخه کتابخانه 0.95
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Samun Victor
ایمیل نویسنده victor.samun@gmail.com
آدرس صفحه اصلی https://github.com/victorsamun/configvalidator
آدرس اینترنتی https://pypi.org/project/configchecker/
مجوز MIT
configchecker ------------- |buildci| |coveralls| |pyversions| |DwnMonth| |DwnWeek| |DwnDay| |license| This module helps to check ``configparser``-loaded configurations. Usage ===== 1. Initialize description of valid configuration: ``schema = configchecker.ConfigSchema()`` 2. Add an information of possible sections by calling ``schema.section`` with section name validator and boolean flag „section required“. 3. In every section describe possible section's values by calling ``sect.value``. Name/value validators ===================== There are basic validators: * ``ItemDefaultValidator`` — always returns true * ``ItemStringValidator`` — checks if a string equals to given (probably, case-insensitive) * ``ItemRegexValidator`` — checks matching a string to given regexp * ``ItemNumberValidator`` — checks that a string is a non-negative integer And validator-composers which allow to create more complex checks: * ``ItemNotValidator``, ``ItemAndValidator``, ``ItemOrValidator`` — first-order logic on validators * ``ItemCountValidator`` — takes a validator and a function that check number of validator's true positives (i.e. returns ``True``) Examples ======== .. code-block:: py import configparser import configchecker as v config = configparser.ConfigParser() config.read_file("config") schema = v.ConfigSchema() # Section with name „REQUIRED“ will be mandatory with schema.section("REQUIRED") as s: # It must have keys matching regexp r'item_\d+' and numeric value and nothing more s.value(v.ItemRegexValidator(r'item_\d+', value_val=v.ItemNumberValidator()).no_other() # Section with name r'OPT_\w+' (check by regexp) will be optional with schema.section(v.ItemRegexValidator(r'OPT_\w+'), required=False) as s: # And it may have anything pass # Other sections will be restricted schema.no_other() # Run checks v.ConfigSchemaValidator(schema).validate(config) Also, you can find lots of examples in tests (``test_configchecker.py``) Author ====== Samun Victor, victor.samun@gmail.com .. |buildci| image:: https://travis-ci.org/victorsamun/configvalidator.svg?branch=master :target: https://travis-ci.org/victorsamun/configvalidator .. |coveralls| image:: https://coveralls.io/repos/github/victorsamun/configvalidator/badge.svg?branch=master :target: https://coveralls.io/github/victorsamun/configvalidator?branch=master .. |license| image:: https://img.shields.io/pypi/l/configchecker.svg :target: https://github.com/victorsamun/configvalidator/blob/master/LICENSE .. |DwnMonth| image:: https://img.shields.io/pypi/dm/configchecker.svg .. |DwnWeek| image:: https://img.shields.io/pypi/dw/configchecker.svg .. |DwnDay| image:: https://img.shields.io/pypi/dd/configchecker.svg .. |pyversions| image:: https://img.shields.io/pypi/pyversions/configchecker.svg


نحوه نصب


نصب پکیج whl configchecker-0.95:

    pip install configchecker-0.95.whl


نصب پکیج tar.gz configchecker-0.95:

    pip install configchecker-0.95.tar.gz