{"id":15866357,"url":"https://github.com/squidmin/flask-server-template","last_synced_at":"2025-04-01T21:20:00.785Z","repository":{"id":220849228,"uuid":"588830778","full_name":"squidmin/flask-server-template","owner":"squidmin","description":"Flask server template","archived":false,"fork":false,"pushed_at":"2024-02-04T21:16:12.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-07T13:54:02.180Z","etag":null,"topics":["flask","python","template"],"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/squidmin.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":"2023-01-14T06:36:36.000Z","updated_at":"2024-02-04T18:14:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"716bd99b-7c77-4d13-8a36-2aa2325b8877","html_url":"https://github.com/squidmin/flask-server-template","commit_stats":null,"previous_names":["squidmin/flask-server-template"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squidmin%2Fflask-server-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squidmin%2Fflask-server-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squidmin%2Fflask-server-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/squidmin%2Fflask-server-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/squidmin","download_url":"https://codeload.github.com/squidmin/flask-server-template/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246709907,"owners_count":20821298,"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":["flask","python","template"],"created_at":"2024-10-05T23:20:26.889Z","updated_at":"2025-04-01T21:20:00.780Z","avatar_url":"https://github.com/squidmin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flask-server-template\n\n[![Tests](https://github.com/squidmin/flask-server-template/actions/workflows/python-app.yml/badge.svg)](https://github.com/squidmin/flask-server-template/actions/workflows/python-app.yml)\n\nTemplate for Flask server development.\n\nCreated using \u003ca href = \"https://www.python.org/downloads/release/python-3110/\"\u003ePython v3.11\u003c/a\u003e.\n\n### Install Flask\n\n`pip3 install Flask`\n\nRead more about Flask installation \u003ca href=\"https://flask.palletsprojects.com/en/2.2.x/installation/\"\u003ehere\u003c/a\u003e.\n\n### Building and Running the Docker Container\n\n1. **Build the Docker Image**\n\n   Navigate to the directory containing the Flask app and `Dockerfile`, and run:\n\n   ```bash\n   docker build -t flask-sample-app .\n   ```\n\n   This command builds a Docker image named `flask-sample-app` based on the instructions in the `Dockerfile`.\n\n2. **Run the Docker Container**\n\n   After the image has been successfully built, you can run your Flask app inside a Docker container using:\n\n   ```bash\n   docker run -p 5000:5000 flask-sample-app\n   ```\n\n   This command runs the Flask application inside a Docker container, mapping port 5000 of the container to port 5000 on your host, allowing you to access the Flask app by visiting `http://localhost:5000` in your web browser.\n\n### Using Podman\n\nIf you prefer using Podman, the commands are very similar:\n\n1. **Build the Image**\n\n   ```bash\n   podman build -t flask-sample-app .\n   ```\n\n2. **Run the Container**\n\n   ```bash\n   podman run -p 5000:5000 flask-sample-app\n   ```\n\n### Running the application without containers\n\nTo run the app without containers, run this command In the project root directory:\n\n`python3 -m flask run`\n\n### Running the tests\n\n```shell\npython -m unittest test_app.py\n```\n\nYou can find the Flask quickstart page \u003ca href=\"https://flask.palletsprojects.com/en/2.2.x/quickstart/\"\u003ehere\u003c/a\u003e.\n\n---\n\n\u003cdetails\u003e\n  \u003csummary\u003eInstalling virtualenv\u003c/summary\u003e\n  \n  1. `cd` into the project root directory\n\n  2. `python3 -m venv venv_name`\n\n  The above steps create a `venv/` directory in your project where all dependencies are installed. The virtual environment needs to be activated in every terminal instance used for work in the project:\n\n  `source venv/bin/activate`\n\n  You should see a `(venv)` appear at the beginning of your terminal prompt indicating that you are working inside the `virtualenv`.\n  \n  Now when you install something like this:\n\n  `pip install \u003cpackage\u003e`\n\n  it will be installed to the `venv` folder and not conflict with dependencies in other projects.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eLeaving the virtual environment\u003c/summary\u003e\n\n  To leave the virtual environment, run:\n  `deactivate`\n\u003c/details\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003eRun a script\u003c/summary\u003e\n  \n  `python3 (script_name).py`\n\u003c/details\u003e\n\n---\n\nFor more info about `virtualenv` and installation, see:\n\nhttps://sourabhbajaj.com/mac-setup/Python/virtualenv.html\n\n\nFor more info about `virtualenv` installation issues, see:\n\nhttps://stackoverflow.com/questions/31133050/virtualenv-command-not-found\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquidmin%2Fflask-server-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsquidmin%2Fflask-server-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquidmin%2Fflask-server-template/lists"}