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-0.0.2.tar.gz (7.2 kB view details)

Uploaded Source

File details

Details for the file m_validate_import_file-0.0.2.tar.gz.

File metadata

File hashes

Hashes for m_validate_import_file-0.0.2.tar.gz
Algorithm Hash digest
SHA256 0ecbf47f216a544a6eb7ddc1218d7929fae4f272b6e3e5dd5672fe8bce2f76df
MD5 dbf9d8c6abd41a6ffcbd621da008b9b2
BLAKE2b-256 e540efe630724cf41e895813747829a2a4942b41a2e9051b02c49cf5d18276b1

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