Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aszlig/hetzner
A high-level Python API for accessing the Hetzner robot.
https://github.com/aszlig/hetzner
Last synced: 5 days ago
JSON representation
A high-level Python API for accessing the Hetzner robot.
- Host: GitHub
- URL: https://github.com/aszlig/hetzner
- Owner: aszlig
- License: other
- Created: 2012-06-06T05:19:25.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2024-05-21T07:42:50.000Z (6 months ago)
- Last Synced: 2024-09-19T09:41:02.315Z (about 2 months ago)
- Language: Python
- Homepage: https://pypi.python.org/pypi/hetzner
- Size: 206 KB
- Stars: 129
- Watchers: 12
- Forks: 36
- Open Issues: 31
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
- awesome-starred - aszlig/hetzner - A high-level Python API for accessing the Hetzner robot. (others)
README
Python API for the Hetzner Robot
================================API usage
---------This is a small example session to illustrate how to use the API:
```python
>>> from hetzner.robot import Robot
>>> robot = Robot("username", "password")
>>> list(robot.servers)
[, , , ]
>>> server = robot.servers.get("1.2.3.4")
>>> server.status
u'ready'
>>> server.name
u'shiny server'
>>> server.reboot(mode='hard')>>> list(server.ips)
[]
>>> server.set_name("foobar")
>>> server.name
u'foobar'
>>>
>>> server.rescue.shell()
Linux rescue 3.10.25 #128 SMP Tue Jan 7 10:58:27 CET 2014 x86_64-------------------------------------------------------------------
Welcome to the Hetzner Rescue System.
This Rescue System is based on Debian 7.0 (wheezy) with a newer
kernel. You can install software as in a normal system.To install a new operating system from one of our prebuilt
images, run 'installimage' and follow the instructions.More information at http://wiki.hetzner.de
-------------------------------------------------------------------
Hardware data:
...Network data:
...root@rescue ~ # logout
>>> server.rescue.active
False
>>>
```Commandline helper tool
-----------------------There is also a small commandline helper tool called `hetznerctl`, which exposes
most of the API functionality in a CLI similar to popular SCMs like Git or SVN.In order to show the available commands type `hetznerctl --help`.
Every subcommand has its own help, like for example `hetznerctl rescue --help`.