{"id":19862779,"url":"https://github.com/pyunits/pyunit-uploadfile","last_synced_at":"2025-02-28T23:14:51.104Z","repository":{"id":232941325,"uuid":"785584825","full_name":"pyunits/pyunit-uploadfile","owner":"pyunits","description":"结构化文件解析数据","archived":false,"fork":false,"pushed_at":"2024-04-12T08:22:21.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-11T15:18:40.593Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pyunits.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-04-12T07:25:15.000Z","updated_at":"2024-04-12T07:25:46.000Z","dependencies_parsed_at":"2024-04-12T15:28:34.688Z","dependency_job_id":"16f6e1c4-0031-4068-900f-cda0835e72f8","html_url":"https://github.com/pyunits/pyunit-uploadfile","commit_stats":null,"previous_names":["pyunits/pyunit-uploadfile"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyunits%2Fpyunit-uploadfile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyunits%2Fpyunit-uploadfile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyunits%2Fpyunit-uploadfile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyunits%2Fpyunit-uploadfile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyunits","download_url":"https://codeload.github.com/pyunits/pyunit-uploadfile/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241272617,"owners_count":19937091,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T15:12:39.633Z","updated_at":"2025-02-28T23:14:51.074Z","avatar_url":"https://github.com/pyunits.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyunit-uploadFile\n\n上传文件解析文件到Redis中\n\n# 启动\n\n    git clone https://github.com/pyunits/pyunit-uploadfile\n    \n    cd pyunit-uploadfile\n\n    docker build -t uploadfile .\n\n    docker run -d --restart=always -e REDIS_IP=xx -e REDIS_PASSWORD=xx -e REDIS_DB=xx -p xx:8000 --name=uploadfile uploadfile\n\n# 在线文档\n\n    http://127.0.0.1:8000/docs\n\n# 上传文件\n\n## 入参\n\n![img.png](img.png)\n\n## 返回参数\n\n```json\n\n[\n  {\n    \"name\": \"scopus.xlsx\",\n    \"md5\": \"e683876242cf51f2a2187ee15fa353e8\",\n    \"type\": \"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet\"\n  }\n]\n```\n\n# 解析文件\n\n## 入参\n\n![img_1.png](img_1.png)\n\n## 出参\n\n```json\n[\n  \"e683876242cf51f2a2187ee15fa353e8:00103200\",\n  \"e683876242cf51f2a2187ee15fa353e8:00103300\",\n  \"e683876242cf51f2a2187ee15fa353e8:00103400\",\n  \"e683876242cf51f2a2187ee15fa353e8:00103500\",\n  \"e683876242cf51f2a2187ee15fa353e8:00103600\",\n  \"e683876242cf51f2a2187ee15fa353e8:00103700\",\n  \"e683876242cf51f2a2187ee15fa353e8:00103800\",\n  \"e683876242cf51f2a2187ee15fa353e8:00103900\",\n  \"e683876242cf51f2a2187ee15fa353e8:00104000\",\n  \"e683876242cf51f2a2187ee15fa353e8:00104100\",\n  \"e683876242cf51f2a2187ee15fa353e8:00104200\",\n  \"e683876242cf51f2a2187ee15fa353e8:00104300\",\n  \"e683876242cf51f2a2187ee15fa353e8:00104400\",\n  \"e683876242cf51f2a2187ee15fa353e8:00104500\",\n  \"e683876242cf51f2a2187ee15fa353e8:00104600\"\n]\n```\n\n    其中 返回的 字符串都是 Redis里的key\n    每一个key代表100行数据\n\n# 根据Key获取数据\n\n```python\nimport redis\nimport json\nimport gzip\n\npool = redis.ConnectionPool(host='xxx', decode_responses=False, password=\"xxx\")\nr = redis.Redis(connection_pool=pool)\n\ndata = r[\"e683876242cf51f2a2187ee15fa353e8:00103200\"]\ndata = gzip.decompress(data)\ndata = json.loads(data)\nprint(data)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyunits%2Fpyunit-uploadfile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyunits%2Fpyunit-uploadfile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyunits%2Fpyunit-uploadfile/lists"}