Skip to content

Commit c04238f

Browse files
author
Priya Gupta
committed
Updated dist 01
1 parent 52d7295 commit c04238f

File tree

7 files changed

+75
-0
lines changed

7 files changed

+75
-0
lines changed

.github/workflows/python-app.yml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build and Publish
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Change this to your main branch name
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v3
15+
16+
- name: Set up Python
17+
uses: priyagupta108/setup-python@test
18+
with:
19+
python-version: "3.10"
20+
21+
- name: Install dependencies
22+
run: |
23+
python -m venv venv
24+
source venv/bin/activate
25+
pip install -r requirements.txt
26+
27+
- name: Build distribution package
28+
run: |
29+
python setup.py sdist bdist_wheel
30+
31+
- name: Publish to PyPI
32+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
33+
with:
34+
user: __token__
35+
password: ${{secrets.PYPI_API_TOKEN}}
36+

.vscode/settings.json

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// {
2+
// "python.testing.pytestArgs": [
3+
// "."
4+
// ],
5+
// "python.testing.unittestEnabled": false,
6+
// "python.testing.pytestEnabled": true
7+
// }

app.py

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
from flask import Flask,render_template,url_for
2+
app = Flask(__name__)
3+
@app.route('/')
4+
def index():
5+
return render_template('index.html')
6+
if __name__ == "__main__":
7+
# app.run(debug==True)
8+
app.run()

requirements.txt

686 Bytes
Binary file not shown.

setup.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
from setuptools import setup, find_packages
2+
3+
setup(
4+
name='My First Setup File',
5+
version='1.0',
6+
packages=find_packages()
7+
)

static/css/index.css

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
h1{
2+
font-style: italic;
3+
font-family: 'Times New Roman', Times, serif;
4+
color: blue;
5+
}

templates/index.html

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>FLASK APPLICATION</title>
7+
<link rel="stylesheet" href="{{url_for('static',filename = 'css/index.css')}}">
8+
</head>
9+
<body>
10+
<h1>Welcome to Python Application</h1>
11+
</body>
12+
</html>

0 commit comments

Comments
 (0)