Skip to content

Commit 04fa83a

Browse files
committed
reformatted to support CLI execution
1 parent c04efab commit 04fa83a

13 files changed

Lines changed: 40 additions & 54 deletions

File tree

.gitignore

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
# Created by https://www.toptal.com/developers/gitignore/api/python,dotenv,venv
2-
# Edit at https://www.toptal.com/developers/gitignore?templates=python,dotenv,venv
1+
# Created by https://www.toptal.com/developers/gitignore/api/python,direnv
2+
# Edit at https://www.toptal.com/developers/gitignore?templates=python,direnv
33

4-
### dotenv ###
5-
.env
4+
### direnv ###
5+
.direnv
6+
.envrc
67

78
### Python ###
89
# Byte-compiled / optimized / DLL files
@@ -127,6 +128,7 @@ celerybeat.pid
127128
*.sage.py
128129

129130
# Environments
131+
.env
130132
.venv
131133
env/
132134
venv/
@@ -175,16 +177,4 @@ poetry.toml
175177
# LSP config files
176178
pyrightconfig.json
177179

178-
### venv ###
179-
# Virtualenv
180-
# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/
181-
[Bb]in
182-
[Ii]nclude
183-
[Ll]ib
184-
[Ll]ib64
185-
[Ll]ocal
186-
[Ss]cripts
187-
pyvenv.cfg
188-
pip-selfcheck.json
189-
190-
# End of https://www.toptal.com/developers/gitignore/api/python,dotenv,venv
180+
# End of https://www.toptal.com/developers/gitignore/api/python,direnv

.python_version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.10.11

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
# Python Web I/O
22
Generate a webpage as a GUI for a Python script, and serve from anywhere.
33

4+
## Install
5+
```
6+
$ pip install python-web-io
7+
$ export FLASK_SECRET_KEY="someSecureSecretKey"
8+
$ python_web_io .\example.py
9+
```
10+
411
## Getting started
512
1. Fork this repository.
6-
2. Create a `.env` file in `/python_web_io` according to `/python_web_io/.env.example` (use any random if testing key).
13+
From inside `/python_web_io`:
14+
2. Create a `.envrc` file, setting `FLASK_SECRET_KEY` as per `python_web_io/.envrc.example`.
715
3. Install poetry dependencies with `poetry install`.
8-
4. Try running the `example.py` script using `poetry run python .\python_web_io\main.py .\example.py`. (Note: on Windows you may need to intialise poetry as a virtual environment, then try `python .\python_web_io\main.py .\example.py` from a terminal with the virtual environment activated)
16+
4. Try running the `example.py` script using `poetry run python python_web_io example.py`.
917

1018
## Config
1119
|Argument|||

python_web_io/README.md

Whitespace-only changes.
File renamed without changes.

poetry.lock renamed to python_web_io/poetry.lock

Lines changed: 1 addition & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
[tool.poetry]
22
name = "python-web-io"
3-
version = "0.1.0"
4-
description = ""
3+
version = "0.1.8"
4+
description = "Generate a webpage as a GUI for a Python script, and serve from anywhere."
55
authors = ["Zachary Smith"]
66
packages = [{include = "python_web_io"}]
77

8-
[tool.poetry.scripts]
9-
python_web_io = "python_web_io.main:start"
10-
118
[tool.poetry.dependencies]
129
python = "^3.10"
1310
flask = "^2.2.3"
14-
python-dotenv = "^1.0.0"
1511
flask-session = "^0.4.0"
1612

1713
[tool.poetry.group.dev.dependencies]
@@ -21,3 +17,6 @@ pre-commit = "^3.2.2"
2117
[build-system]
2218
requires = ["poetry-core"]
2319
build-backend = "poetry.core.masonry.api"
20+
21+
[tool.poetry.scripts]
22+
python_web_io = "python_web_io.main:start"

python_web_io/python_web_io/__init__.py

Lines changed: 0 additions & 3 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
from python_web_io.main import start
2+
start()

0 commit comments

Comments
 (0)