Skip to content
This repository has been archived by the owner on Dec 23, 2024. It is now read-only.

Commit

Permalink
docs: add debugging info to README.md (#92)
Browse files Browse the repository at this point in the history
This PR adds docs on traffic debugging.
  • Loading branch information
t0mk authored Mar 19, 2024
1 parent 3d24893 commit 9f886ec
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,24 @@ pip install ./equinix_metal

.. and then `import equinix_metal` in a Python script.

### Debugging

If you set `Configuration.debug`, the sdk will print HTTP traffic to stderr:

```python
def get_equinix_metal_client(api_token):
conf = equinix_metal.Configuration(
host="https://api.equinix.com/metal/v1"
)
conf.api_key['x_auth_token'] = api_token
conf.debug = True
return equinix_metal.ApiClient(conf)
```

You can also set `Configuration.logger_file` to see debug messages in a file.

Configuration options might change with openapi-generator version. See [Configuration class](https://github.com/equinix-labs/metal-python/blob/main/equinix_metal/equinix_metal/configuration.py) for more details.

## Release

If you want to do a new release from main branch, make sure that `make generate` doesn't taint git status.
Expand Down

0 comments on commit 9f886ec

Please sign in to comment.