Skip to main content

Python API client library for IX-API

Project description

pyixapi

Python API client library for IX-API.

Supported versions are:

Installation

To install run pip install pyixapi.

Quick Start

To begin, import pyixapi and instantiate the API.

import pyixapi
ixapi = pyixapi.api(
    "https://api.de-cix.net/api/v1/",
    "3LH3G72VH7H1SGogEsFeQOPsGjOQotMUZQRt2pK7YbH",
    "cEtrt8s0vR0CsG0vpAmcaxtnolzZj7DEG0B7izvwPlV",
)
ixapi.authenticate()

The first argument the .api() method takes is the IX-API URL. The second and third arguments are the API key and secret used for authentication.

Authenticating will generate a pair of access and refresh tokens that can be passed as argument to the .api() method.

Queries

The pyixapi API is setup so that IX-API's endpoints are attributes of the .api() object. Each endpoint has a handful of methods available to carry out actions on the endpoint. For example, in order to query all the objects in the network-service-configs endpoint you would do the following:

>>> nsc = ixapi.network_service_configs.all()
>>> for i in nsc:
...     print(i)
...
DXDB:PAS:00001
DXDB:PAS:00002
DXDB:PAS:00003
DXDB:PAS:00004
DXDB:PAS:00005
DXDB:PAS:00006
DXDB:PAS:00007
DXDB:PAS:00008
>>>

Write queries are not implemented yet.

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

pyixapi-0.2.3.tar.gz (15.2 kB view hashes)

Uploaded Source

Built Distribution

pyixapi-0.2.3-py3-none-any.whl (16.9 kB view hashes)

Uploaded 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