Skip to content

Commit 009af57

Browse files
Fix typos and improve clarity in tutorial (#68)
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
1 parent 98ea713 commit 009af57

3 files changed

Lines changed: 14 additions & 7 deletions

File tree

docs/en/tutorial/tutorial-3.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,14 @@ You've probably just seen pages of content go past in your terminal... so what j
122122

123123
5. It **installed your resources needed by your application.** Lastly, it adds any additional resources that are needed by the installer itself. This includes things like icons that need to be attached to the final application and splash screen images.
124124

125-
Once this completes, if you look in the project directory, you should now see a directory corresponding to your platform (`macOS`, `linux`, or `windows`) that contains additional files. This is the platform-specific packaging configuration for your application.
125+
Once this completes, if you look in the project's `build` directory, you should now see a directory corresponding to your platform (`macOS`, `linux`, or `windows`) that contains additional files. This is the platform-specific packaging configuration for your application. For example, on macOS, your project directory will now include:
126+
127+
```text
128+
helloworld/
129+
└── build/
130+
└── helloworld/
131+
└── macos/
132+
```
126133

127134
## Building your application
128135

docs/en/tutorial/tutorial-7.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ The `-r` option for updating requirements is also honored by the `build` and `ru
654654

655655
Faker is just one example of a third-party Python package - a collection of code that isn't part what Python provides out of the box. These third-party packages are most commonly distributed using the [Python Package Index (PyPI)](https://pypi.org), and installed into your local virtual environment. We've been using `pip` in this tutorial, but there are other options.
656656

657-
On desktop platforms (macOS, Windows, Linux), essentially any package on PyPI package can be installed into your virtual environment, or added to your app's requirements. However, when building an app for mobile or web platforms, [your options are slightly limited](https://briefcase.beeware.org/en/latest/about/faq#can-i-use-third-party-python-packages-in-my-app).
657+
On desktop platforms (macOS, Windows, Linux), essentially any package on PyPI can be installed into your virtual environment, or added to your app's requirements. However, when building an app for mobile or web platforms, [your options are slightly limited](https://briefcase.beeware.org/en/latest/about/faq#can-i-use-third-party-python-packages-in-my-app).
658658

659659
In short; any *pure Python* package (i.e. any package created from a project written *only* in Python) can be used without difficulty. Some packages, though, are created from projects that contain both Python and other languages (e.g. C, C++, Rust, etc). Code written in those languages needs to be compiled to platform-specific binary modules before it can be used, and those pre-compiled binary modules are only available on specific platforms. Mobile and web platforms have very different requirements than "standard" desktop platforms. At this time, most Python packages don't provide pre-compiled binaries for mobile and web platforms.
660660

docs/en/tutorial/tutorial-8.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ This is a toy app, so we don't have a *real* API to work with, so we'll use a sa
1212

1313
The Python standard library contains all the tools you'd need to access an API. However, the built-in APIs are very low level. They are good implementations of the HTTP protocol - but they require the user to manage lots of low-level details, like URL redirection, sessions, authentication, and payload encoding. As a "normal browser user" you're probably used to taking these details for granted, as a browser manages them for you.
1414

15-
As a result, people have developed third-party libraries that wrap the built-in APIs and provide a simpler API that is a closer match for the everyday browser experience. We're going to use one of those libraries to access the {JSON} Placeholder API - a library called [`httpx`](https://www.python-httpx.org). Briefcase uses `httpx` internally, so it's already in your local environment - you don't need to install it separately to use it here.
15+
As a result, people have developed third-party libraries that wrap the built-in APIs and provide a simpler API that is a closer match for the everyday browser experience. We're going to use one of those libraries - a library called [`httpx`](https://www.python-httpx.org) - to access a simple API.
1616

17-
Let's add a `httpx` API call to our app. Modify the `requires` setting in our `pyproject.toml` to include the new requirement:
17+
Let's add an `httpx` API call to our app. First, as with `faker` in the [previous step](tutorial-7.md), we need to tell briefcase to install `httpx` when it builds our app. Modify the `requires` setting in our `pyproject.toml` to include the new requirement:
1818

1919
```python
2020
requires = [
@@ -49,10 +49,10 @@ async def say_hello(self, widget):
4949

5050
This will change the `say_hello()` callback so that when it is invoked, it will:
5151

52-
- make a GET request on the JSON placeholder API to obtain post 42;
52+
- make a GET request on the tutorial API to retrieve a message;
5353
- decode the response as JSON;
54-
- extract the body of the post; and
55-
- include the body of that post as the text of the "message" dialog, in place of the text generated by Faker.
54+
- extract the body of the message; and
55+
- include the body of that message as the text of the dialog, in place of the text generated by Faker.
5656

5757
Lets run our updated app in Briefcase developer mode to check that our change has worked. As we've added a new requirement, we need to tell developer mode to reinstall requirements, by using the `-r` argument:
5858

0 commit comments

Comments
 (0)