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.5.tar.gz (14.6 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.5-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyixapi-0.2.5.tar.gz
  • Upload date:
  • Size: 14.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.12.3 Linux/6.8.0-1021-azure

File hashes

Hashes for pyixapi-0.2.5.tar.gz
Algorithm Hash digest
SHA256 2d4109cacc623ffdb7e493e722daac11823b1b43b4f5cfe5578bf2cad8db9cc5
MD5 c90422ff1b7151220ab5669d9e8b79b1
BLAKE2b-256 f00f416eb96bb8bf85d0f7dedb715dd4a0b4e16822e40761649d6a3157a02dc5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyixapi-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 17.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.12.3 Linux/6.8.0-1021-azure

File hashes

Hashes for pyixapi-0.2.5-py3-none-any.whl
Algorithm Hash digest
SHA256 1d5fd67dac40ba806f6b7c8d626a1b50c08eddb6bb29830899457c5c23460b00
MD5 d095c4183403d1eef7507ed9001d2371
BLAKE2b-256 dad2884501cd4043c83c6ac5b5b9f0a2822f6f93608b2aa8cb15cc5d0f02362f

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