Socket
Socket
Sign inDemoInstall

pycsvschema

Package Overview
Dependencies
2
Maintainers
2
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    pycsvschema

PyCSVSchema is an implementation of CSV Schema in Python.


Maintainers
2

Readme

PyCSVSchema

PyPI Page: https://pypi.python.org/pypi/pycsvschema <https://pypi.python.org/pypi/pycsvschema>_

Github Page: https://github.com/crowdskout/PyCSVSchema <https://github.com/crowdskout/PyCSVSchema>_

Introduction

PyCSVSchema is an implementation of CSV Schema <https://github.com/csvschema/csvschema>__ in Python.

This project is under heavy development.

.. code:: python

>>> from pycsvschema.checker import Validator
>>>
>>> # demo.csv:
... # id,name,value
... # 1,Ann,"5"
... # 2,Ben,"10"
... # 3,Tom,"14"
...
>>>
>>> schema = {
...     'fields': [
...         {
...             'name': 'value',
...             'type': 'number',
...             'multipleOf': 5
...         }
...     ]
... }
>>>
>>> v = Validator(filename='demo.csv', schema=schema)
>>> v.validate()

Traceback (most recent call last):
...
<ValidationError: 'Value 14.0 is not multiple of 5'; column: value; row: 3>

Installation

.. code:: bash

pip install pycsvschema

License

PyCSVSchema uses the MIT license, see LICENSE file for the details.

Keywords

FAQs


Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc