Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ client = Client(token="{YOUR_API_TOKEN}") # Please paste your API token here
# Create a server named my-server
response = client.servers.create(
name="my-server",
server_type=ServerType(name="cx22"),
server_type=ServerType(name="cx23"),
image=Image(name="ubuntu-22.04"),
)
server = response.server
Expand Down
2 changes: 1 addition & 1 deletion examples/create_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

response = client.servers.create(
name="my-server",
server_type=ServerType(name="cx22"),
server_type=ServerType(name="cx23"),
image=Image(name="ubuntu-24.04"),
)
server = response.server
Expand Down
2 changes: 1 addition & 1 deletion examples/get_server_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
if server is None:
response = client.servers.create(
name="my-server",
server_type=ServerType(name="cx22"),
server_type=ServerType(name="cx23"),
image=Image(name="ubuntu-24.04"),
)
server = response.server
Expand Down
4 changes: 2 additions & 2 deletions examples/usage_oop.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
# Create 2 servers
# Create 2 servers
response1 = client.servers.create(
"Server1", server_type=ServerType(name="cx22"), image=Image(id=4711)
"Server1", server_type=ServerType(name="cx23"), image=Image(id=4711)
)

response2 = client.servers.create(
"Server2", server_type=ServerType(name="cx22"), image=Image(id=4711)
"Server2", server_type=ServerType(name="cx23"), image=Image(id=4711)
)
# Get all servers
server1 = response1.server
Expand Down
6 changes: 3 additions & 3 deletions examples/usage_procedurale.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@

# Create 2 servers
response1 = client.servers.create(
name="Server1", server_type=ServerType(name="cx22"), image=Image(id=4711)
name="Server1", server_type=ServerType(name="cx23"), image=Image(id=4711)
)

response2 = client.servers.create(
"Server2", server_type=ServerType(name="cx22"), image=Image(id=4711)
"Server2", server_type=ServerType(name="cx23"), image=Image(id=4711)
)

server1 = response1.server
Expand Down Expand Up @@ -64,7 +64,7 @@
# Create one more server and attach 2 volumes to it
client.servers.create(
"Server3",
server_type=ServerType(name="cx22"),
server_type=ServerType(name="cx23"),
image=Image(id=4711),
volumes=[Volume(id=221), Volume(id=222)],
)