{"id":25900397,"url":"https://github.com/euiyounghwang/filedownload","last_synced_at":"2026-04-11T09:02:11.444Z","repository":{"id":279838894,"uuid":"940123778","full_name":"euiyounghwang/FileDownload","owner":"euiyounghwang","description":"FileDownload","archived":false,"fork":false,"pushed_at":"2025-02-27T22:53:19.000Z","size":37,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T01:53:44.534Z","etag":null,"topics":["docker","docker-build","fastapi","file-download","gunicorn","poetry","pytest","shell-script","uvicorn"],"latest_commit_sha":null,"homepage":"","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/euiyounghwang.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,"publiccode":null,"codemeta":null}},"created_at":"2025-02-27T16:48:10.000Z","updated_at":"2025-02-27T22:54:26.000Z","dependencies_parsed_at":"2025-02-28T01:54:01.582Z","dependency_job_id":"1f111490-7b79-4016-8a95-f6d6105a8bc5","html_url":"https://github.com/euiyounghwang/FileDownload","commit_stats":null,"previous_names":["euiyounghwang/filedownload"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euiyounghwang%2FFileDownload","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euiyounghwang%2FFileDownload/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euiyounghwang%2FFileDownload/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/euiyounghwang%2FFileDownload/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/euiyounghwang","download_url":"https://codeload.github.com/euiyounghwang/FileDownload/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241596277,"owners_count":19988044,"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":["docker","docker-build","fastapi","file-download","gunicorn","poetry","pytest","shell-script","uvicorn"],"created_at":"2025-03-03T02:16:41.654Z","updated_at":"2025-12-31T01:04:10.443Z","avatar_url":"https://github.com/euiyounghwang.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# FileDownload\n\u003ci\u003e FileDownload\n\nFastAPI is a modern, fast (high-performance), web framework for building APIs with Python 3.8+ based on standard Python.\nThis is a repository that provides to upload file via user interface(`http://localhost:7091/ui`) and download them using the endpoint(`http://localhost:7091/filelist`,`http://localhost:7091/download/\u003cfile\u003e`).\n\n\n### Install Poerty\n```\nhttps://python-poetry.org/docs/?ref=dylancastillo.co#installing-with-the-official-installer\n```\n\n\n### Using Python Virtual Environment\n```bash\npython -m venv .venv\nsource .venv/bin/activate\n```\n\n\n### Using Poetry: Create the virtual environment in the same directory as the project and install the dependencies:\n- Please install the package `pip install poetry` first before installing poetry add any libraries\n```bash\npoetry config virtualenvs.in-project true\npoetry init\npoetry add fastapi\npoetry add uvicorn\npoetry add gunicorn\npoetry add pytz\npoetry add httpx\npoetry add pytest\npoetry add pytest-cov\npoetry add requests\npoetry add python-dotenv\n```\n\nor you can run this shell script `./create_virtual_env.sh` to make an environment. then go to virtual enviroment using `source .venv/bin/activate`\n\n\n\n### Register Service\n- sudo service filedownload_es_api status/stop/start/restart\n```bash\n#-- sudo vi /etc/systemd/system/filedownload_es_api.service\n[Unit]\nDescription=FileDownload ES Service\n\n[Service]\nUser=devuser\nGroup=devuser\nType=simple\nExecStart=/bin/bash /home/devuser/filedownload_es_api/service-start.sh\nExecStop= /usr/bin/killall filedownload_es_api\n\n[Install]\nWantedBy=default.target\n\n\n# Service command\nsudo systemctl daemon-reload \nsudo systemctl enable filedownload_es_api.service\nsudo systemctl start filedownload_es_api.service \nsudo systemctl status filedownload_es_api.service \nsudo systemctl stop filedownload_es_api.service \n\nsudo service filedownload_es_api status/stop/start\n```\n\n\n### Service\n- Run this command `./start-start.sh` or python -m uvicorn main:app --reload --host=0.0.0.0 --port=7091 --workers 1\n- Service : `http://localhost:7091/docs`\n```bash\nsource .venv/bin/activate\n(.venv) ➜  FileDownload git:(master) ✗ ./service_start.sh\nciated with a value\nWARNING:  StatReload detected changes in 'main.py'. Reloading...\nINFO:     Shutting down\nINFO:     Waiting for application shutdown.\nINFO:     Application shutdown complete.\nINFO:     Finished server process [14128]\nINFO:     Started server process [30808]\nINFO:     Waiting for application startup.\nINFO:     Application startup complete.\nINFO:     127.0.0.1:61531 - \"GET /filelist HTTP/1.1\" 200 OK\n```\n\n\n### Pytest\n- Reference : https://velog.io/@sangyeon217/pytest-execution\n- Go to virtual enviroment using `source .venv/bin/activate`\n- Run this command manually: `poetry run py.test -v --junitxml=test-reports/junit/pytest.xml --cov-report html --cov tests/` or `./pytest.sh`\n- Run pytest with all test_* files : `source .venv/bin/activate` - `python -m pytest ./tests/`\n- Run pytest with a particular function : `source .venv/bin/activate` - `pytest -v ./tests/test_api.py -k test_api` or `pytest -sv ./tests/test_api.py -k test_api`\n```bash\n$ pytest -sv ./tests/test_api.py -k test_api\n============================= test session starts =============================\nplatform win32 -- Python 3.11.7, pytest-8.3.4, pluggy-1.5.0 -- C:\\Users\\euiyoung.hwang\\Git_Workspace\\FileDownload\\.venv\\Scripts\\python.exe\ncachedir: .pytest_cache\nrootdir: C:\\Users\\euiyoung.hwang\\Git_Workspace\\FileDownload\\tests\nconfigfile: pytest.ini\nplugins: anyio-4.8.0, cov-6.0.0\ncollecting ... collected 2 items\n\ntests\\test_api.py::test_skip SKIPPED (no way of currently testing this)\ntests\\test_api.py::test_api [2025-02-27 14:26:56,087] [INFO] [_client] [_send_single_request] HTTP Request: GET http://testserver/ \"HTTP/1.1 200 OK\"\nPASSED                \n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feuiyounghwang%2Ffiledownload","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feuiyounghwang%2Ffiledownload","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feuiyounghwang%2Ffiledownload/lists"}