## Thư viện kiểm tra file type.
### Cài đặt:
```bash
$ pip3 install m-validate-import-file
```
### Sử dụng
```python
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",
}
```
Raw data
{
"_id": null,
"home_page": "https://github.com/mobiovn",
"name": "m-validate-import-file-test",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3",
"maintainer_email": null,
"keywords": "mobio, validate-import-file, contact spam",
"author": "MOBIO",
"author_email": "contact@mobio.vn",
"download_url": "https://files.pythonhosted.org/packages/38/f4/6d7656c6e3c424ca6c6a3a226f43aa3722f0fb5f41dd0fbba669b929d8fa/m_validate_import_file_test-0.0.10.tar.gz",
"platform": null,
"description": "## Th\u01b0 vi\u1ec7n ki\u1ec3m tra file type.\n\n### C\u00e0i \u0111\u1eb7t:\n\n```bash\n $ pip3 install m-validate-import-file\n ```\n\n### S\u1eed d\u1ee5ng\n```python\nfrom mobio.libs.validate_import_file.validate import ValidateImportFile\n\nresult_validate = ValidateImportFile(\n number_row_limit=300000,\n capacity_limit=10485760 # 10MB\n).file_upload(\n file=file\n)\n\n##\n1. L\u1ed7i \u0111\u1ecbnh d\u1ea1ng file kh\u00f4ng \u0111\u00fang\nresult_validate = {\n \"status\": False,\n \"reason\": \"fail_validate_file_type\",\n}\n\n2. L\u1ed7i file c\u00f3 s\u1ed1 d\u00f2ng v\u01b0\u1ee3t qu\u00e1 limit\n\nresult_validate = {\n \"status\": False,\n \"reason\": \"fail_validate_file_number_row\",\n}\n\n3. L\u1ed7i file c\u00f3 dung l\u01b0\u1ee3ng v\u01b0\u1ee3t qu\u00e1 config\n\nresult_validate = {\n \"status\": False,\n \"reason\": \"fail_validate_file_capacity\",\n}\n\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Mobio Validate Import File Libs",
"version": "0.0.10",
"project_urls": {
"Homepage": "https://github.com/mobiovn",
"Source": "https://github.com/mobiovn"
},
"split_keywords": [
"mobio",
" validate-import-file",
" contact spam"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "38f46d7656c6e3c424ca6c6a3a226f43aa3722f0fb5f41dd0fbba669b929d8fa",
"md5": "e19e39f50ddec2e72eaf73662f215c6e",
"sha256": "2cfff99074469dba54cd59fa889fd913f43f2e291567f4c528a48a56ffb6471e"
},
"downloads": -1,
"filename": "m_validate_import_file_test-0.0.10.tar.gz",
"has_sig": false,
"md5_digest": "e19e39f50ddec2e72eaf73662f215c6e",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3",
"size": 7214,
"upload_time": "2024-07-25T11:07:44",
"upload_time_iso_8601": "2024-07-25T11:07:44.991997Z",
"url": "https://files.pythonhosted.org/packages/38/f4/6d7656c6e3c424ca6c6a3a226f43aa3722f0fb5f41dd0fbba669b929d8fa/m_validate_import_file_test-0.0.10.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-25 11:07:44",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "m-validate-import-file-test"
}