Skip to content

Commit c9eceaa

Browse files
committed
Language improvements in README
Also switch all headers to sentence case to match Trino documentation.
1 parent d1293cf commit c9eceaa

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

README.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ rows = connection.execute(select(nodes)).fetchall()
8989
```
9090

9191
In order to pass additional connection attributes use [connect_args](https://docs.sqlalchemy.org/en/14/core/engines.html#sqlalchemy.create_engine.params.connect_args) method.
92-
Attributes can be also passed in connection string.
92+
Attributes can also be passed in the connection string.
9393

9494
```python
9595
from sqlalchemy import create_engine
@@ -112,12 +112,12 @@ engine = create_engine(
112112
)
113113
```
114114

115-
## Authentications
115+
## Authentication mechanisms
116116

117-
### Basic Authentication
117+
### Basic authentication
118118

119119
The `BasicAuthentication` class can be used to connect to a Trino cluster configured with
120-
the [Password file authentication type, LDAP authentication type or Salesforce authentication type](https://trino.io/docs/current/security/authentication-types.html):
120+
the [Password file, LDAP or Salesforce authentication type](https://trino.io/docs/current/security/authentication-types.html):
121121

122122
- DBAPI
123123

@@ -151,7 +151,7 @@ the [Password file authentication type, LDAP authentication type or Salesforce a
151151
)
152152
```
153153

154-
### JWT Authentication
154+
### JWT authentication
155155

156156
The `JWTAuthentication` class can be used to connect to a Trino cluster configured with
157157
the [`JWT` authentication type](https://trino.io/docs/current/security/jwt.html):
@@ -188,7 +188,7 @@ the [`JWT` authentication type](https://trino.io/docs/current/security/jwt.html)
188188
)
189189
```
190190

191-
### OAuth2 Authentication
191+
### OAuth2 authentication
192192

193193
The `OAuth2Authentication` class can be used to connect to a Trino cluster configured with
194194
the [OAuth2 authentication type](https://trino.io/docs/current/security/oauth2.html).
@@ -226,7 +226,7 @@ The OAuth2 token will be cached either per `trino.auth.OAuth2Authentication` ins
226226
)
227227
```
228228

229-
### Certificate Authentication
229+
### Certificate authentication
230230

231231
`CertificateAuthentication` class can be used to connect to Trino cluster configured with [certificate based authentication](https://trino.io/docs/current/security/certificate.html). `CertificateAuthentication` requires paths to a valid client certificate and private key.
232232

@@ -262,7 +262,7 @@ The OAuth2 token will be cached either per `trino.auth.OAuth2Authentication` ins
262262
)
263263
```
264264

265-
### Kerberos Authentication
265+
### Kerberos authentication
266266

267267
The `KerberosAuthentication` class can be used to connect to a Trino cluster configured with
268268
the [`Kerberos` authentication type](https://trino.io/docs/current/security/kerberos.html):
@@ -296,16 +296,16 @@ the [`Kerberos` authentication type](https://trino.io/docs/current/security/kerb
296296
)
297297
```
298298

299-
### User impersonation
299+
## User impersonation
300300

301-
In the case of user who submit the query is not the same as user who authenticate to Trino server (e.g in Superset),
302-
you can set `username` to different from `principal_id`. Note that `principal_id` is extracted from `auth`,
303-
for example `username` in BasicAuthentication, `sub` in JWT token or `service-name` in KerberosAuthentication and
304-
please make sure that [`principal_id` has permission to impersonate `username`](https://trino.io/docs/current/security/file-system-access-control.html#impersonation-rules).
301+
In the case where user who submits the query is not the same as user who authenticates to Trino server (e.g in Superset),
302+
you can set `username` to be different from `principal_id`. Note that `principal_id` is extracted from `auth`,
303+
for example `username` in BasicAuthentication, `sub` in JWT token or `service-name` in KerberosAuthentication.
304+
You need to make sure that [`principal_id` has permission to impersonate `username`](https://trino.io/docs/current/security/file-system-access-control.html#impersonation-rules).
305305

306-
### Extra Credential
306+
### Extra credentials
307307

308-
Send [`extra credentials`](https://trino.io/docs/current/develop/client-protocol.html#client-request-headers):
308+
[`Extra credentials`](https://trino.io/docs/current/develop/client-protocol.html#client-request-headers) can be sent as:
309309

310310
```python
311311
import trino
@@ -412,7 +412,7 @@ assert cur.description[0][1] == "timestamp with time zone"
412412

413413
# Development
414414

415-
## Getting Started With Development
415+
## Getting started with development
416416

417417
Start by forking the repository and then modify the code in your fork.
418418

@@ -441,13 +441,13 @@ applied to the *virtual env*.
441441

442442
When the code is ready, submit a Pull Request.
443443

444-
### Code Style
444+
### Code style
445445

446446
- For Python code, adhere to PEP 8.
447447
- Prefer code that is readable over one that is "clever".
448448
- When writing a Git commit message, follow these [guidelines](https://chris.beams.io/posts/git-commit/).
449449

450-
### Running Tests
450+
### Running tests
451451

452452
`trino-python-client` uses [pytest](https://pytest.org/) for its tests. To run
453453
only unit tests, type:
@@ -507,9 +507,9 @@ They pull a Docker image and then run a container with a Trino server:
507507
```
508508
- Send release announcement.
509509

510-
## Need Help?
510+
## Need help?
511511

512-
Feel free to create an issue as it make your request visible to other users and contributors.
512+
Feel free to create an issue as it makes your request visible to other users and contributors.
513513

514514
If an interactive discussion would be better or if you just want to hangout and chat about
515515
the Trino Python client, you can join us on the *#python-client* channel on

0 commit comments

Comments
 (0)