Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,19 @@ As **Asyncer** is based on **AnyIO** it will be also installed automatically whe

## Installation

First, [install `uv`](https://docs.astral.sh/uv/getting-started/installation/), and then add Asyncer to your project:

<div class="termy">

```console
$ pip install asyncer
$ uv add asyncer
---> 100%
Successfully installed asyncer anyio
```

</div>

If you prefer to use `pip`, install `asyncer` inside a virtual environment. See the [installation guide](tutorial/install.md) for the alternative steps.

## How to Use

You can read more about each of the use cases and utility functions in **Asyncer** in the [tutorial](https://asyncer.tiangolo.com/tutorial/).
Expand Down
7 changes: 5 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,19 @@ As **Asyncer** is based on **AnyIO** it will be also installed automatically whe

## Installation

First, [install `uv`](https://docs.astral.sh/uv/getting-started/installation/), and then add Asyncer to your project:

<div class="termy">

```console
$ pip install asyncer
$ uv add asyncer
---> 100%
Successfully installed asyncer anyio
```

</div>

If you prefer to use `pip`, install `asyncer` inside a virtual environment. See the [installation guide](tutorial/install.md) for the alternative steps.

## How to Use

You can read more about each of the use cases and utility functions in **Asyncer** in the [tutorial](https://asyncer.tiangolo.com/tutorial/).
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial/first-steps.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ If you run that, you will see the expected result, it will **wait for 1 second**
<div class="termy">

```console
$ python main.py
$ uv run python main.py

// Wait for it...

Expand Down
37 changes: 31 additions & 6 deletions docs/tutorial/install.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,42 @@
# Install

Before starting, create a project directory, and then create a **virtual environment** in it to install the packages.
The first step is to set up your project and add **Asyncer**.

You can read the [FastAPI page on Virtual Environments](https://fastapi.tiangolo.com/virtual-environments/).

Then activate the virtual environment, and then install Asyncer, for example:
Install [`uv`](https://docs.astral.sh/uv/getting-started/installation/), then create a project and add Asyncer:

<div class="termy">

```console
$ pip install asyncer
$ uv init awesome-project --bare
$ cd awesome-project
$ uv add asyncer
---> 100%
Successfully installed asyncer anyio
```

</div>

`uv add` creates the project's virtual environment in `.venv`, adds Asyncer to `pyproject.toml`, and creates `uv.lock` so the same package versions can be installed later.

/// details | What these commands do

* `uv init`: create a new Python project.
* `awesome-project`: create the project in a new directory with this name.
* `--bare`: create only the minimal `pyproject.toml` file, without generating a sample `main.py`, `README.md`, or other files. You will create the application files yourself in the next steps of this tutorial.

Then `cd awesome-project` enters the new project directory before adding Asyncer.

`uv` will use a compatible Python version already installed on your system, or download one if needed.

When you run `uv add`, it selects compatible versions of Asyncer and all the packages Asyncer depends on. It records the exact versions in `uv.lock`, making it possible to install the same package versions later on another computer.

Creating or updating this file is called [**locking** the project dependencies](https://docs.astral.sh/uv/concepts/projects/sync/). `uv` does this automatically when you add a package.

///

/// details | Using `pip` instead

If you prefer to manage a virtual environment and packages manually, create and activate a virtual environment and then install Asyncer with `pip install asyncer`.

Read the [Virtual Environments guide](https://tiangolo.com/guides/virtual-environments/) for the detailed steps.

///
2 changes: 1 addition & 1 deletion docs/tutorial/runnify.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ If you run that, you will see the expected result, almost the same as with AnyIO
<div class="termy">

```console
$ python main.py
$ uv run python main.py

// Wait for it...

Expand Down
2 changes: 1 addition & 1 deletion docs/tutorial/soonify.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ So, Python was **waiting 1 second** in **3 places**. But in each of those, it **
<div class="termy">

```console
$ python main.py
$ uv run python main.py

// Enjoy the silence...

Expand Down