{"id":22958116,"url":"https://github.com/gkevinb/python-anywhere-flask","last_synced_at":"2025-10-25T04:36:50.672Z","repository":{"id":39114086,"uuid":"256593454","full_name":"gkevinb/python-anywhere-flask","owner":"gkevinb","description":"Flask app on pythonanywhere.com","archived":false,"fork":false,"pushed_at":"2023-03-05T05:22:36.000Z","size":2004,"stargazers_count":3,"open_issues_count":35,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-31T05:58:50.822Z","etag":null,"topics":["flask","python"],"latest_commit_sha":null,"homepage":"https://gkevinb.pythonanywhere.com/","language":"JavaScript","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/gkevinb.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":"2020-04-17T19:37:38.000Z","updated_at":"2024-05-30T19:27:28.000Z","dependencies_parsed_at":"2024-12-14T17:36:33.693Z","dependency_job_id":"908f384d-a246-4d04-800d-c9984eb38b64","html_url":"https://github.com/gkevinb/python-anywhere-flask","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gkevinb/python-anywhere-flask","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkevinb%2Fpython-anywhere-flask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkevinb%2Fpython-anywhere-flask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkevinb%2Fpython-anywhere-flask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkevinb%2Fpython-anywhere-flask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gkevinb","download_url":"https://codeload.github.com/gkevinb/python-anywhere-flask/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gkevinb%2Fpython-anywhere-flask/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280906491,"owners_count":26411402,"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","status":"online","status_checked_at":"2025-10-25T02:00:06.499Z","response_time":81,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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"],"created_at":"2024-12-14T17:36:08.072Z","updated_at":"2025-10-25T04:36:50.622Z","avatar_url":"https://github.com/gkevinb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flask app on pythonanywhere.com\n\n\nLink: https://gkevinb.pythonanywhere.com/\n\n\n## Docker\n\nNeed to also rebuild docker to see code changes, then start it up\n```\ndocker-compose build \u0026\u0026 docker-compose up\n```\n\nTo shut it down, CTRL + c but also run following to make sure it stopped\n```\ndocker-compose down\n```\n\nIn the database docker container, the `container_name` corresponds to the `hostname` in the SQL connector in the code. While the `hostname` in the docker container corresponds to the `host` in the server status page in MySQL Workbench.\n\nhttps://stackoverflow.com/questions/57642582/mysql-connector-errors-databaseerror-2003-hy000-cant-connect-to-mysql-serve\n\n## Pythonanywhere\n\nhttps://www.pythonanywhere.com/batteries_included/\n\nDon't use custom virtual envs, if you want to use the packages in [batteries_included](https://www.pythonanywhere.com/batteries_included/).\n\n\n### Virtualenvs\n\nVirutal environment (venv) found in `server/venv/`\n\nActivate and deactivate venv\n\n```bash\nsource server/venv/bin/activate\ndeactivate\n```\n\nInstall packages from `requirements.txt` into venv. Make sure venv is active.\n\n```bash\npip install -r server/src/requirements.txt\n```\n\nhttps://help.pythonanywhere.com/pages/RebuildingVirtualenvs/\n\nhttps://help.pythonanywhere.com/pages/Virtualenvs/\n\n\n## Environmental Variables\n\nAll the environmental variables are now loaded from designated `.env` files which are not tracked by the repo.\n\n### Pythonanywhere\n\nIn order to load for `.env` file on pythonanywhere.com, you must edit `wsgi.py` file as shown in the link below.\n\nhttps://www.pythonanywhere.com/forums/topic/14207/\n\n## Vue JS Integration\n\nhttps://dev.to/michaelbukachi/flask-vue-js-integration-tutorial-2g90\n\nhttps://testdriven.io/blog/developing-a-single-page-app-with-flask-and-vuejs/\n\n## Flask Best Practices\n\nhttps://flask.palletsprojects.com/en/1.1.x/patterns/appfactories/\n\nhttps://flask.palletsprojects.com/en/1.1.x/blueprints/#blueprints\n\nhttps://hackersandslackers.com/configure-flask-applications/\n\n## SQL and Databases\n\n### Command line tool\n\nTo run SQL commands go to the Databases tab and start a console on the database you want to edit. Then you can run any SQL queries you create locally on SQL Workbench, just copy and paste the exact commands and it runs exactly the same.\n\nIn the SQL command line, `mysql\u003e`, you can run some shell commands `ls` and `pwd`. You just have to have the word `system` in front of them as shown below.\n\n```bash\nsystem ls\n```\n\n```bash\nsystem pwd\n```\n\nTo run a SQL script you have to run the `source` command and use the path to the script as the argument.\n\nFor example.\n\n```bash\nsource mysite/sql-scripts/create_quotes.sql\n```\n\nLook into way of running not just individual commands but entire scripts after getting better at SQL.\n\nhttps://peewee.readthedocs.io/en/latest/index.html\n\nhttps://hackersandslackers.com/python-database-management-sqlalchemy/\n\nhttps://leportella.com/sqlalchemy-tutorial.html\n\nhttps://blog.pythonanywhere.com/121/\n\nhttps://flask-sqlalchemy.palletsprojects.com/en/2.x/config/\n\nhttps://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-xv-a-better-application-structure\n\nhttps://riptutorial.com/sqlalchemy/example/6614/converting-a-query-result-to-dict\n\n## Deploying and Git\n\nhttps://stackoverflow.com/questions/48047123/syncing-github-with-pythonanywhere\n\nhttps://medium.com/@aadibajpai/deploying-to-pythonanywhere-via-github-6f967956e664\n\n## Testing\n\nhttps://medium.com/swlh/automate-python-testing-with-github-actions-7926b5d8a865\n\n## CSS\n\nhttps://pythonhow.com/add-css-to-flask-website/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgkevinb%2Fpython-anywhere-flask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgkevinb%2Fpython-anywhere-flask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgkevinb%2Fpython-anywhere-flask/lists"}