xolphin-python-api is a library which allows quick integration of the Xolphin REST API in Python to automated ordering, issuance and installation of SSL Certificates.
Xolphin is the largest supplier of SSL Certificates and Digital Signatures in the Netherlands. Xolphin has
a professional team providing reliable support and rapid issuance of SSL Certificates at an affordable price from industry leading brands such as Comodo, GeoTrust, GlobalSign, Thawte and Symantec.
Library can be installed via pip
pip install xolphin-api
And updated via
pip install xolphin-api --upgrade
Or manually from source
git clone https://github.com/xolphin/xolphin-api-python.git
cd xolphin-api-python
python setup.py install
import xolphin
client = xolphin.Client('<username>', '<password>')
requests = client.request().all()
for request in requests:
print(request.id, request.product.id)
request = client.request().get(961992637)
print(request.product.brand)
ccr = client.request().create(24, 1, 'csr string', 'EMAIL')
ccr.address = 'Address'
ccr.approver_first_name = 'FirstName'
ccr.approver_last_name = 'LastName'
ccr.approver_phone = '+12345678901'
ccr.approver_email = 'email@domain.com'
ccr.zipcode = '123456'
ccr.city = 'City'
ccr.company = 'Company'
# currently available languages: en, de, fr, nl
ccr.language = 'en'
ccr.subject_alternative_names.append('test1.domain.com')
ccr.subject_alternative_names.append('test2.domain.com')
ccr.dcv.append({
'domain': 'test1.domain.com',
'dcvType': 'EMAIL',
'approverEmail': 'email@domain.com'
})
request = client.request().send(ccr)
print(request.id)
result = client.request().send_note(1234, 'My message')
print(result.message);
result = client.request().get_notes(1234)
for note in result:
print(note.messageBody);
ccr = client.request().create_ee()
ccr.csr = "<csr_string>"
ccr.approver_first_name = 'FirstName'
ccr.approver_last_name = 'LastName'
ccr.approver_phone = '+12345678901'
ccr.approver_email = 'email@domain.com'
ccr.subject_alternative_names.append('test1.domain.com')
ccr.subject_alternative_names.append('test2.domain.com')
ccr.dcvType = 'DNS'
request = client.request().send_ee(ccr)
//currently available languages: en, de, fr, nl
result = client.request().send_ComodoSA(124, 'test@example.com')
print(result.message);
certificates = client.certificate().all()
for certificate in certificates:
print(certificate.id, certificate.isExpired())
cert = client.certificate().download(961983489, 'CRT')
with open('crt.crt', 'wb') as f:
f.write(cert)
products = client.support().products()
for product in products:
print(product.id, product.brand)
data = client.support().decode_csr('csr string')
print(data.type, data.size)