{"library":"pycsvschema","title":"PyCSVSchema","description":"PyCSVSchema is a Python implementation of the CSV Schema specification (version 0.3). It allows you to validate CSV files against a schema defined in YAML or JSON. Currently at version 0.0.6, it is in early development with weekly commits.","language":"python","status":"active","last_verified":"Mon Apr 27","install":{"commands":["pip install pycsvschema"],"cli":{"name":"csvschema","version":"sh: 1: csvschema: not found"}},"imports":["from pycsvschema import CSVSchema","from pycsvschema import ValidationError"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import yaml\nfrom pycsvschema import CSVSchema\n\nschema_yaml = \"\"\"\nfields:\n  - name: id\n    type: integer\n    constraints:\n      required: true\n  - name: name\n    type: string\n\"\"\"\nschema = yaml.safe_load(schema_yaml)\nvalidator = CSVSchema(schema)\n\nwith open('data.csv', 'r') as f:\n    errors = validator.validate(f)\n\nfor error in errors:\n    print(error)\n","lang":"python","description":"Load a schema from YAML, create a CSVSchema instance, and validate a CSV file.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}