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 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",
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file m_validate_import_file_test-0.0.10.tar.gz
.
File metadata
- Download URL: m_validate_import_file_test-0.0.10.tar.gz
- Upload date:
- Size: 7.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cfff99074469dba54cd59fa889fd913f43f2e291567f4c528a48a56ffb6471e |
|
MD5 | e19e39f50ddec2e72eaf73662f215c6e |
|
BLAKE2b-256 | 38f46d7656c6e3c424ca6c6a3a226f43aa3722f0fb5f41dd0fbba669b929d8fa |