{"id":24849312,"url":"https://github.com/bugbiteme/os-sample-python-flask","last_synced_at":"2025-08-22T07:20:19.698Z","repository":{"id":71384932,"uuid":"131044089","full_name":"bugbiteme/os-sample-python-flask","owner":"bugbiteme","description":null,"archived":false,"fork":false,"pushed_at":"2019-12-04T22:22:02.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-31T12:36:13.763Z","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/bugbiteme.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":"2018-04-25T17:54:01.000Z","updated_at":"2019-12-04T22:22:04.000Z","dependencies_parsed_at":"2023-07-07T05:00:36.856Z","dependency_job_id":null,"html_url":"https://github.com/bugbiteme/os-sample-python-flask","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugbiteme%2Fos-sample-python-flask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugbiteme%2Fos-sample-python-flask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugbiteme%2Fos-sample-python-flask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bugbiteme%2Fos-sample-python-flask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bugbiteme","download_url":"https://codeload.github.com/bugbiteme/os-sample-python-flask/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245642673,"owners_count":20648900,"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":"2025-01-31T12:30:34.001Z","updated_at":"2025-03-26T11:25:38.866Z","avatar_url":"https://github.com/bugbiteme.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flask Sample Application\n\n*Giving credit where credit is due, this project has been forked from [https://github.com/OpenShiftDemos/os-sample-python](https://github.com/OpenShiftDemos/os-sample-python). \nYou can find other fantastic OpenShift demo projects at [https://github.com/OpenShiftDemos](https://github.com/OpenShiftDemos).*\n\nThis repository provides a sample Python web application implemented using the Flask web framework and hosted using \n``gunicorn``. It is intended to be used to demonstrate deployment of Python web applications to OpenShift 3.\n\n## Implementation Notes\n\nThis sample Python application relies on the support provided by the default S2I builder for deploying a WSGI \napplication using the ``gunicorn`` WSGI server. The requirements which need to be satisfied for this to work are:\n\n* The WSGI application code file needs to be named ``wsgi.py``.\n* The WSGI application entry point within the code file needs to be named ``application``.\n* The ``gunicorn`` package must be listed in the ``requirements.txt`` file for ``pip``.\n\nIn addition, the ``.s2i/environment`` file has been created to allow environment variables to be set to override the \nbehaviour of the default S2I builder for Python.\n\n* The environment variable ``APP_CONFIG`` has been set to declare the name of the config file for ``gunicorn``.\n\n## Deployment Steps\n\nTo deploy this sample Python web application from the OpenShift web console, you should select ``python:2.7``, \n``python:3.3``, ``python:3.4`` or ``python:latest``, when using _Add to project_. Use of ``python:latest`` is the same \nas having selected the most up to date Python version available, which at this time is ``python:3.4``.\n\nThe HTTPS URL of this code repository which should be supplied to the _Git Repository URL_ field when using _Add to \nproject_ is:\n\n* https://github.com/bugbiteme/os-sample-python-flask.git\n\nIf using the ``oc`` command line tool instead of the OpenShift web console, to deploy this sample Python web \napplication, you can run:\n\n```\noc new-app https://github.com/bugbiteme/os-sample-python-flask.git\n```\n\nIn this case, because no language type was specified, OpenShift will determine the language by inspecting the code \nrepository. Because the code repository contains a ``requirements.txt``, it will subsequently be interpreted as \nincluding a Python application. When such automatic detection is used, ``python:latest`` will be used.\n\nIf needing to select a specific Python version when using ``oc new-app``, you should instead use the form:\n\n```\noc new-app python:2.7~https://github.com/bugbiteme/os-sample-python-flask.git\n```\nTo create a route to access the application, run the command:\n\n```\noc expose service os-sample-python-flask\n```\n\nand get the route/url to access the app, type the command:\n\n```\n oc get route\n```\n\noutput:\n\n```\nNAME                    HOST/PORT                                               PATH       SERVICES                 PORT      TERMINATION   WILDCARD\n\nos-sample-python-flask   os-sample-python-flask-python.192.168.99.100.nip.io               os-sample-python-flask   8080-tcp                 None\n```\n\nand point your browser to `http://os-sample-python-flask-python.\u003cip address\u003e.nip.io`\n\nFrom here you can fork and edit as you please!\n\n\nYou can find a great Flask tutorial for beginners [here](https://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-world)\n\n\n\n\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugbiteme%2Fos-sample-python-flask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbugbiteme%2Fos-sample-python-flask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbugbiteme%2Fos-sample-python-flask/lists"}