New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

m-validate-import-file

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

m-validate-import-file

Mobio Validate Import File Libs

  • 0.0.3
  • Source
  • PyPI
  • Socket score

Maintainers
1

Thư viện kiểm tra file type.

Cài đặt:

 $ pip3 install m-validate-import-file

Sử dụng

from mobio.libs.validate_import_file.validate import ValidateImportFile

result_validate = ValidateImportFile(
    number_row_limit=300000,
    capacity_limit=10485760 # 10MB
).file_upload(
    file=file
)

##
1. Lỗi định dạng file không đúng
result_validate = {
    "status": False,
    "reason": "fail_validate_file_type",
}

2. Lỗi file có số dòng vượt quá limit

result_validate = {
    "status": False,
    "reason": "fail_validate_file_number_row",
}

3. Lỗi file có dung lượng vượt quá config

result_validate = {
    "status": False,
    "reason": "fail_validate_file_capacity",
}

Keywords

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