Skip to content

Commit f52e32b

Browse files
usmannasirLKaemmerling
authored andcommitted
Fix create_server example (#39)
1 parent cf66594 commit f52e32b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

examples/create_server.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
from hcloud import Client
22
from hcloud.images.domain import Image
3+
from hcloud.server_types.domain import ServerType
34

45
client = Client(token="{YOUR_API_TOKEN}") # Please paste your API token here between the quotes
5-
response = client.servers.create(name="my-server", server_type="cx11", image=Image(name="ubuntu-18.04"))
6+
response = client.servers.create(name="my-server", server_type=ServerType("cx11"), image=Image(name="ubuntu-18.04"))
67
server = response.server
78
print(server)
89
print("Root Passwort" + response.root_password)

0 commit comments

Comments
 (0)