Compare commits
No commits in common. "99059a0c71b27aab977ef70e3eb5496f6393e90e" and "a0c9b03015058911c5cddedf66083eed963963dd" have entirely different histories.
99059a0c71
...
a0c9b03015
21
README.md
21
README.md
@ -16,13 +16,15 @@ TLSSession(backend=MyBackend(...)) # or one you write — see "Writing your ow
|
|||||||
|
|
||||||
## Install
|
## Install
|
||||||
|
|
||||||
Depends on `aioweb`. The TLS clients are **optional extras** — install the backend you
|
Depends on `aioweb`. The TLS clients are **optional extras** — install the backend(s)
|
||||||
want; importing the package never fails because an extra is missing.
|
you want; importing the package never fails because an extra is missing.
|
||||||
|
|
||||||
`requirements.txt`:
|
`requirements.txt` (pick the extra you need):
|
||||||
|
|
||||||
```
|
```
|
||||||
aioweb_tls[curl] @ git+ssh://git@git.rethinkstudios.io/rethink-public/aioweb_tls.git@v0.1.0
|
aioweb_tls[curl] @ git+ssh://git@git.rethinkstudios.io/rethink-public/aioweb_tls.git@v0.1.0
|
||||||
|
aioweb_tls[noble] @ git+ssh://git@git.rethinkstudios.io/rethink-public/aioweb_tls.git@v0.1.0
|
||||||
|
aioweb_tls[all] @ git+ssh://git@git.rethinkstudios.io/rethink-public/aioweb_tls.git@v0.1.0
|
||||||
```
|
```
|
||||||
|
|
||||||
Direct:
|
Direct:
|
||||||
@ -30,10 +32,17 @@ Direct:
|
|||||||
```bash
|
```bash
|
||||||
pip install "aioweb_tls[curl] @ git+ssh://git@git.rethinkstudios.io/rethink-public/aioweb_tls.git@v0.1.0"
|
pip install "aioweb_tls[curl] @ git+ssh://git@git.rethinkstudios.io/rethink-public/aioweb_tls.git@v0.1.0"
|
||||||
pip install "aioweb_tls[noble] @ git+ssh://git@git.rethinkstudios.io/rethink-public/aioweb_tls.git@v0.1.0"
|
pip install "aioweb_tls[noble] @ git+ssh://git@git.rethinkstudios.io/rethink-public/aioweb_tls.git@v0.1.0"
|
||||||
|
pip install "aioweb_tls[all] @ git+ssh://git@git.rethinkstudios.io/rethink-public/aioweb_tls.git@v0.1.0"
|
||||||
```
|
```
|
||||||
|
|
||||||
Constructing a backend whose client isn't installed raises a clear `RuntimeError`
|
- `[curl]` → curl_cffi backend · `[noble]` → noble_tls backend · `[all]` → both.
|
||||||
naming the extra — the error fires at construction, never at import.
|
- **No extra** (`pip install aioweb_tls`) is also valid: you get `TLSSession` and the
|
||||||
|
`TLSBackend` protocol — the framework and the bring-your-own-backend path — but no
|
||||||
|
bundled client. `CurlCffi()` / `Noble()` then raise a clear `RuntimeError` naming the
|
||||||
|
extra to install. Use a bare install when you only need a custom backend of your own.
|
||||||
|
|
||||||
|
Constructing a backend whose client isn't installed raises that `RuntimeError` at
|
||||||
|
construction, never at import.
|
||||||
|
|
||||||
## curl_cffi backend
|
## curl_cffi backend
|
||||||
|
|
||||||
|
|||||||
@ -14,6 +14,7 @@ dependencies = [
|
|||||||
[project.optional-dependencies]
|
[project.optional-dependencies]
|
||||||
curl = ["curl_cffi>=0.15"]
|
curl = ["curl_cffi>=0.15"]
|
||||||
noble = ["noble-tls>=0.1.5"]
|
noble = ["noble-tls>=0.1.5"]
|
||||||
|
all = ["curl_cffi>=0.15", "noble-tls>=0.1.5"]
|
||||||
|
|
||||||
[tool.hatch.build.targets.wheel]
|
[tool.hatch.build.targets.wheel]
|
||||||
packages = ["src/aioweb_tls"]
|
packages = ["src/aioweb_tls"]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user