Revert "Removed leading $ from cli code blocks" (#3192)
Co-authored-by: Kar Petrosyan <92274156+karpetrosyan@users.noreply.github.com>
This commit is contained in:
parent
d4961b9f8e
commit
f06171fd5a
@ -22,7 +22,7 @@ and async APIs**.
|
|||||||
Install HTTPX using pip:
|
Install HTTPX using pip:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
pip install httpx
|
$ pip install httpx
|
||||||
```
|
```
|
||||||
|
|
||||||
Now, let's get started:
|
Now, let's get started:
|
||||||
@ -43,7 +43,7 @@ Now, let's get started:
|
|||||||
Or, using the command-line client.
|
Or, using the command-line client.
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
pip install 'httpx[cli]' # The command line client is an optional dependency.
|
$ pip install 'httpx[cli]' # The command line client is an optional dependency.
|
||||||
```
|
```
|
||||||
|
|
||||||
Which now allows us to use HTTPX directly from the command-line...
|
Which now allows us to use HTTPX directly from the command-line...
|
||||||
@ -94,13 +94,13 @@ Plus all the standard features of `requests`...
|
|||||||
Install with pip:
|
Install with pip:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
pip install httpx
|
$ pip install httpx
|
||||||
```
|
```
|
||||||
|
|
||||||
Or, to include the optional HTTP/2 support, use:
|
Or, to include the optional HTTP/2 support, use:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
pip install httpx[http2]
|
$ pip install httpx[http2]
|
||||||
```
|
```
|
||||||
|
|
||||||
HTTPX requires Python 3.8+.
|
HTTPX requires Python 3.8+.
|
||||||
|
|||||||
@ -73,7 +73,7 @@ This is an optional feature that requires an additional third-party library be i
|
|||||||
You can install SOCKS support using `pip`:
|
You can install SOCKS support using `pip`:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
pip install httpx[socks]
|
$ pip install httpx[socks]
|
||||||
```
|
```
|
||||||
|
|
||||||
You can now configure a client to make requests via a proxy using the SOCKS protocol:
|
You can now configure a client to make requests via a proxy using the SOCKS protocol:
|
||||||
|
|||||||
@ -46,14 +46,14 @@ Then clone your fork with the following command replacing `YOUR-USERNAME` with
|
|||||||
your GitHub username:
|
your GitHub username:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
git clone https://github.com/YOUR-USERNAME/httpx
|
$ git clone https://github.com/YOUR-USERNAME/httpx
|
||||||
```
|
```
|
||||||
|
|
||||||
You can now install the project and its dependencies using:
|
You can now install the project and its dependencies using:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
cd httpx
|
$ cd httpx
|
||||||
scripts/install
|
$ scripts/install
|
||||||
```
|
```
|
||||||
|
|
||||||
## Testing and Linting
|
## Testing and Linting
|
||||||
@ -64,7 +64,7 @@ and documentation building workflow.
|
|||||||
To run the tests, use:
|
To run the tests, use:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
scripts/test
|
$ scripts/test
|
||||||
```
|
```
|
||||||
|
|
||||||
!!! warning
|
!!! warning
|
||||||
@ -76,19 +76,19 @@ Any additional arguments will be passed to `pytest`. See the [pytest documentati
|
|||||||
For example, to run a single test script:
|
For example, to run a single test script:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
scripts/test tests/test_multipart.py
|
$ scripts/test tests/test_multipart.py
|
||||||
```
|
```
|
||||||
|
|
||||||
To run the code auto-formatting:
|
To run the code auto-formatting:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
scripts/lint
|
$ scripts/lint
|
||||||
```
|
```
|
||||||
|
|
||||||
Lastly, to run code checks separately (they are also run as part of `scripts/test`), run:
|
Lastly, to run code checks separately (they are also run as part of `scripts/test`), run:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
scripts/check
|
$ scripts/check
|
||||||
```
|
```
|
||||||
|
|
||||||
## Documenting
|
## Documenting
|
||||||
@ -98,7 +98,7 @@ Documentation pages are located under the `docs/` folder.
|
|||||||
To run the documentation site locally (useful for previewing changes), use:
|
To run the documentation site locally (useful for previewing changes), use:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
scripts/docs
|
$ scripts/docs
|
||||||
```
|
```
|
||||||
|
|
||||||
## Resolving Build / CI Failures
|
## Resolving Build / CI Failures
|
||||||
@ -122,7 +122,7 @@ This job failing means there is either a code formatting issue or type-annotatio
|
|||||||
You can look at the job output to figure out why it's failed or within a shell run:
|
You can look at the job output to figure out why it's failed or within a shell run:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
scripts/check
|
$ scripts/check
|
||||||
```
|
```
|
||||||
|
|
||||||
It may be worth it to run `$ scripts/lint` to attempt auto-formatting the code
|
It may be worth it to run `$ scripts/lint` to attempt auto-formatting the code
|
||||||
|
|||||||
@ -28,7 +28,7 @@ trying out our HTTP/2 support. You can do so by first making sure to install
|
|||||||
the optional HTTP/2 dependencies...
|
the optional HTTP/2 dependencies...
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
pip install httpx[http2]
|
$ pip install httpx[http2]
|
||||||
```
|
```
|
||||||
|
|
||||||
And then instantiating a client with HTTP/2 support enabled:
|
And then instantiating a client with HTTP/2 support enabled:
|
||||||
|
|||||||
@ -28,7 +28,7 @@ HTTPX is a fully featured HTTP client for Python 3, which provides sync and asyn
|
|||||||
Install HTTPX using pip:
|
Install HTTPX using pip:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
pip install httpx
|
$ pip install httpx
|
||||||
```
|
```
|
||||||
|
|
||||||
Now, let's get started:
|
Now, let's get started:
|
||||||
@ -50,7 +50,7 @@ Or, using the command-line client.
|
|||||||
|
|
||||||
```shell
|
```shell
|
||||||
# The command line client is an optional dependency.
|
# The command line client is an optional dependency.
|
||||||
pip install 'httpx[cli]'
|
$ pip install 'httpx[cli]'
|
||||||
```
|
```
|
||||||
|
|
||||||
Which now allows us to use HTTPX directly from the command-line...
|
Which now allows us to use HTTPX directly from the command-line...
|
||||||
@ -130,19 +130,19 @@ inspiration around the lower-level networking details.
|
|||||||
Install with pip:
|
Install with pip:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
pip install httpx
|
$ pip install httpx
|
||||||
```
|
```
|
||||||
|
|
||||||
Or, to include the optional HTTP/2 support, use:
|
Or, to include the optional HTTP/2 support, use:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
pip install httpx[http2]
|
$ pip install httpx[http2]
|
||||||
```
|
```
|
||||||
|
|
||||||
To include the optional brotli and zstandard decoders support, use:
|
To include the optional brotli and zstandard decoders support, use:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
pip install httpx[brotli,zstd]
|
$ pip install httpx[brotli,zstd]
|
||||||
```
|
```
|
||||||
|
|
||||||
HTTPX requires Python 3.8+
|
HTTPX requires Python 3.8+
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user