import latitudesh_python_sdk
from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.user_data.post_user_data(data={
"type": latitudesh_python_sdk.PostUserDataUserDataType.USER_DATA,
"attributes": {
"description": "User Data description",
"content": "I2Nsb3VkLWNvbmZpZwpydW5jbWQ6CiAtIFsgdG91Y2gsICAvaG9tZS91YnVudHUvdGVzdCBd",
},
})
# Handle response
print(res)
{
"data": {
"id": "ud_GKN4ydzgqVob3",
"type": "user_data",
"attributes": {
"description": "User Data description",
"content": "I2Nsb3VkLWNvbmZpZwpydW5jbWQ6CiAtIFsgdG91Y2gsICAvaG9tZS91YnVudHUvdGVzdCBd",
"created_at": "2025-07-16T18:37:12+00:00",
"updated_at": "2025-07-16T18:37:12+00:00",
"decoded_content": "#cloud-config\nruncmd:\n - [ touch, /home/ubuntu/test ]"
}
},
"meta": {}
}
Allows you to create User Data in a team, which can be used to perform custom setup on your servers after deploy and reinstall.
import latitudesh_python_sdk
from latitudesh_python_sdk import Latitudesh
import os
with Latitudesh(
bearer=os.getenv("LATITUDESH_BEARER", ""),
) as latitudesh:
res = latitudesh.user_data.post_user_data(data={
"type": latitudesh_python_sdk.PostUserDataUserDataType.USER_DATA,
"attributes": {
"description": "User Data description",
"content": "I2Nsb3VkLWNvbmZpZwpydW5jbWQ6CiAtIFsgdG91Y2gsICAvaG9tZS91YnVudHUvdGVzdCBd",
},
})
# Handle response
print(res)
{
"data": {
"id": "ud_GKN4ydzgqVob3",
"type": "user_data",
"attributes": {
"description": "User Data description",
"content": "I2Nsb3VkLWNvbmZpZwpydW5jbWQ6CiAtIFsgdG91Y2gsICAvaG9tZS91YnVudHUvdGVzdCBd",
"created_at": "2025-07-16T18:37:12+00:00",
"updated_at": "2025-07-16T18:37:12+00:00",
"decoded_content": "#cloud-config\nruncmd:\n - [ touch, /home/ubuntu/test ]"
}
},
"meta": {}
}
Show child attributes
Was this page helpful?