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

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

File details

Details for the file constellix-0.0.4.tar.gz.

File metadata

  • Download URL: constellix-0.0.4.tar.gz
  • Upload date:
  • Size: 25.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.6

File hashes

Hashes for constellix-0.0.4.tar.gz
Algorithm Hash digest
SHA256 8b23192c3750a6f4491f34a16e02cebca40c2ccfaa3ad60f3bb5025524db2153
MD5 9fef6b75a915e4443442adf6a0fe86b7
BLAKE2b-256 0255dc752ebc1ab10a61a4f81bbbc6a9ab4499c0c6fc3662ddf787f3a994a535

See more details on using hashes here.

File details

Details for the file constellix-0.0.4-py2.py3-none-any.whl.

File metadata

  • Download URL: constellix-0.0.4-py2.py3-none-any.whl
  • Upload date:
  • Size: 17.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.0 CPython/3.8.6

File hashes

Hashes for constellix-0.0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 3808fd9757bb8a23f75a15c1dc2b9e550c690bc70e88d054db3f1a026b89f900
MD5 35828be2794d6bf203787fcd4b739faf
BLAKE2b-256 e0012954f41e2bba7708c2c10b0e64d116a297358cb176b72b1b601da22de375

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