Socket
Socket
Sign inDemoInstall

expyvalidations

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expyvalidations

Sheets data validation


Maintainers
1

EXPYVALIDATIONS

Pypi License Python Downloads Downloads

Description

ExpyValitations python library is used to validate data in excel files. It is possible to validate the type of data, if it is required, if it is unique, perform custom validations and more!

Installation

pip install expyvalidations

Usage

# Import the ExpyValidations class
from expyvalidations import ExpyValidations

# Create a new instance of ExpyValidations
ev = ExpyValidations(path_file='path/to/file.xlsx'

# add columns to validate
ev.add_column(key="descricao", name="nome", required=True)
ev.add_column(key="value", name="valor", type="float")

# perform all validations in the file
ev.check_all()

# check if there are errors
if ev.has_errors():
    # get the errors
    print(ev.get_errors())
    """
    [
        {
            "type": "Error",
            "column": "descricao",
            "row": 2,
            "message": "Campo obrigatório"
        },
        {
            "type": "Error",
            "column": "value",
            "row": 3,
            "message": "Value is not a valid number"
        }
    ]
    """
else:
    # get the result
    ev.get_result()
    """
    [
        {
            "descricao": "Produto 1",
            "value": 10.0
        },
        {
            "descricao": "Produto 2",
            "value": 20.0
        }
    ]
    """


License

Licence MIT

Documentation

Click here to see the documentation.

Author

Ezequiel Abreu (Exebixel)

FAQs


Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc