linode_api4-python
linode_api4-python copied to clipboard
new: Add support for Parent/Child account switching
📝 Description
This PR is for adding support of the parent/child account switching API endpoints.
✔️ How to Test
Automated Testing
Integration Testing
export LINODE_API_URL=https://the.dev.api.url/v4beta
export LINODE_API_CA=/path/to/your/alpha/ca.pem
export LINODE_TOKEN=YOUR_ALPHA_TOKEN
make TEST_CASE=test_list_child_accounts testint
Unit Testing
tox
Manual Testing
from linode_api4 import LinodeClient
client = LinodeClient(
token="your_token",
base_url="https://the.dev.api.url/v4beta",
ca_path="/path/to/your/alpha/ca.pem"
)
child_accounts = client.account.child_accounts()
print(child_accounts)
token = child_accounts[0].create_token()
print(token)