Skip to main content
Polars Bloomberg Logo

Polars + Bloomberg Open API

PyPI version Python versions PyPI Downloads Docs
Tests License

polars-bloomberg is a Python library that extracts Bloomberg's financial data directly into Polars DataFrames. If you’re a quant financial analyst, data scientist, or quant developer working in capital markets, this library makes it easy to fetch, transform, and analyze Bloomberg data right in Polars—offering speed, efficient memory usage, and a lot of fun to use!

Why use polars-bloomberg?

  • User-Friendly Functions: Shortcuts like bdp(), bdh(), and bql() (inspired by Excel-like Bloomberg calls) let you pull data with minimal boilerplate.
  • High-Performance Analytics: Polars is a lightning-fast DataFrame library. Combined with Bloomberg’s rich dataset, you get efficient data retrieval and minimal memory footprint
  • No Pandas Dependency: Enjoy a clean integration that relies solely on Polars for speed and simplicity.

Table of Contents

  1. Introduction
  2. Prerequisites
  3. Installation
  4. Quick Start
  5. Core Methods
  6. Errors, Warnings and Empty Results
  7. Developing
  8. Additional Documentation and Resources

Introduction

Working with Bloomberg data in Python often feels more complicated than using their well-known Excel interface. Great projects like blp, xbbg, and pdblp have made this easier by pulling data directly into pandas.

With polars-bloomberg, you can enjoy the speed and simplicity of Polars DataFrames—accessing both familiar Excel-style calls (bdp, bdh, bdib, bsrch) and advanced bql queries—without extra pandas conversions.

For detailed documentation and function references, visit the documentation site https://marekozana.github.io/polars-bloomberg.

I hope you enjoy using it as much as I had fun building it!

Prerequisites

  • Bloomberg Access: A valid Bloomberg terminal license.
  • Bloomberg Python API: The blpapi library must be installed. See the Bloomberg API Library for guidance.
  • Python Version: Python 3.12+ required. Supported versions: 3.12, 3.13, 3.14, and 3.15.

Installation

pip install polars-bloomberg

Quick Start

"Hello World" Example (under 1 minute):

from polars_bloomberg import BQuery

# Fetch the latest price for Apple (AAPL US Equity)
with BQuery() as bq:
    df = bq.bdp(["AAPL US Equity"], ["PX_LAST"])
    print(df)

┌────────────────┬─────────┐
│ security       ┆ PX_LAST │
│ ---            ┆ ---     │
│ str            ┆ f64     │
╞════════════════╪═════════╡
│ AAPL US Equity ┆ 248.13  │
└────────────────┴─────────┘

What this does:

  • Establishes a Bloomberg connection using the context manager.
  • Retrieves the last price of Apple shares.
  • Returns the result as a Polars DataFrame.

If you see a price in df, your setup is working 🤩!!!

Core Methods

BQuery is your main interface. Using a context manager ensures the connection opens and closes cleanly. Within this session, you can use:

  • bq.bdp() for Bloomberg Data Points (single-value fields).
  • bq.bdh() for Historical Data (time series).
  • bq.bql() for complex Bloomberg Query Language requests.
  • bq.bsrch() for saved custom SRCH searches and BI templates.
  • bq.bdib() for intraday bars

BDP

Use Case: Fetch the latest single-value data points (like last price, currency, or descriptive fields).

Example: Fetching the Last Price & Currency of Apple and SEB

with BQuery() as bq:
    df = bq.bdp(["AAPL US Equity", "SEBA SS Equity"], ["PX_LAST", "CRNCY"])
    print(df)

┌────────────────┬─────────┬───────┐
│ security       ┆ PX_LAST ┆ CRNCY │
│ ---            ┆ ---     ┆ ---   │
│ str            ┆ f64     ┆ str   │
╞════════════════╪═════════╪═══════╡
│ AAPL US Equity ┆ 248.13  ┆ USD   │
│ SEBA SS Equity ┆ 155.2   ┆ SEK   │
└────────────────┴─────────┴───────┘
Expand for more BDP Examples

BDP with different column types

polars-bloomberg correctly infers column type as shown in this example:

with BQuery() as bq:
    df = bq.bdp(["XS2930103580 Corp", "USX60003AC87 Corp"],
                ["SECURITY_DES", "YAS_ZSPREAD", "CRNCY", "NXT_CALL_DT"])

┌───────────────────┬────────────────┬─────────────┬───────┬─────────────┐
│ security          ┆ SECURITY_DES   ┆ YAS_ZSPREAD ┆ CRNCY ┆ NXT_CALL_DT │
│ ---               ┆ ---            ┆ ---         ┆ ---   ┆ ---         │
│ str               ┆ str            ┆ f64         ┆ str   ┆ date        │
╞═══════════════════╪════════════════╪═════════════╪═══════╪═════════════╡
│ XS2930103580 Corp ┆ SEB 6 3/4 PERP ┆ 304.676112  ┆ USD   ┆ 2031-11-04  │
│ USX60003AC87 Corp ┆ NDAFH 6.3 PERP ┆ 292.477506  ┆ USD   ┆ 2031-09-25  │
└───────────────────┴────────────────┴─────────────┴───────┴─────────────┘

BDP with overrides

User can submit list of tuples with overrides

with BQuery() as bq:
    df = bq.bdp(
        ["IBM US Equity"],
        ["PX_LAST", "CRNCY_ADJ_PX_LAST"],
        overrides=[("EQY_FUND_CRNCY", "SEK")],
    )

┌───────────────┬─────────┬───────────────────┐
│ security      ┆ PX_LAST ┆ CRNCY_ADJ_PX_LAST │
│ ---           ┆ ---     ┆ ---               │
│ str           ┆ f64     ┆ f64               │
╞═══════════════╪═════════╪═══════════════════╡
│ IBM US Equity ┆ 230.82  ┆ 2535.174          │
└───────────────┴─────────┴───────────────────┘

BDP with date overrides

Overrides for dates has to be in format YYYYMMDD

with BQuery() as bq:
    df = bq.bdp(["USX60003AC87 Corp"], ["SETTLE_DT"],
                overrides=[("USER_LOCAL_TRADE_DATE", "20241014")])

┌───────────────────┬────────────┐
│ security          ┆ SETTLE_DT  │
│ ---               ┆ ---        │
│ str               ┆ date       │
╞═══════════════════╪════════════╡
│ USX60003AC87 Corp ┆ 2024-10-15 │
└───────────────────┴────────────┘
with BQuery() as bq:
    df = bq.bdp(['USDSEK Curncy', 'SEKCZK Curncy'],
                ['SETTLE_DT', 'PX_LAST'],
                overrides=[('REFERENCE_DATE', '20200715')]
               )

┌───────────────┬────────────┬─────────┐
│ security      ┆ SETTLE_DT  ┆ PX_LAST │
│ ---           ┆ ---        ┆ ---     │
│ str           ┆ date       ┆ f64     │
╞═══════════════╪════════════╪═════════╡
│ USDSEK Curncy ┆ 2020-07-17 ┆ 10.9778 │
│ SEKCZK Curncy ┆ 2020-07-17 ┆ 2.1698  │
└───────────────┴────────────┴─────────┘

BDH

Use Case: Retrieve historical data over a date range, such as daily closing prices or volumes.

with BQuery() as bq:
    df = bq.bdh(
        ["TLT US Equity"],
        ["PX_LAST"],
        start_date=date(2019, 1, 1),
        end_date=date(2019, 1, 7),
    )
    print(df)

┌───────────────┬────────────┬─────────┐
│ security      ┆ date       ┆ PX_LAST │
│ ---           ┆ ---        ┆ ---     │
│ str           ┆ date       ┆ f64     │
╞═══════════════╪════════════╪═════════╡
│ TLT US Equity ┆ 2019-01-02 ┆ 122.15  │
│ TLT US Equity ┆ 2019-01-03 ┆ 123.54  │
│ TLT US Equity ┆ 2019-01-04 ┆ 122.11  │
│ TLT US Equity ┆ 2019-01-07 ┆ 121.75  │
└───────────────┴────────────┴─────────┘
Expand for more BDH examples

BDH with multiple securities / fields

with BQuery() as bq:
    df = bq.bdh(
        securities=["SPY US Equity", "TLT US Equity"],
        fields=["PX_LAST", "VOLUME"],
        start_date=date(2019, 1, 1),
        end_date=date(2019, 1, 10),
        options={"adjustmentSplit": True},
    )
    print(df)

shape: (14, 4)
┌───────────────┬────────────┬─────────┬──────────────┐
│ security      ┆ date       ┆ PX_LAST ┆ VOLUME       │
│ ---           ┆ ---        ┆ ---     ┆ ---          │
│ str           ┆ date       ┆ f64     ┆ f64          │
╞═══════════════╪════════════╪═════════╪══════════════╡
│ SPY US Equity ┆ 2019-01-02 ┆ 250.18  ┆ 1.26925199e8 │
│ SPY US Equity ┆ 2019-01-03 ┆ 244.21  ┆ 1.44140692e8 │
│ SPY US Equity ┆ 2019-01-04 ┆ 252.39  ┆ 1.42628834e8 │
│ SPY US Equity ┆ 2019-01-07 ┆ 254.38  ┆ 1.031391e8   │
│ SPY US Equity ┆ 2019-01-08 ┆ 256.77  ┆ 1.02512587e8 │
│ …             ┆ …          ┆ …       ┆ …            │
│ TLT US Equity ┆ 2019-01-04 ┆ 122.11  ┆ 1.2970226e7  │
│ TLT US Equity ┆ 2019-01-07 ┆ 121.75  ┆ 8.498104e6   │
│ TLT US Equity ┆ 2019-01-08 ┆ 121.43  ┆ 7.737103e6   │
│ TLT US Equity ┆ 2019-01-09 ┆ 121.24  ┆ 9.349245e6   │
│ TLT US Equity ┆ 2019-01-10 ┆ 120.46  ┆ 8.22286e6    │
└───────────────┴────────────┴─────────┴──────────────┘

BDH with options - periodicitySelection: Monthly

with BQuery() as bq:
    df = bq.bdh(['AAPL US Equity'],
                ['PX_LAST'],
                start_date=date(2019, 1, 1),
                end_date=date(2019, 3, 29),
                options={"periodicitySelection": "MONTHLY"})

┌────────────────┬────────────┬─────────┐
│ security       ┆ date       ┆ PX_LAST │
│ ---            ┆ ---        ┆ ---     │
│ str            ┆ date       ┆ f64     │
╞════════════════╪════════════╪═════════╡
│ AAPL US Equity ┆ 2019-01-31 ┆ 41.61   │
│ AAPL US Equity ┆ 2019-02-28 ┆ 43.288  │
│ AAPL US Equity ┆ 2019-03-29 ┆ 47.488  │
└────────────────┴────────────┴─────────┘

BDIB

Use Case: Retrieve intraday bars (1- to 1440-minute intervals) over a precise intraday window without managing tick aggregation yourself.

with BQuery() as bq:
    df = bq.bdib(
        "OMX Index",
        event_type="TRADE",
        interval=60,
        start_datetime=datetime(2026, 11, 13),
        end_datetime=datetime(2026, 11, 13, 12),
    )
    print(df)

Output:

shape: (4, 9)
┌───────────┬───────────────┬──────────┬──────────┬───┬──────────┬────────┬───────────┬───────┐
│ security  ┆ time          ┆ open     ┆ high     ┆ … ┆ close    ┆ volume ┆ numEvents ┆ value │
│ ---       ┆ ---           ┆ ---      ┆ ---      ┆   ┆ ---      ┆ ---    ┆ ---       ┆ ---   │
│ str       ┆ datetime[μs]  ┆ f64      ┆ f64      ┆   ┆ f64      ┆ i64    ┆ i64       ┆ f64   │
╞═══════════╪═══════════════╪══════════╪══════════╪═══╪══════════╪════════╪═══════════╪═══════╡
│ OMX Index ┆ 2026-11-13    ┆ 3351.464 ┆ 3353.647 ┆ … ┆ 3350.421 ┆ 0      ┆ 3591      ┆ 0.0   │
│           ┆ 08:00:00      ┆          ┆          ┆   ┆          ┆        ┆           ┆       │
│ OMX Index ┆ 2026-11-13    ┆ 3350.322 ┆ 3359.014 ┆ … ┆ 3358.95  ┆ 0      ┆ 3600      ┆ 0.0   │
│           ┆ 09:00:00      ┆          ┆          ┆   ┆          ┆        ┆           ┆       │
│ OMX Index ┆ 2026-11-13    ┆ 3358.95  ┆ 3366.616 ┆ … ┆ 3365.006 ┆ 0      ┆ 3600      ┆ 0.0   │
│           ┆ 10:00:00      ┆          ┆          ┆   ┆          ┆        ┆           ┆       │
│ OMX Index ┆ 2026-11-13    ┆ 3365.006 ┆ 3365.888 ┆ … ┆ 3362.596 ┆ 0      ┆ 3600      ┆ 0.0   │
│           ┆ 11:00:00      ┆          ┆          ┆   ┆          ┆        ┆           ┆       │
└───────────┴───────────────┴──────────┴──────────┴───┴──────────┴────────┴───────────┴───────┘

Each row is a 60-minute bar built from TRADE events. time is the start of each bar, as a naive datetime (no time zone) holding UTC. Bloomberg keeps intraday bars for some months only; an older window gives an empty frame.

BSRCH

Use Case: Excel-style searches (SRCH/BI domains). Supports overrides such as LIMIT and custom keys (e.g., BIKEY).

Small example: two COCO bonds (limit = 2)

with BQuery() as bq:
    df = bq.bsrch("FI:SRCHEX.@COCO", overrides={"LIMIT": 2})
    print(df)

Example output:

shape: (2, 1)
┌───────────────┐
│ id            │
│ ---           │
│ str           │
╞═══════════════╡
│ DS990344 Corp │
│ DT301785 Corp │
└───────────────┘

Larger example: BI template (BI:TPD) with BIKEY and LIMIT

with BQuery() as bq:
    df = bq.bsrch(
        "BI:TPD",
        overrides={
            "BIKEY": "DKOCVGXJVU8II8M90W8JSQEKR",
            "LIMIT": 20000,  # avoid ReachMax warning
        },
    )
    print(df.head())

Example output (truncated):

shape: (16, 6)
┌──────────┬──────────┬─────────┬──────────┬──────────┬─────────┐
│ Main_Cat ┆ Bclass3_ ┆ Category┆ 06/30/20 ┆ 03/31/20 ┆ 12/31/20│
│ ...      ┆ ...      ┆ ...     ┆ 25       ┆ 25       ┆ 24      │
│ str      ┆ str      ┆ str     ┆ f64      ┆ f64      ┆ f64     │
╞══════════╪══════════╪═════════╪══════════╪══════════╪═════════╡
│ Leverage ┆ Non-Fin… ┆ B       ┆ 3.956051 ┆ 4.118212 ┆ 4.269732│
│ …        ┆ …        ┆ …       ┆ …        ┆ …        ┆ …       │
└──────────┴──────────┴─────────┴──────────┴──────────┴─────────┘

BQL

Use Case: Run more advanced queries to screen securities, calculate analytics (like moving averages), or pull fundamental data with complex conditions.

Returns: The bql() method returns a BqlResult object, which:

  • Acts like a list of Polars DataFrames (one for each item in BQL get statement).
  • Provides a .combine() method to merge DataFrames. With no arguments it preserves the legacy behavior of joining on common columns. Use .combine(on=...) to join only on explicit keys such as "ID" or ["ID", "DATE"].

1. Basic Example: Single Item and Single Security

# Fetch the last price of IBM stock
with BQuery() as bq:
    results = bq.bql("get(px_last) for(['IBM US Equity'])")
    print(results[0])  # Access the first DataFrame

Output:

┌───────────────┬─────────┬────────────┬──────────┐
│ ID            ┆ px_last ┆ DATE       ┆ CURRENCY │
│ ---           ┆ ---     ┆ ---        ┆ ---      │
│ str           ┆ f64     ┆ date       ┆ str      │
╞═══════════════╪═════════╪════════════╪══════════╡
│ IBM US Equity ┆ 230.82  ┆ 2024-12-14 ┆ USD      │
└───────────────┴─────────┴────────────┴──────────┘

2. Multiple Securities with a Single Item

# Fetch the last price for IBM and SEB
with BQuery() as bq:
    results = bq.bql("get(px_last) for(['IBM US Equity', 'SEBA SS Equity'])")
    print(results[0])

Output:

┌────────────────┬─────────┬────────────┬──────────┐
│ ID             ┆ px_last ┆ DATE       ┆ CURRENCY │
│ ---            ┆ ---     ┆ ---        ┆ ---      │
│ str            ┆ f64     ┆ date       ┆ str      │
╞════════════════╪═════════╪════════════╪══════════╡
│ IBM US Equity  ┆ 230.82  ┆ 2024-12-14 ┆ USD      │
│ SEBA SS Equity ┆ 155.2   ┆ 2024-12-14 ┆ SEK      │
└────────────────┴─────────┴────────────┴──────────┘

3. Multiple Items

When querying for multiple items, bql() returns a list of DataFrames

# Fetch name and last price of IBM (two items)
with BQuery() as bq:
    results = bq.bql("get(name, px_last) for(['IBM US Equity'])")

Output:

>>> print(len(results))  # 2 DataFrames
n=2

>>> print(results[0])    # First DataFrame: 'name'
┌───────────────┬────────────────────────────────┐
│ ID            ┆ name                           │
│ ---           ┆ ---                            │
│ str           ┆ str                            │
╞═══════════════╪════════════════════════════════╡
│ IBM US Equity ┆ International Business Machine │
└───────────────┴────────────────────────────────┘

>>> print(results[1])    # Second DataFrame: 'px_last'
┌───────────────┬─────────┬────────────┬──────────┐
│ ID            ┆ px_last ┆ DATE       ┆ CURRENCY │
│ ---           ┆ ---     ┆ ---        ┆ ---      │
│ str           ┆ f64     ┆ date       ┆ str      │
╞═══════════════╪═════════╪════════════╪══════════╡
│ IBM US Equity ┆ 230.82  ┆ 2024-12-14 ┆ USD      │
└───────────────┴─────────┴────────────┴──────────┘

Combining Results

>>> combined_df = results.combine(on="ID")
>>> print(combined_df)

Output:

┌───────────────┬────────────────────────────────┬─────────┬────────────┬──────────┐
│ ID            ┆ name                           ┆ px_last ┆ DATE       ┆ CURRENCY │
│ ---           ┆ ---                            ┆ ---     ┆ ---        ┆ ---      │
│ str           ┆ str                            ┆ f64     ┆ date       ┆ str      │
╞═══════════════╪════════════════════════════════╪═════════╪════════════╪══════════╡
│ IBM US Equity ┆ International Business Machine ┆ 230.82  ┆ 2024-12-14 ┆ USD      │
└───────────────┴────────────────────────────────┴─────────┴────────────┴──────────┘

By default, combine() keeps the historical behavior and joins each result DataFrame on all common column names. This is convenient for simple BQL results, but it can be too broad when several item tables share metadata columns such as DATE, CURRENCY, PERIOD, VALUE, or MULTIPLIER.

A row whose shared columns hold nulls matches nothing and appears twice, once from each side: for example a security for which BQL has no DATE.

For safer joins, pass the intended key columns explicitly; combine(on="ID") gives one row per security:

# Join only by security ID. Other common columns are kept as data columns.
combined_df = results.combine(on="ID")

# Join by a compound key when both columns are true row identifiers.
combined_df = results.combine(on=["ID", "DATE"])

# Use Polars join names. "full" is the default for explicit joins.
combined_df = results.combine(on="ID", how="inner")

If non-key columns overlap when using on=..., they are preserved with suffixes based on the BQL item name, for example DATE_#ret_1d. To fail instead of suffixing overlapping non-key columns, use:

combined_df = results.combine(on="ID", allow_common_columns=False)

4. Advanced Example: Screening Securities

Find list of SEB and Handelsbanken's AT1 bonds and print their names, duration and Z-Spread.

query = """
    let(#dur=duration(duration_type=MODIFIED);
        #zsprd=spread(spread_type=Z);)
    get(name(), #dur, #zsprd)
    for(filter(screenresults(type=SRCH, screen_name='@COCO'),
            ticker in ['SEB', 'SHBASS']))
"""

with BQuery() as bq:
    results = bq.bql(query)
    combined_df = results.combine(on="ID")
    print(combined_df)

Output:

shape: (8, 6)
┌───────────────┬───────────────────┬──────────┬────────────┬────────────┬─────────────┐
│ ID            ┆ name()            ┆ #dur     ┆ DATE       ┆ #zsprd     ┆ DATE_#zsprd │
│ ---           ┆ ---               ┆ ---      ┆ ---        ┆ ---        ┆ ---         │
│ str           ┆ str               ┆ f64      ┆ date       ┆ f64        ┆ date        │
╞═══════════════╪═══════════════════╪══════════╪════════════╪════════════╪═════════════╡
│ BW924993 Corp ┆ SEB 6 ⅞ PERP      ┆ 0.581939 ┆ 2026-11-16 ┆ 184.994423 ┆ 2026-11-16  │
│ ZO703956 Corp ┆ SHBASS 4 ¾ PERP   ┆ 3.576392 ┆ 2026-11-16 ┆ 224.954038 ┆ 2026-11-16  │
│ ZO703315 Corp ┆ SHBASS 4 ⅜ PERP   ┆ 0.281479 ┆ 2026-11-16 ┆ 184.076417 ┆ 2026-11-16  │
│ DL161992 Corp ┆ SEB 6 ¾ PERP      ┆ 5.5886   ┆ 2026-11-16 ┆ 283.007084 ┆ 2026-11-16  │
│ DH445766 Corp ┆ SHBASS 5.3 PERP   ┆ 3.687234 ┆ 2026-11-16 ┆ 239.782319 ┆ 2026-11-16  │
│ YU819930 Corp ┆ SEB 6 ¾ PERP      ┆ 4.13844  ┆ 2026-11-16 ┆ 226.000509 ┆ 2026-11-16  │
│ YV402592 Corp ┆ SEB Float PERP    ┆ 0.042373 ┆ 2026-11-16 ┆ 203.234    ┆ 2026-11-16  │
│ DH445768 Corp ┆ SHBASS Float PERP ┆ 0.130108 ┆ 2026-11-16 ┆ 228.884    ┆ 2026-11-16  │
└───────────────┴───────────────────┴──────────┴────────────┴────────────┴─────────────┘

Average PE per Sector

This example shows aggregation (average) per group (sector) for members of an index. The resulting list has only one element since there is only one data-item in get

query = """
    let(#avg_pe=avg(group(pe_ratio(), gics_sector_name()));)
    get(#avg_pe)
    for(members('OMX Index'))
"""
with BQuery() as bq:
    results = bq.bql(query)
    print(results[0].head(5))

Output:

┌──────────────┬───────────┬──────────────┬────────────┬──────────────┬──────────────┬─────────────┐
│ ID           ┆ #avg_pe   ┆ REVISION_DAT ┆ AS_OF_DATE ┆ PERIOD_END_D ┆ ORIG_IDS     ┆ GICS_SECTOR │
│ ---          ┆ ---       ┆ E            ┆ ---        ┆ ATE          ┆ ---          ┆ _NAME()     │
│ str          ┆ f64       ┆ ---          ┆ date       ┆ ---          ┆ str          ┆ ---         │
│              ┆           ┆ date         ┆            ┆ date         ┆              ┆ str         │
╞══════════════╪═══════════╪══════════════╪════════════╪══════════════╪══════════════╪═════════════╡
│ Communicatio ┆ 19.561754 ┆ 2024-10-24   ┆ 2024-12-14 ┆ 2024-09-30   ┆ null         ┆ Communicati │
│ n Services   ┆           ┆              ┆            ┆              ┆              ┆ on Services │
│ Consumer Dis ┆ 19.117295 ┆ 2024-10-24   ┆ 2024-12-14 ┆ 2024-09-30   ┆ null         ┆ Consumer    │
│ cretionary   ┆           ┆              ┆            ┆              ┆              ┆ Discretiona │
│              ┆           ┆              ┆            ┆              ┆              ┆ ry          │
│ Consumer     ┆ 15.984743 ┆ 2024-10-24   ┆ 2024-12-14 ┆ 2024-09-30   ┆ ESSITYB SS   ┆ Consumer    │
│ Staples      ┆           ┆              ┆            ┆              ┆ Equity       ┆ Staples     │
│ Financials   ┆ 6.815895  ┆ 2024-10-24   ┆ 2024-12-14 ┆ 2024-09-30   ┆ null         ┆ Financials  │
│ Health Care  ┆ 22.00628  ┆ 2024-11-12   ┆ 2024-12-14 ┆ 2024-09-30   ┆ null         ┆ Health Care │
└──────────────┴───────────┴──────────────┴────────────┴──────────────┴──────────────┴─────────────┘

Axes

Get current axes of all Swedish USD AT1 bonds

# Get current axes for Swedish AT1 bonds in USD
query="""
    let(#ax=axes();)
    get(security_des, #ax)
    for(filter(bondsuniv(ACTIVE),
        crncy()=='USD' and
        basel_iii_designation() == 'Additional Tier 1' and
        country_iso() == 'SE'))
"""

with BQuery() as bq:
    results = bq.bql(query)
    print(results.combine(on="ID"))

┌───────────────┬─────────────────┬─────┬───────────┬───────────┬────────────────┬────────────────┐
│ ID            ┆ security_des    ┆ #ax ┆ ASK_DEPTH ┆ BID_DEPTH ┆ ASK_TOTAL_SIZE ┆ BID_TOTAL_SIZE │
│ ---           ┆ ---             ┆ --- ┆ ---       ┆ ---       ┆ ---            ┆ ---            │
│ str           ┆ str             ┆ str ┆ i64       ┆ i64       ┆ f64            ┆ f64            │
╞═══════════════╪═════════════════╪═════╪═══════════╪═══════════╪════════════════╪════════════════╡
│ YU819930 Corp ┆ SEB 6 ¾ PERP    ┆ Y   ┆ 2         ┆ null      ┆ 5.6e6          ┆ null           │
│ ZO703315 Corp ┆ SHBASS 4 ⅜ PERP ┆ Y   ┆ 1         ┆ 2         ┆ 5e6            ┆ 6e6            │
│ BR069680 Corp ┆ SWEDA 4 PERP    ┆ Y   ┆ null      ┆ 1         ┆ null           ┆ 3e6            │
│ ZL122341 Corp ┆ SWEDA 7 ⅝ PERP  ┆ Y   ┆ null      ┆ 6         ┆ null           ┆ 2.04e7         │
│ ZQ349286 Corp ┆ SEB 5 ⅛ PERP    ┆ Y   ┆ 2         ┆ 4         ┆ 5.5e6          ┆ 3e7            │
│ ZF859199 Corp ┆ SWEDA 7 ¾ PERP  ┆ Y   ┆ 1         ┆ 1         ┆ 2e6            ┆ 2e6            │
│ ZO703956 Corp ┆ SHBASS 4 ¾ PERP ┆ Y   ┆ 1         ┆ 3         ┆ 1.2e6          ┆ 1.1e7          │
│ BW924993 Corp ┆ SEB 6 ⅞ PERP    ┆ Y   ┆ 1         ┆ 3         ┆ 5e6            ┆ 1.1e7          │
└───────────────┴─────────────────┴─────┴───────────┴───────────┴────────────────┴────────────────┘

Axes with all columns

# RT1 Axes with all columns
query = """
let(#ax=axes();)
get(name, #ax, amt_outstanding)
for(filter(bondsuniv(ACTIVE),
    crncy() in ['USD', 'EUR'] and
    solvency_ii_designation() == 'Restricted Tier 1' and
    amt_outstanding() > 7.5e8 and
    is_axed('Bid') == True))
preferences(addcols=all)
"""

with BQuery() as bq:
    results = bq.bql(query)
    print(results.combine(on="ID"))

Output:

shape: (3, 33)
IDname#axASK_PRICEBID_PRICEASK_DEPTHBID_DEPTHASK_DEALERBID_DEALERASK_SIZEBID_SIZEASK_TOTAL_SIZEBID_TOTAL_SIZEASK_PRICE_IS_DERIVEDBID_PRICE_IS_DERIVEDASK_SPREADBID_SPREADASK_SPREAD_IS_DERIVEDBID_SPREAD_IS_DERIVEDASK_YIELDBID_YIELDASK_YIELD_IS_DERIVEDBID_YIELD_IS_DERIVEDASK_AXE_SOURCEBID_AXE_SOURCEASK_BROKERBID_BROKERASK_HIST_AGG_SIZEBID_HIST_AGG_SIZEamt_outstandingCURRENCY_OF_ISSUEMULTIPLIERCURRENCY
strstrstrf64f64i64i64strstrf64f64f64f64boolboolf64f64boolboolf64f64boolboolstrstrstrstrf64f64f64strf64str
"BM368057 Corp""ALVGR 2 ⅝ PERP""Y"88.03487.42751"BARC""IMI"1.2e61e67.2e61e6nullnull287.031300.046truetrue4.8544.976truetrue"ERUN""ERUN""BXOL""IMIC"6.68e68.92e61.2500e9"EUR"1.0"EUR"
"EK588238 Corp""ASSGEN 4.596 PERP""Y"101.0100.1346"MSAX""A2A"500000.0100000.01.556e73.83e7nullnull108.9207.889truetrue3.4664.434nulltrue"ERUN""BBX""MSAX""A2A"1.70424e73.17e71.0004e9"EUR"1.0"EUR"
"BR244025 Corp""ALVGR 3.2 PERP""Y"88.086.87534"UBS""DB"5e61e61.1e71.4e7nullnull49.33414.602truetrue7.342588.553nulltrue"ERUN""ERUN""UBSW""DABC"1.6876e63.6e71.2500e9"USD"1.0"USD"

Segments

The following example shows handling of two data-items with different length. The first dataframe describes the segments (and has length 5 in this case), while the second dataframe contains time series. One can join the dataframes on common columns and pivot the segments into columns as shown below:

# revenue per segment
query = """
    let(#segment=segment_name();
        #revenue=sales_Rev_turn(fpt=q, fpr=range(2023Q3, 2024Q3));
        )
    get(#segment, #revenue)
    for(segments('GTN US Equity',type=reported,hierarchy=PRODUCT, level=1))
"""
with BQuery() as bq:
    results = bq.bql(query)
    df = results.combine().pivot(
        index="PERIOD_END_DATE", on="#segment", values="#revenue"
    )
    print(df)

Output:

┌─────────────────┬──────────────┬──────────────────────┬────────┬────────────┐
│ PERIOD_END_DATE ┆ Broadcasting ┆ Production Companies ┆ Other  ┆ Adjustment │
│ ---             ┆ ---          ┆ ---                  ┆ ---    ┆ ---        │
│ date            ┆ f64          ┆ f64                  ┆ f64    ┆ f64        │
╞═════════════════╪══════════════╪══════════════════════╪════════╪════════════╡
│ 2023-09-30      ┆ 7.83e8       ┆ 2e7                  ┆ 1.6e7  ┆ null       │
│ 2023-12-31      ┆ 8.13e8       ┆ 3.2e7                ┆ 1.9e7  ┆ null       │
│ 2024-03-31      ┆ 7.8e8        ┆ 2.4e7                ┆ 1.9e7  ┆ null       │
│ 2024-06-30      ┆ 8.08e8       ┆ 1.8e7                ┆ 0.0    ┆ null       │
│ 2024-09-30      ┆ 9.24e8       ┆ 2.6e7                ┆ 1.7e7  ┆ null       │
└─────────────────┴──────────────┴──────────────────────┴────────┴────────────┘

Actual and Forward EPS Estimates

with BQuery() as bq:
    results = bq.bql("""
        let(#eps=is_eps(fa_period_type='A',
                        fa_period_offset=range(-4,2));)
        get(#eps)
        for(['IBM US Equity'])
    """)
    print(results[0])

┌───────────────┬───────┬───────────────┬────────────┬─────────────────┬──────────┐
│ ID            ┆ #eps  ┆ REVISION_DATE ┆ AS_OF_DATE ┆ PERIOD_END_DATE ┆ CURRENCY │
│ ---           ┆ ---   ┆ ---           ┆ ---        ┆ ---             ┆ ---      │
│ str           ┆ f64   ┆ date          ┆ date       ┆ date            ┆ str      │
╞═══════════════╪═══════╪═══════════════╪════════════╪═════════════════╪══════════╡
│ IBM US Equity ┆ 10.63 ┆ 2022-02-22    ┆ 2024-12-14 ┆ 2019-12-31      ┆ USD      │
│ IBM US Equity ┆ 6.28  ┆ 2023-02-28    ┆ 2024-12-14 ┆ 2020-12-31      ┆ USD      │
│ IBM US Equity ┆ 6.41  ┆ 2023-02-28    ┆ 2024-12-14 ┆ 2021-12-31      ┆ USD      │
│ IBM US Equity ┆ 1.82  ┆ 2024-03-18    ┆ 2024-12-14 ┆ 2022-12-31      ┆ USD      │
│ IBM US Equity ┆ 8.23  ┆ 2024-03-18    ┆ 2024-12-14 ┆ 2023-12-31      ┆ USD      │
│ IBM US Equity ┆ 7.891 ┆ 2024-12-13    ┆ 2024-12-14 ┆ 2024-12-31      ┆ USD      │
│ IBM US Equity ┆ 9.236 ┆ 2024-12-13    ┆ 2024-12-14 ┆ 2025-12-31      ┆ USD      │
└───────────────┴───────┴───────────────┴────────────┴─────────────────┴──────────┘

Average issuer OAS spread per maturity bucket

# Example: Average OAS-spread per maturity bucket
query = """
let(
    #bins = bins(maturity_years,
                 [3,9,18,30],
                 ['(1) 0-3','(2) 3-9','(3) 9-18','(4) 18-30','(5) 30+']);
    #average_spread = avg(group(spread(st=oas),#bins));
)
get(#average_spread)
for(filter(bonds('NVDA US Equity', issuedby = 'ENTITY'),
           maturity_years != NA))
"""

with BQuery() as bq:
    results = bq.bql(query)
    print(results[0])

Output:

┌───────────┬─────────────────┬────────────┬───────────────┬───────────┐
│ ID        ┆ #average_spread ┆ DATE       ┆ ORIG_IDS      ┆ #BINS     │
│ ---       ┆ ---             ┆ ---        ┆ ---           ┆ ---       │
│ str       ┆ f64             ┆ date       ┆ str           ┆ str       │
╞═══════════╪═════════════════╪════════════╪═══════════════╪═══════════╡
│ (1) 0-3   ┆ 31.195689       ┆ 2024-12-14 ┆ QZ552396 Corp ┆ (1) 0-3   │
│ (2) 3-9   ┆ 59.580383       ┆ 2024-12-14 ┆ null          ┆ (2) 3-9   │
│ (3) 9-18  ┆ 110.614416      ┆ 2024-12-14 ┆ BH393780 Corp ┆ (3) 9-18  │
│ (4) 18-30 ┆ 135.160279      ┆ 2024-12-14 ┆ BH393781 Corp ┆ (4) 18-30 │
│ (5) 30+   ┆ 150.713405      ┆ 2024-12-14 ┆ BH393782 Corp ┆ (5) 30+   │
└───────────┴─────────────────┴────────────┴───────────────┴───────────┘

Technical Analysis: stocks with 20d EMA > 200d EMA and RSI > 53

with BQuery() as bq:
    results = bq.bql(
        """
        let(#ema20=emavg(period=20);
            #ema200=emavg(period=200);
            #rsi=rsi(close=px_last());)
        get(name(), #ema20, #ema200, #rsi)
        for(filter(members('OMX Index'),
                    and(#ema20 > #ema200, #rsi > 53)))
        with(fill=PREV)
        """
    )
    df = results.combine(on="ID").select("ID", "name()", "#ema20", "#ema200", "#rsi")
    print(df.head())

Output:

shape: (5, 5)
┌─────────────────┬────────────────────────────────┬─────────────┬─────────────┬───────────┐
│ ID              ┆ name()                         ┆ #ema20      ┆ #ema200     ┆ #rsi      │
│ ---             ┆ ---                            ┆ ---         ┆ ---         ┆ ---       │
│ str             ┆ str                            ┆ f64         ┆ f64         ┆ f64       │
╞═════════════════╪════════════════════════════════╪═════════════╪═════════════╪═══════════╡
│ ASSAB SS Equity ┆ Assa Abloy AB                  ┆ 385.478874  ┆ 355.198037  ┆ 66.686416 │
│ ATCOA SS Equity ┆ Atlas Copco AB                 ┆ 191.123926  ┆ 190.067657  ┆ 53.146331 │
│ AZN SS Equity   ┆ AstraZeneca PLC                ┆ 1789.335794 ┆ 1672.637661 ┆ 73.714405 │
│ EQT SS Equity   ┆ EQT AB                         ┆ 309.20166   ┆ 308.380981  ┆ 63.29927  │
│ ERICB SS Equity ┆ Telefonaktiebolaget LM Ericsso ┆ 104.852083  ┆ 100.467523  ┆ 58.089387 │
└─────────────────┴────────────────────────────────┴─────────────┴─────────────┴───────────┘

Bond Universe from Equity Ticker

# Get Bond Universe from Equity Ticker
query = """
let(#rank=normalized_payment_rank();
    #oas=spread(st=oas);
    #nxt_call=nxt_call_dt();
    )
get(name(), #rank, #nxt_call, #oas)
for(filter(bonds('GTN US Equity'), series() == '144A'))
"""

with BQuery() as bq:
    results = bq.bql(query)
    df = results.combine(on="ID")
    print(df)

Output:

┌───────────────┬───────────────────┬──────────────────┬────────────┬────────────┬────────────┐
│ ID            ┆ name()            ┆ #rank            ┆ #nxt_call  ┆ #oas       ┆ DATE       │
│ ---           ┆ ---               ┆ ---              ┆ ---        ┆ ---        ┆ ---        │
│ str           ┆ str               ┆ str              ┆ date       ┆ f64        ┆ date       │
╞═══════════════╪═══════════════════╪══════════════════╪════════════╪════════════╪════════════╡
│ YX231113 Corp ┆ GTN 10 ½ 07/15/29 ┆ 1st Lien Secured ┆ 2026-07-15 ┆ 598.66491  ┆ 2024-12-17 │
│ BS116983 Corp ┆ GTN 5 ⅜ 11/15/31  ┆ Sr Unsecured     ┆ 2026-11-15 ┆ 1193.17529 ┆ 2024-12-17 │
│ AV438089 Corp ┆ GTN 7 05/15/27    ┆ Sr Unsecured     ┆ 2024-12-24 ┆ 400.340456 ┆ 2024-12-17 │
│ ZO860846 Corp ┆ GTN 4 ¾ 10/15/30  ┆ Sr Unsecured     ┆ 2025-10-15 ┆ 1249.34346 ┆ 2024-12-17 │
│ LW375188 Corp ┆ GTN 5 ⅞ 07/15/26  ┆ Sr Unsecured     ┆ 2025-01-13 ┆ 173.761744 ┆ 2024-12-17 │
└───────────────┴───────────────────┴──────────────────┴────────────┴────────────┴────────────┘

Bonds Total Returns

This is example of a single-item query returning total return for all GTN bonds in a long dataframe. We can easily pivot it into wide format, as in the example below

# Total Return of GTN Bonds
query = """
let(#rng = range(-1M, 0D);
    #rets = return_series(calc_interval=#rng,per=W);)
get(#rets)
for(filter(bonds('GTN US Equity'), series() == '144A'))
"""

with BQuery() as bq:
    results = bq.bql(query)
    df = results[0].pivot(on="ID", index="DATE", values="#rets")
    print(df)

Output:

shape: (6, 6)
┌────────────┬───────────────┬───────────────┬───────────────┬───────────────┬───────────────┐
│ DATE       ┆ YX231113 Corp ┆ BS116983 Corp ┆ AV438089 Corp ┆ ZO860846 Corp ┆ LW375188 Corp │
│ ---        ┆ ---           ┆ ---           ┆ ---           ┆ ---           ┆ ---           │
│ date       ┆ f64           ┆ f64           ┆ f64           ┆ f64           ┆ f64           │
╞════════════╪═══════════════╪═══════════════╪═══════════════╪═══════════════╪═══════════════╡
│ 2024-11-17 ┆ null          ┆ null          ┆ null          ┆ null          ┆ null          │
│ 2024-11-24 ┆ 0.001653      ┆ 0.051179      ┆ 0.020363      ┆ 0.001371      ┆ -0.002939     │
│ 2024-12-01 ┆ 0.002837      ┆ 0.010405      ┆ -0.001466     ┆ 0.007275      ┆ 0.000581      │
│ 2024-12-08 ┆ -0.000041     ┆ 0.016145      ┆ 0.000766      ┆ 0.024984      ┆ 0.000936      │
│ 2024-12-15 ┆ 0.001495      ┆ -0.047        ┆ -0.000233     ┆ -0.043509     ┆ 0.002241      │
│ 2024-12-17 ┆ 0.00008       ┆ -0.000004     ┆ -0.0035       ┆ -0.007937     ┆ 0.000064      │
└────────────┴───────────────┴───────────────┴───────────────┴───────────────┴───────────────┘

Maturity Wall for US HY Bonds

query = """
let(#mv=sum(group(amt_outstanding(currency=USD),
                  by=[year(maturity()), industry_sector()]));)
get(#mv)
for(members('LF98TRUU Index'))
"""
with BQuery() as bq:
    results = bq.bql(query)
df = results.combine().rename(
    {"YEAR(MATURITY())": "maturity", "INDUSTRY_SECTOR()": "sector", "#mv": "mv"}
)

print(df.pivot(index="maturity", on="sector", values="mv").head())

Output:

shape: (5, 11)
┌──────────┬───────────┬───────────┬───────────┬───┬───────────┬───────────┬───────────┬───────────┐
│ maturity ┆ Basic     ┆ Consumer, ┆ Energy    ┆ … ┆ Financial ┆ Technolog ┆ Utilities ┆ Diversifi │
│ ---      ┆ Materials ┆ Non-cycli ┆ ---       ┆   ┆ ---       ┆ y         ┆ ---       ┆ ed        │
│ i64      ┆ ---       ┆ cal       ┆ f64       ┆   ┆ f64       ┆ ---       ┆ f64       ┆ ---       │
│          ┆ f64       ┆ ---       ┆           ┆   ┆           ┆ f64       ┆           ┆ f64       │
│          ┆           ┆ f64       ┆           ┆   ┆           ┆           ┆           ┆           │
╞══════════╪═══════════╪═══════════╪═══════════╪═══╪═══════════╪═══════════╪═══════════╪═══════════╡
│ 2025     ┆ 1.5e8     ┆ 5.34916e8 ┆ 5e8       ┆ … ┆ null      ┆ null      ┆ null      ┆ null      │
│ 2026     ┆ 4.4013e9  ┆ 9.3293e9  ┆ 8.2931e9  ┆ … ┆ 1.3524e10 ┆ 4.0608e9  ┆ 2.5202e9  ┆ null      │
│ 2027     ┆ 8.3921e9  ┆ 2.3409e10 ┆ 1.2427e10 ┆ … ┆ 1.9430e10 ┆ 4.3367e9  ┆ 3.6620e9  ┆ null      │
│ 2028     ┆ 1.4701e10 ┆ 3.7457e10 ┆ 2.2442e10 ┆ … ┆ 2.3341e10 ┆ 9.9143e9  ┆ 7.6388e9  ┆ 5e8       │
│ 2029     ┆ 1.6512e10 ┆ 5.7381e10 ┆ 3.9286e10 ┆ … ┆ 4.2337e10 ┆ 2.2660e10 ┆ 5.8558e9  ┆ null      │
└──────────┴───────────┴───────────┴───────────┴───┴───────────┴───────────┴───────────┴───────────┘

Errors, Warnings and Empty Results

What happened What you get
Bloomberg rejects or fails a request: a bad argument, an unknown security in bdib, a failed search in bsrch BloombergError with Bloomberg's message and category, for example Response error: No securities specified (BAD_ARGS). It is a subclass of ValueError.
The session is not started, cannot start, or is lost ConnectionError
Bloomberg sends nothing for timeout milliseconds TimeoutError
An invalid security or field in bdp or bdh No exception. An invalid security is a row of nulls in bdp and has no rows in bdh; an invalid field is a column of nulls. One warning per call lists them.
A BQL query that fails, for example on a syntax error An empty BqlResult; the message is logged and kept in result.errors, and combine() raises ValueError with it.
A BQL screen that matches nothing The same empty BqlResult; Bloomberg's "No results match ..." is logged as a warning, not an error, and kept in result.errors.
No data, for example bdh over a weekend An empty DataFrame that still has its columns

Warnings go through Python's logging (logger polars_bloomberg.plbbg); with no logging set up, Python prints them to stderr:

with BQuery() as bq:
    df = bq.bdp(["IBM US Equity", "NOT A SECURITY Equity"], ["PX_LAST", "NOT_A_FIELD"])

Bloomberg reported 2 error(s):
  IBM US Equity / NOT_A_FIELD: Field not valid (BAD_FLD)
  NOT A SECURITY Equity: Unknown/Invalid Security  [nid:…] (BAD_SEC)

An empty result keeps its columns; field columns without values have dtype null:

with BQuery() as bq:
    df = bq.bdh("IBM US Equity", "PX_LAST", date(2026, 11, 14), date(2026, 11, 15))
    print(df)

shape: (0, 3)
┌──────────┬──────┬─────────┐
│ security ┆ date ┆ PX_LAST │
│ ---      ┆ ---  ┆ ---     │
│ str      ┆ date ┆ null    │
╞══════════╪══════╪═════════╡
└──────────┴──────┴─────────┘

A BQL error does not raise; check result.errors:

with BQuery() as bq:
    result = bq.bql("get(px_last) for(['IBM US Equity'")  # missing ")"

>>> len(result)
0
>>> result.errors
["Error: Unable to parse request at '(['IBM US Equity''."]

Options of BQuery:

  • timeout (default 32000) is the longest wait, in milliseconds, for the next message from Bloomberg; it is not a limit on the whole request. 0 waits forever. Slow BQL queries may need more than the default.
  • debug=True writes every request and the raw messages Bloomberg sent back to a JSON file in debug_cases/, also when the request fails; debug="some/dir" writes to that directory. Attach such a file to a bug report, after checking that you may share the data in it.

Without a with block, for example to keep one connection for a whole notebook:

bq = BQuery().start()
df = bq.bdp("IBM US Equity", "PX_LAST")
bq.stop()  # safe to call twice

Threads: one BQuery must not be used from several threads at once. Give each thread its own BQuery.

Developing

Want to fix a bug or add a feature? The developer guide shows how a call flows through the one source file, which Bloomberg quirks the code handles, and how to turn a failing case into an offline test. No Bloomberg Terminal is needed to run the tests.

Additional Documentation & Resources

Metadata

Release files for polars-bloomberg 0.7.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for polars-bloomberg 0.7.2
File Size Uploaded Provenance Actions
polars_bloomberg-0.7.2.tar.gz 65.4 kB Without provenance Details for polars_bloomberg-0.7.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for polars-bloomberg 0.7.2
File Interpreter ABI Platform Actions
polars_bloomberg-0.7.2-py3-none-any.whl Python 3 none any Details for polars_bloomberg-0.7.2-py3-none-any.whl

Total release size: 104.4 kB

Release files / polars_bloomberg-0.7.2.tar.gz

Download URL polars_bloomberg-0.7.2.tar.gz
Size 65.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d22d1c8b0d52e5ea206edc4b2722e903e6e20fc773402fdc62b96d3ff52fd229
BLAKE2b-256 checksum
How to use checksums
35104e69997a4f6d108804b4bfc716caea54d24e097b2bfcfbac0b8e468af6d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / polars_bloomberg-0.7.2-py3-none-any.whl

Download URL polars_bloomberg-0.7.2-py3-none-any.whl
Size 39.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3a37aa807b871d709d62a83d66537aaf2ccec015c0515d19e3d1ad05f8a8168c
BLAKE2b-256 checksum
How to use checksums
11855f4a8a50bb5933b8f10bd0c5022b3ae2fe27d08a088366a5d621b1bc2ef4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for polars-bloomberg 0.7.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page