How to access information in custom plugins using python PDK ?
- Dominant language
- Python
- Stars
- 48
- Forks
- 16
- PR merge metrics
- No merged PRs in 30d
Description
I am using Python PDK to write a custom Plugin for the Kong gateway. Everything setup is done and it's working with the py-hello example. But in the access phase, I want to retrieve all the context and information of the service, consumer. How can I do that. Most of the return value is Table type. Take a look to this example.
```
service = kong.router.get_service()
```
I want to get the service id for example. How can i do that. Thank you
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the py-hello example and the access-phase call to kong.router.get_service(); inspect the returned Table value and the Python PDK documentation for its available fields. Document how a plugin can obtain the service id and related service or consumer context, with a runnable example or confirmed reference for the lookup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100