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/v2/",
    "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.7.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyixapi-0.2.7-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file pyixapi-0.2.7.tar.gz.

File metadata

  • Download URL: pyixapi-0.2.7.tar.gz
  • Upload date:
  • Size: 14.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.3 Linux/6.11.0-1018-azure

File hashes

Hashes for pyixapi-0.2.7.tar.gz
Algorithm Hash digest
SHA256 f26c407bdfa6e37590b866af4e62748b03bf05227be1094d9d26d36e307a0211
MD5 fdce1c35c385a3b1ee46019870737901
BLAKE2b-256 179904002e2233839416e10fc0919d862d2bc4c2e6ff8b2ef5a7a1f846928197

See more details on using hashes here.

File details

Details for the file pyixapi-0.2.7-py3-none-any.whl.

File metadata

  • Download URL: pyixapi-0.2.7-py3-none-any.whl
  • Upload date:
  • Size: 17.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.12.3 Linux/6.11.0-1018-azure

File hashes

Hashes for pyixapi-0.2.7-py3-none-any.whl
Algorithm Hash digest
SHA256 a5b5c81a2c81d750e4d1119fff76f0a3ab9f377ffa8bc3b83e43b56d4c35489c
MD5 b3d148cb389c77bba13abc874fb2a262
BLAKE2b-256 3d1a29eb512da227e4fa7c921fc1411e1926e115ee207944ed336a3eae8b1ca9

See more details on using hashes here.

Supported by

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