Skip to main content

Python library for Xolphin API

Project description

Library installation

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

Usage

Client initialization

import xolphin

client = xolphin.Client('<username>', '<password>')

Requests

Getting list of requests

requests = client.request().all()
for request in requests:
    print request.id, request.product.id

Getting request by ID

request = client.request().get(961992637)
print(request.product.brand)

Request certificate

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'
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)

Create a note

result = client.request().send_note(1234, 'My message')
print(result.message);

Get list of notes

result = client.request().get_notes(1234)
for note in result:
    print(note.messageBody);

Send a “Comodo Subscriber Agreement” email

//currently available languages: en, de, fr, nl
result = client.request().send_ComodoSA(124, 'test@example.com')
print(result.message);

Request Callback (OV and EV certificates)

vc = client.request().configure_validation_call(order_id)
vc.date = "2024-01-26"
vc.time = "11:00"
vc.timezone = "Europe Amsterdam"
vc.phoneNumber = "132456789"
request = client.request().send_validation_call(vc);

Certificate

Certificates list and expirations

certificates = client.certificate().all()
for certificate in certificates:
    print(certificate.id, certificate.isExpired())

Download certificate

cert = client.certificate().download(961983489, 'CRT')
with open('crt.crt', 'wb') as f:
    f.write(cert)

Support

Products list

products = client.support().products()
for product in products:
    print(product.id, product.brand)

Decode CSR

data = client.support().decode_csr('csr string')
print(data.type, data.size)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

xolphin-api-1.7.0.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

xolphin_api-1.7.0-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

File details

Details for the file xolphin-api-1.7.0.tar.gz.

File metadata

  • Download URL: xolphin-api-1.7.0.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for xolphin-api-1.7.0.tar.gz
Algorithm Hash digest
SHA256 d7319d167a15675e764bd2ef824f764d539c086b39f31e6b8067e29dfcd88e40
MD5 954c3d7f0b90f030c6c13e161406a3a4
BLAKE2b-256 15b0605dffe775117e12028a2fb3e5048bfd60d4f9cd87a7f1de897698ae3ec6

See more details on using hashes here.

File details

Details for the file xolphin_api-1.7.0-py3-none-any.whl.

File metadata

  • Download URL: xolphin_api-1.7.0-py3-none-any.whl
  • Upload date:
  • Size: 21.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.10

File hashes

Hashes for xolphin_api-1.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e2da896e60af0f97fce2555b8461461343e7fcf3bc2964f916d72b1be3de4e7f
MD5 cbd97584f674d8d0171c3c1880090b97
BLAKE2b-256 9e0363950501568eee1111df71c400ca1856eed3c7f5a3c57daf793f6b2ae887

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page