File tree Expand file tree Collapse file tree 10 files changed +273
-0
lines changed Expand file tree Collapse file tree 10 files changed +273
-0
lines changed Original file line number Diff line number Diff line change 1+ SECRET_KEY = " 123"
Original file line number Diff line number Diff line change 1+ name : Lint
2+
3+ on : [push, pull_request]
4+
5+ jobs :
6+ lint :
7+ runs-on : ubuntu-latest
8+ steps :
9+ - uses : actions/checkout@v2
10+ - name : Set up Python
11+ uses : actions/setup-python@v2
12+ with :
13+ python-version : ' 3.x'
14+ - name : Install dependencies
15+ run : |
16+ pip install ruff
17+ - name : Run ruff
18+ run : |
19+ ruff check .
Original file line number Diff line number Diff line change 1+ .python-version
2+ .venv
3+ .idea
Original file line number Diff line number Diff line change 1+ install :
2+ uv sync
3+
4+ dev :
5+ uv run flask --debug --app page_analyzer:app run
6+
7+ PORT ?= 8000
8+ start :
9+ uv run gunicorn -w 5 -b 0.0.0.0:$(PORT ) page_analyzer:app
10+
11+ build :
12+ ./build.sh
13+
14+ render-start :
15+ gunicorn -w 5 -b 0.0.0.0:$(PORT ) page_analyzer:app
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ curl -LsSf https://astral.sh/uv/install.sh | sh
3+ source $HOME /.local/bin/env
4+ make install
Original file line number Diff line number Diff line change 1+ def main ():
2+ print ("Hello from python-project-83!" )
3+
4+
5+ if __name__ == "__main__" :
6+ main ()
Original file line number Diff line number Diff line change 1+ from .app import app
2+
3+ __all__ = ['app' ]
Original file line number Diff line number Diff line change 1+ import os
2+ from flask import Flask
3+ from dotenv import load_dotenv
4+
5+ load_dotenv ()
6+
7+ app = Flask (__name__ )
8+ app .config ['SECRET_KEY' ] = os .getenv ('SECRET_KEY' )
9+
10+ @app .route ('/' )
11+ def index ():
12+ return "Hello, World!"
13+
14+ __all__ = ['app' ]
15+ if __name__ == '__main__' :
16+ app .run ()
Original file line number Diff line number Diff line change 1+ [project ]
2+ name = " hexlet-code"
3+ version = " 0.1.0"
4+ description = " Add your description here"
5+ readme = " README.md"
6+ requires-python = " >=3.12"
7+ dependencies = [
8+ " flask>=3.1.0" ,
9+ " gunicorn>=23.0.0" ,
10+ " python-dotenv>=1.1.0" ,
11+ " ruff>=0.11.7" ,
12+ ]
You can’t perform that action at this time.
0 commit comments