Skip to main content

Unofficial library to interface with the Constellix API

Project description

Python Library for Constellix API

PyPI GitHub issues GitHub forks GitHub stars GitHub license Twitter

Description

Connects to the Constellix API and does things

Note

This is in no way affiliated with Constellix.

Issues

The tokens generated by this library are rejected about 50% of the time. The library uses backoff to manage these failures and typically takes less than 20 retries per payload to get the response you want.

Logging / Debugging

This library uses logging just set the log level and format you need.

Example

Set up environment

export CONSTELLIX_APISECRET=48d4ebb7-246e-406a-b272-2e174a3bdf35
export CONSTELLIX_APIKEY=b6f11837-9858-4f7f-8b3f-50057355e8e9

List all domains in account

from constellix import Constellix
import asyncio

api_key = os.environ.get("CONSTELLIX_APIKEY")
secret_key = os.environ.get("CONSTELLIX_APISECRET")

async def list_all_domains(api):
	domains = await api.domains.all()
	print(domains)

loop = asyncio.get_event_loop()
api = Constellix(api_key=api_key, secret_key=secret_key, loop=loop)
loop.run_until_complete(list_all_domains(api))

Search for a domain

domains = await api.domains.search("example")
domains = await api.domains.search_startswith("example")
domains = await api.domains.search_endswith("com")
domains = await api.domains.search_exact("example.com")

Create a new domain

domain = await api.domains.create("example.com")

And then delete it

delete_success = await domain.delete()

Get all a domains records

all_records = await domain.records.all()

Support

Buy Me A Coffee

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

constellix-0.0.4.tar.gz (25.7 kB view hashes)

Uploaded Source

Built Distribution

constellix-0.0.4-py2.py3-none-any.whl (17.0 kB view hashes)

Uploaded Python 2 Python 3

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