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.4.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.4-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyixapi-0.2.4.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.4.tar.gz
Algorithm Hash digest
SHA256 b8401d5c98f9196540f14fabbfab2949b3c12565c2520622e11aeabba9b9dc8e
MD5 1046d3698f057b4c02526ed8afdf8c54
BLAKE2b-256 983919e978d7c7c329c0753c82dc4f363ddf8e8412922bd5506b200261f4ad90

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyixapi-0.2.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0545ef10760e1ea67706315c5abfb754dcdba781c760bf66048f66ba10cb4818
MD5 86ebf1ee5989f7594163b56b32ae8149
BLAKE2b-256 046338b94287531bcac7e482a57acfec4639700a7d1727dc0a25cd44e2dca335

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