Skip to content

Commit 83ec706

Browse files
committed
pangea-sdk: document configuration options
1 parent 2d4648f commit 83ec706

File tree

1 file changed

+29
-10
lines changed

1 file changed

+29
-10
lines changed

packages/pangea-sdk/README.md

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@ the same compatibility guarantees as stable releases.
4040
Via pip:
4141

4242
```bash
43-
$ pip3 install pangea-sdk==5.5.0b2
43+
$ pip3 install pangea-sdk==6.2.0b2
4444
```
4545

4646
Via poetry:
4747

4848
```bash
49-
$ poetry add pangea-sdk==5.5.0b2
49+
$ poetry add pangea-sdk==6.2.0b2
5050
```
5151

5252
## Usage
@@ -79,6 +79,26 @@ audit = Audit(token, config)
7979
response = audit.log(message="Hello, World!")
8080
```
8181

82+
## Configuration
83+
84+
The SDK supports the following configuration options via `PangeaConfig`:
85+
86+
- `base_url_template` — Template for constructing the base URL for API requests.
87+
The placeholder `{SERVICE_NAME}` will be replaced with the service name slug.
88+
This is a more powerful version of `domain` that allows for setting more than
89+
just the host of the API server. Defaults to
90+
`https://{SERVICE_NAME}.aws.us.pangea.cloud`.
91+
- `domain` — Base domain for API requests. This is a weaker version of
92+
`base_url_template` that only allows for setting the host of the API server.
93+
Use `base_url_template` for more control over the URL, such as setting
94+
service-specific paths. Defaults to `aws.us.pangea.cloud`.
95+
- `request_retries` — Number of retries on the initial request.
96+
- `request_backoff` — Backoff strategy passed to 'requests'.
97+
- `request_timeout` — Timeout used on initial request attempts.
98+
- `poll_result_timeout` — Timeout used to poll results after 202 (in secs).
99+
- `queued_retry_enabled` — Enable queued request retry support.
100+
- `custom_user_agent` — Custom user agent to be used in the request headers.
101+
82102
## asyncio support
83103

84104
asyncio support is available through the `pangea.asyncio.services` module. The
@@ -133,14 +153,14 @@ options:
133153
```
134154

135155
It accepts multiple file formats:
156+
136157
- a Verification Artifact from the Pangea User Console
137158
- a search response from the REST API:
138159

139160
```bash
140161
$ curl -H "Authorization: Bearer ${PANGEA_TOKEN}" -X POST -H 'Content-Type: application/json' --data '{"verbose": true}' https://audit.aws.us.pangea.cloud/v1/search
141162
```
142163

143-
144164
### Bulk Download Audit Data
145165

146166
Download all audit logs for a given time range. Start and end date should be provided,
@@ -190,14 +210,13 @@ options:
190210
```
191211

192212
It accepts multiple file formats:
213+
193214
- a Verification Artifact from the Pangea User Console
194215
- a file generated by the `dump_audit` command
195216
- a search response from the REST API (see `verify_audit`)
196217

197-
198-
199-
[Documentation]: https://pangea.cloud/docs/sdk/python/
200-
[GA Examples]: https://github.com/pangeacyber/pangea-python/tree/main/examples
201-
[Beta Examples]: https://github.com/pangeacyber/pangea-python/tree/beta/examples
202-
[Pangea Console]: https://console.pangea.cloud/
203-
[Secure Audit Log]: https://pangea.cloud/docs/audit
218+
[Documentation]: https://pangea.cloud/docs/sdk/python/
219+
[GA Examples]: https://github.com/pangeacyber/pangea-python/tree/main/examples
220+
[Beta Examples]: https://github.com/pangeacyber/pangea-python/tree/beta/examples
221+
[Pangea Console]: https://console.pangea.cloud/
222+
[Secure Audit Log]: https://pangea.cloud/docs/audit

0 commit comments

Comments
 (0)