@@ -3,6 +3,20 @@ Python client for [UpCloud's API](https://www.upcloud.com/documentation/api/).
33
44NOTE: This Python client is still work-in-progress and is not considered production ready.
55
6+ ## Installation
7+
8+ ```
9+ pip install --pre upcloud-api-python
10+
11+ # with older pip:
12+ pip install upcloud-api-python
13+ ```
14+
15+ Alternatively, clone the project and run
16+ ```
17+ python setup.py install
18+ ```
19+
620## Features
721* OOP based management of Servers, Storages and IP-addresses with full CRUD.
822* Clear way to define your infrastructure, emphasis on clear and easy syntax
@@ -31,9 +45,7 @@ You must take this into account in your automations.
3145
3246``` python
3347import upcloud
34- import upcloud.Server
35- import upcloud.Storage
36- import upcloud.ZONE
48+ from upcloud import Server, Storage, ZONE
3749
3850manager = upcloud.CloudManager(" api_user" , " password" )
3951manager.authenticate() # test credentials
@@ -42,7 +54,7 @@ cluster = {
4254 " web1" : Server( core_number = 1 , # CPU cores
4355 memory_amount = 512 , # RAM in MB
4456 hostname = " web1.example.com" ,
45- zone = ZONE .London, # Zone .Helsinki and Zone .Chicago available also
57+ zone = ZONE .London, # ZONE .Helsinki and ZONE .Chicago available also
4658 storage_devices = [
4759 # OS: Ubuntu 14.04 from template
4860 # default tier: maxIOPS, the 100k IOPS storage backend
@@ -79,7 +91,7 @@ cluster = {
7991}
8092
8193for server in cluster:
82- manager.create_server( server ) # automatically populates the Server objects with data from API
94+ manager.create_server( cluster[ server] ) # automatically populates the Server objects with data from API
8395
8496```
8597
@@ -129,6 +141,10 @@ Tests located in `project_root/tests/` directory. Run with:
129141py.test tests/
130142```
131143
144+ ## Bugs, Issues, Problems, Ideas
145+
146+ Feel free to open a new issue : )
147+
132148## Documentation
133149
134150Documentation available [ here] ( http://upcloudltd.github.io/upcloud-python-api/ )
0 commit comments