You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/tutorial/tutorial-3.md
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -122,7 +122,14 @@ You've probably just seen pages of content go past in your terminal... so what j
122
122
123
123
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.
124
124
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:
Copy file name to clipboardExpand all lines: docs/en/tutorial/tutorial-7.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -654,7 +654,7 @@ The `-r` option for updating requirements is also honored by the `build` and `ru
654
654
655
655
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.
656
656
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).
658
658
659
659
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.
Copy file name to clipboardExpand all lines: docs/en/tutorial/tutorial-8.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff 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
12
12
13
13
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.
14
14
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.
16
16
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:
This will change the `say_hello()` callback so that when it is invoked, it will:
51
51
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;
53
53
- 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.
56
56
57
57
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:
0 commit comments