Skip to content

Commit

Permalink
Python readmes updated
Browse files Browse the repository at this point in the history
  • Loading branch information
FeodorFitsner committed Jun 6, 2022
1 parent 90297ae commit ca6347a
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 14 deletions.
20 changes: 16 additions & 4 deletions sdk/python/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,27 @@ pdm install

## Check the installation

Run "counter" example:
Create `hello.py` file with a minimal Flet program:

```python
import flet
from flet import Page, Text

def main(page: Page):
page.add(Text("Hello, world!"))

flet.app(target=main)
```

and then run it:

```
python3 examples/counter.py
python3 hello.py
```

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.
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.

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

## Running tests

Expand Down
20 changes: 11 additions & 9 deletions sdk/python/README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Flet - quickly build interactive apps for Web, Desktop and Mobile in Python
# Flet - quickly build interactive apps for web, desktop and mobile in Python

[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.
[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.

## Requirements

* Python 3.7 or above on Windows, Linux or macOS
* Python 3.8 or above on Windows, Linux or macOS

## Installation

Expand All @@ -16,17 +16,19 @@ pip install flet

```python
import flet
from flet import Text
from flet import Page, Text

p = flet.page()
p.add(Text("Hello, world!"))
def main(page: Page):
page.add(Text("Hello, world!"))

flet.app(target=main)
```

Run the sample above and a new browser window will pop up:
Run the sample above and the app will be started in a native OS window:

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

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.
Continue with [Python guide](https://flet.dev/docs/getting-started/python) to learn how to make a real app.

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

Expand Down
2 changes: 1 addition & 1 deletion sdk/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies = [
"beartype>=0.9.1",
'typing_extensions; python_version < "3.8"'
]
requires-python = ">=3.7"
requires-python = ">=3.8"
license = { text = "MIT" }
classifiers = [
"Programming Language :: Python :: 3",
Expand Down

0 comments on commit ca6347a

Please sign in to comment.