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-0.0.2.tar.gz
.
File metadata
- Download URL: m_validate_import_file-0.0.2.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 | 0ecbf47f216a544a6eb7ddc1218d7929fae4f272b6e3e5dd5672fe8bce2f76df |
|
MD5 | dbf9d8c6abd41a6ffcbd621da008b9b2 |
|
BLAKE2b-256 | e540efe630724cf41e895813747829a2a4942b41a2e9051b02c49cf5d18276b1 |