Skip to content

Commit ca6347a

Browse files
committed
Python readmes updated
1 parent 90297ae commit ca6347a

File tree

3 files changed

+28
-14
lines changed

3 files changed

+28
-14
lines changed

sdk/python/CONTRIBUTING.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,27 @@ pdm install
5454

5555
## Check the installation
5656

57-
Run "counter" example:
57+
Create `hello.py` file with a minimal Flet program:
58+
59+
```python
60+
import flet
61+
from flet import Page, Text
62+
63+
def main(page: Page):
64+
page.add(Text("Hello, world!"))
65+
66+
flet.app(target=main)
67+
```
68+
69+
and then run it:
5870

5971
```
60-
python3 examples/counter.py
72+
python3 hello.py
6173
```
6274

63-
During the first run Flet Server will be downloaded from GitHub releases to `$HOME/.flet/bin` directory and started from there. The version of Flet Server to download is taken from `FLET_VERSION` variable in `appveyor.yml` in the root of repository.
75+
During the first run Flet Server (`fletd`) and Flet Client (`flet`) executables will be downloaded from [Flet GitHub releases](https://github.com/flet-dev/flet/releases) to a user temp directory and then started from there. The version of release to download from is taken from `flet/version.py` file.
6476

65-
You should see a new browser window opened with "counter" web app running.
77+
You should see a new native OS window opened with "Hello, world!" in it.
6678

6779
## Running tests
6880

sdk/python/README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Flet - quickly build interactive apps for Web, Desktop and Mobile in Python
1+
# Flet - quickly build interactive apps for web, desktop and mobile in Python
22

3-
[Flet](https://flet.dev) is a rich User Interface (UI) framework to quickly build interactive Web, Desktop and Mobile apps in Python without prior knowledge of web technologies like HTTP, HTML, CSS or JavaSscript. You build UI with [controls](https://flet.dev/docs/reference/controls) based on [Flutter](https://flutter.dev/) to ensure your programs look cool and professional.
3+
[Flet](https://flet.dev) is a rich User Interface (UI) framework to quickly build interactive web, desktop and mobile apps in Python without prior knowledge of web technologies like HTTP, HTML, CSS or JavaSscript. You build UI with [controls](https://flet.dev/docs/reference/controls) based on [Flutter](https://flutter.dev/) widgets to ensure your programs look cool and professional.
44

55
## Requirements
66

7-
* Python 3.7 or above on Windows, Linux or macOS
7+
* Python 3.8 or above on Windows, Linux or macOS
88

99
## Installation
1010

@@ -16,17 +16,19 @@ pip install flet
1616

1717
```python
1818
import flet
19-
from flet import Text
19+
from flet import Page, Text
2020

21-
p = flet.page()
22-
p.add(Text("Hello, world!"))
21+
def main(page: Page):
22+
page.add(Text("Hello, world!"))
23+
24+
flet.app(target=main)
2325
```
2426

25-
Run the sample above and a new browser window will pop up:
27+
Run the sample above and the app will be started in a native OS window:
2628

27-
![Sample app in a browser](https://flet.dev/img/docs/quickstart-hello-world.png "Sample app in a browser")
29+
![Sample app in a browser](https://flet.dev//img/docs/getting-started/flet-counter-macos.png "Sample app in a native window")
2830

29-
Continue with [Python tutorial](https://flet.dev/docs/tutorials/python) demonstrating how to build a simple To-Do web app and share it on the internet.
31+
Continue with [Python guide](https://flet.dev/docs/getting-started/python) to learn how to make a real app.
3032

3133
Browse for more [Flet examples](https://github.com/flet-dev/examples/tree/main/python).
3234

sdk/python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies = [
1111
"beartype>=0.9.1",
1212
'typing_extensions; python_version < "3.8"'
1313
]
14-
requires-python = ">=3.7"
14+
requires-python = ">=3.8"
1515
license = { text = "MIT" }
1616
classifiers = [
1717
"Programming Language :: Python :: 3",

0 commit comments

Comments
 (0)