Skip to main content
Skip table of contents

2.3 Python

This is a Python package that interacts with the SIPAMetrics REST API to fetch metrics and other relevant data, with the goal to simplify integration by providing an easy-to-use interface for developers.

This quick start guide will help you set up the API key, install the Python package, and explore the available API functions.

API Key

Please refer to this page for API key creation.

Python Package

This is a lightweight Python library that works as a wrapper to SIPAMetrics REST APIs.

CODE
pip install sipametrics

Or get the latest tarball from PyPI

Package Dependency

The sipametrics package requires the following packages:

  • aiohttp

  • python-dateutil

  • pydantic

  • pandas (optional) - only required for sipametrics.loaders helper module

API Library

Classes

  • SipaMetricsService

Constants

Full list of constants made available in the package can be located from the sipametrics.constants module.

Functions

2.3.1 metrics

2.3.2 infra_equity_comparable

2.3.3 infra_debt_comparable

2.3.4 term_structure

2.3.5 private_equity_comparable

2.3.6 private_equity_comparable_boundaries

2.3.7 indices_catalogue

2.3.8 taxonomies

2.3.10 private_equity_region_tree

Sample Usage

With Context Manager (Recommended)

PY
from sipametrics import SipaMetricsService
import sipametrics.constants as CONSTANTS

async with SipaMetricsService(api_key='your_api_key', api_secret='your_api_secret') as service:
    response = await service.indices_catalogue(product=CONSTANTS.Product.PRIVATE_INFRA, app=CONSTANTS.App.MARKET_INDICES)

Without Context Manager

PY
from sipametrics import SipaMetricsService
import sipametrics.constants as CONSTANTS

service = SipaMetricsService(api_key='your_api_key', api_secret='your_api_secret')
response = await service.indices_catalogue(product=CONSTANTS.Product.PRIVATE_INFRA, app=CONSTANTS.App.MARKET_INDICES)
await service.close()

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.