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: README.md
+30-12Lines changed: 30 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -27,14 +27,18 @@ Details on the Tokens and Authentication can be found in our [Auth Guide](https:
27
27
*[Installation](#installation)
28
28
*[Getting started tutorial](#getting-started-tutorial)
29
29
*[Basic Usage of the Web Client](#basic-usage-of-the-web-client)
30
-
*[Sending a message to Slack](#sending-a-message-to-slack)
31
-
*[Uploading files to Slack](#uploading-files-to-slack)
30
+
*[Sending a message to Slack](#sending-a-message-to-slack)
31
+
*[Uploading files to Slack](#uploading-files-to-slack)
32
32
*[Basic Usage of the RTM Client](#basic-usage-of-the-rtm-client)
33
-
*[Async Usage](#async-usage)
34
-
*[Slackclient as a script](#slackclient-as-a-script)
35
-
*[Slackclient in a framework](#slackclient-in-a-framework)
33
+
*[Async usage](#async-usage)
34
+
*[Slackclient as a script](#slackclient-as-a-script)
35
+
*[Slackclient in a framework](#slackclient-in-a-framework)
36
36
*[Advanced Options](#advanced-options)
37
-
*[Migrating from v1.x](#migrating-from-v1)
37
+
*[SSL](#ssl)
38
+
*[Proxy](#proxy)
39
+
*[DNS performance](#dns-performance)
40
+
*[Example](#example)
41
+
*[Migrating from v1](#migrating-from-v1)
38
42
*[Support](#support)
39
43
40
44
### Requirements
@@ -174,9 +178,9 @@ rtm_client.start()
174
178
175
179
### Async usage
176
180
177
-
slackclient v2 and higher uses aiohttp and asyncio to enable async functionality.
181
+
slackclient v2 and higher uses [AIOHttp][aiohttp] under the hood for asynchronous requests and [urllib][urllib] for synchronous requests.
178
182
179
-
Normal usage of the library does not run it in async, hence a kwarg of run_async=True is needed.
183
+
Normal usage of the library does not run it in async, hence a kwarg of `run_async=True` is needed.
180
184
181
185
When in async mode its important to remember to await or run/run_until_complete the call.
182
186
@@ -260,14 +264,28 @@ if __name__ == '__main__':
260
264
261
265
### Advanced Options
262
266
263
-
The Python slackclient v2 now uses [AIOHttp][aiohttp] under the hood.
267
+
#### SSL
264
268
265
-
Looking for a performance boost? Installing the optional dependencies (aiodns) may help speed up DNS resolving by the client. We've included it as an extra called "optional":
269
+
You can provide a custom SSL context or disable verification by passing the `ssl` option, supported by both the RTM and the Web client.
270
+
271
+
For async requests, see the [AIOHttp SSL documentation](https://docs.aiohttp.org/en/stable/client_advanced.html#ssl-control-for-tcp-sockets).
272
+
273
+
For sync requests, see the [urllib SSL documentation](https://docs.python.org/3/library/urllib.request.html#urllib.request.urlopen).
274
+
275
+
#### Proxy
276
+
277
+
A proxy is supported when making async requests, pass the `proxy` option, supported by both the RTM and the Web client.
278
+
279
+
For more information, see [AIOHttp Proxy documentation](https://docs.aiohttp.org/en/stable/client_advanced.html#proxy-support).
280
+
281
+
#### DNS performance
282
+
283
+
Using the async client and looking for a performance boost? Installing the optional dependencies (aiodns) may help speed up DNS resolving by the client. We've included it as an extra called "optional":
266
284
```bash
267
285
$ pip3 install slackclient[optional]
268
286
```
269
287
270
-
Interested in SSL or Proxy support? Simply use their built-in [SSL](https://docs.aiohttp.org/en/stable/client_advanced.html#ssl-control-for-tcp-sockets) and [Proxy](https://docs.aiohttp.org/en/stable/client_advanced.html#proxy-support) arguments. You can pass these options directly into both the RTM and the Web client.
We will always follow the standard process in AIOHttp for those proxy and SSL settings so for more information, check out their documentation page linked [here][aiohttp].
294
311
295
312
### Migrating from v1
296
313
@@ -338,3 +355,4 @@ Visit the [Slack Community][slack-community] for getting help using Slack Develo
0 commit comments