This repository was archived by the owner on Jan 20, 2021. It is now read-only.
forked from el-barto/python-directadmin
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathINSTALL
More file actions
84 lines (61 loc) · 2.37 KB
/
INSTALL
File metadata and controls
84 lines (61 loc) · 2.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
==================
Python Directadmin
==================
*Python implementation of Directadmin's Web API*
Intro
-----
The aim of this project is to provide a simple and clean implementation
of Directadmin's Web API for Python developers.
Directadmin_ is a popular web control panel. It provides an HTTP API which
*python-directadmin* intends to implement, to help python developers
interact with the control panel.
Examples
--------
**List all users**
::
import directadmin
api = directadmin.Api("admin", "password", "hostname.com", 2222)
print api.list_all_users()
**Connect using HTTPS and list all users**
::
import directadmin
api = directadmin.Api("admin", \
"password", \
"hostname.com", \
2222, \
True)
print api.list_all_users()
**Create an EndUser** (regular user)
::
import directadmin
api = directadmin.Api("admin", "password", "hostname.com")
user = EndUser('username', \
'email@domain.com', \
'userpassword', \
'domain.com', \
'service_package_1', \
'1.2.3.4')
if api.create_user(user, True):
print "User %s successfuly created" % user['username']
else:
print "Failed to create user"
Scripts
-------
Within the source code of this project you will find some sample scripts
meant to explain how to use the API while performing some basic administrative tasks.
License information
-------------------
The author of this code has no relationship with Directadmin or its creators.
This is just an implementation of a public API distributed under GPL v.3 license.
It is meant to be used to interact with Directadmin Web Control Panel,
which is a privative software that requires the purchase of a license to operate.
Copyright (C) 2009, Andrés Gattinoni
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.. _Directadmin: http://www.directadmin.com