Skip to content

Commit

Permalink
Dynamically generate template and resolve existing issues (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
axonasif authored Aug 30, 2023
1 parent 5c6d720 commit 5fcb562
Show file tree
Hide file tree
Showing 26 changed files with 51 additions and 956 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
venv/
.venv/
*.pyc
__pycache__/
instance/
Expand Down
36 changes: 27 additions & 9 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,35 @@
# Image source code: https://github.com/axonasif/workspace-images/tree/tmp
# Also see: https://github.com/gitpod-io/workspace-images/issues/1071
image: axonasif/workspace-python@sha256:f5ba627a31505ea6cf100abe8e552d7ff9e0abd6ba46745b6d6dab349c001430

tasks:
- name: Init project and run server
init: |
PROJECT_NAME="flaskr"
if test ! -e "${PROJECT_NAME}"; then {
tmp_dir=/tmp/.fgc
git clone --filter=tree:0 https://github.com/pallets/flask "${tmp_dir}"
mv "${tmp_dir}/examples/tutorial"/{.*,*} . 2>/dev/null
rm -rf "${tmp_dir}"
} fi
pip install -e .
if test -e "${PROJECT_NAME}"; then {
flask --app "${PROJECT_NAME}" init-db
} fi
command: |
PROJECT_NAME="flaskr"
flask --app "${PROJECT_NAME}" run --debug
ports:
- port: 5000
onOpen: open-preview
description: Flask App preview

tasks:
- init: |
export FLASK_APP=flaskr
export FLASK_ENV=development
pip install -e .
flask init-db
- command: |
flask run
vscode:
extensions:
- ms-python.python

21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2021 Gitpod

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
28 changes: 0 additions & 28 deletions LICENSE.rst

This file was deleted.

6 changes: 0 additions & 6 deletions MANIFEST.in

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# A Python Flask template on Gitpod

This is a [Python Flask](https://flask.palletsprojects.com/en/2.0.x) template configured for ephemeral cloud development environments on [Gitpod](https://www.gitpod.io/).
This is a [Python Flask](https://flask.palletsprojects.com/) template generator configured for ephemeral cloud development environments on [Gitpod](https://www.gitpod.io/).

## Next Steps

Expand All @@ -16,4 +16,4 @@ Click the above "Open in Gitpod" button to start a new workspace. Once you're re

### An existing project

To get started with Python Flask on Gitpod, add a [`.gitpod.yml`](./.gitpod.yml) file which contains the configuration to improve the developer experience on Gitpod. To learn more, please see the [Getting Started](https://www.gitpod.io/docs/getting-started) documentation.
Copy and commit the [`.gitpod.yml`](./.gitpod.yml) to your existing project to have the same configuration of this template. To learn more, please see the [Getting Started](https://www.gitpod.io/docs/getting-started) documentation.
50 changes: 0 additions & 50 deletions flaskr/__init__.py

This file was deleted.

116 changes: 0 additions & 116 deletions flaskr/auth.py

This file was deleted.

Loading

0 comments on commit 5fcb562

Please sign in to comment.