Skip to main content

Mobio Validate Import File Libs

Project description

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  số dòng vượt quá limit

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

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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

m_validate_import_file_test-0.0.10.tar.gz (7.2 kB view details)

Uploaded Source

File details

Details for the file m_validate_import_file_test-0.0.10.tar.gz.

File metadata

File hashes

Hashes for m_validate_import_file_test-0.0.10.tar.gz
Algorithm Hash digest
SHA256 2cfff99074469dba54cd59fa889fd913f43f2e291567f4c528a48a56ffb6471e
MD5 e19e39f50ddec2e72eaf73662f215c6e
BLAKE2b-256 38f46d7656c6e3c424ca6c6a3a226f43aa3722f0fb5f41dd0fbba669b929d8fa

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page