معرفی شرکت ها


csv-schema-1.1


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

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

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

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

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

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

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

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

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

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

مشاهده بیشتر

توضیحات

CSV file validation.
ویژگی مقدار
سیستم عامل -
نام فایل csv-schema-1.1
نام csv-schema
نسخه کتابخانه 1.1
نگهدارنده []
ایمیل نگهدارنده []
نویسنده Patrick Stout
ایمیل نویسنده pstout@prevagroup.com
آدرس صفحه اصلی https://github.com/pcstout/csv-schema-py
آدرس اینترنتی https://pypi.org/project/csv-schema/
مجوز Unknown
[![Build Status](https://travis-ci.org/pcstout/csv-schema-py.svg?branch=master)](https://travis-ci.org/pcstout/csv-schema-py) [![Build status](https://ci.appveyor.com/api/projects/status/0s8kitxrkb5neae8/branch/master?svg=true)](https://ci.appveyor.com/project/pcstout/csv-schema-py/branch/master) # CSV Schema Definition and Validation ## Install ```bash pip install csv-schema ``` ## Usage ```text usage: csv-schema [-h] [--version] {validate-config,validate-csv,generate-config} ... CSV Schema optional arguments: -h, --help show this help message and exit --version show program's version number and exit Commands: {validate-config,validate-csv,generate-config} validate-config Validates the CSV schema JSON configuration file. validate-csv Validates a CSV file against a schema. generate-config Generate a CSV schema JSON configuration file. ``` # Definition The CSV file schema definition is defined in a JSON file in the following format. ## File Definition: ```json { "name": null, "description": null, "filename": { "regex": null }, "columns": [] } ``` | Property | Description | | -------- | ----------- | | name | The name of the schema. | | description | The description of the schema. | | filename | Properties for the name of the CSV filename to validate. | | columns | List of column definitions. | ### filename ```json { "regex": null } ``` | Property | Description | | -------- | ----------- | | regex | Regular expression to validate the name of the CSV file being validated. | ## Column Definitions: ### string ```json { "type": "string", "name": null, "required": true, "null_or_empty": false, "regex": null, "min": null, "max": null } ``` | Property | Description | | -------- | ----------- | | type | The column type. | | name | The name of the column. | | required | Whether or not the column is required in the file. | | null_or_empty | Whether or not the value can be null (missing) or an empty string. | | regex | Regular expression to validate the column value. | | min | The minimum length of the string. null for no limit. | | max | The maximum length of the string. null for no limit. | ### integer ```json { "type": "integer", "name": null, "required": true, "null_or_empty": false, "regex": null, "min": null, "max": null } ``` | Property | Description | | -------- | ----------- | | type | The column type. | | name | The name of the column. | | required | Whether or not the column is required in the file. | | null_or_empty | Whether or not the value can be null (missing) or an empty string. | | regex | Regular expression to validate the column value. | | min | The minimum value. null for no limit. | | max | The maximum value. null for no limit. | ### decimal ```json { "type": "decimal", "name": null, "required": true, "null_or_empty": false, "regex": null, "min": null, "max": null, "precision": 2 } ``` | Property | Description | | -------- | ----------- | | type | The column type. | | name | The name of the column. | | required | Whether or not the column is required in the file. | | null_or_empty | Whether or not the value can be null (missing) or an empty string. | | regex | Regular expression to validate the column value. | | min | The minimum value. null for no limit. | | max | The maximum value. null for no limit. | | precision | The decimal point precision. | ### enum ```json { "type": "enum", "name": null, "required": true, "null_or_empty": false, "values": [] } ``` | Property | Description | | -------- | ----------- | | type | The column type. | | name | The name of the column. | | required | Whether or not the column is required in the file. | | null_or_empty | Whether or not the value can be null (missing) or an empty string. | | values | Fixed set of constants. | ## Development ### Setup ```bash pipenv --three pipenv shell make pip_install make build make install_local ``` See [Makefile](Makefile) for all commands. ### Update README Definitions The schema definition is auto generated by running `scripts/generate_md_help.py`. Copy/paste the output into the README.md file. ### Testing - Create and activate a virtual environment: - Run the tests: `make test`


نحوه نصب


نصب پکیج whl csv-schema-1.1:

    pip install csv-schema-1.1.whl


نصب پکیج tar.gz csv-schema-1.1:

    pip install csv-schema-1.1.tar.gz