m-validate-import-file


Namem-validate-import-file JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://github.com/mobiovn
SummaryMobio Validate Import File Libs
upload_time2024-07-26 02:14:22
maintainerNone
docs_urlNone
authorMOBIO
requires_python>=3
licenseMIT
keywords mobio validate-import-file contact spam
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ##  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",
    "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/e5/40/efe630724cf41e895813747829a2a4942b41a2e9051b02c49cf5d18276b1/m_validate_import_file-0.0.2.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.2",
    "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": "e540efe630724cf41e895813747829a2a4942b41a2e9051b02c49cf5d18276b1",
                "md5": "dbf9d8c6abd41a6ffcbd621da008b9b2",
                "sha256": "0ecbf47f216a544a6eb7ddc1218d7929fae4f272b6e3e5dd5672fe8bce2f76df"
            },
            "downloads": -1,
            "filename": "m_validate_import_file-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "dbf9d8c6abd41a6ffcbd621da008b9b2",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3",
            "size": 7195,
            "upload_time": "2024-07-26T02:14:22",
            "upload_time_iso_8601": "2024-07-26T02:14:22.602834Z",
            "url": "https://files.pythonhosted.org/packages/e5/40/efe630724cf41e895813747829a2a4942b41a2e9051b02c49cf5d18276b1/m_validate_import_file-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-26 02:14:22",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "m-validate-import-file"
}
        
Elapsed time: 0.31143s