nixtla
Python SDK for Nixtla API (TimeGPT)
What it is and what it does
Nixtla is a Python client for TimeGPT, a transformer-based foundation model trained specifically for time series analysis. It provides a low-code interface to forecast future values and detect anomalies in time series data across domains like retail, electricity, finance, and IoT. The package wraps an external API, so you instantiate a client with an API key, pass your data as a pandas DataFrame, and call methods like `forecast()` or `detect_anomalies()` to get results.
The model works zero-shot—it requires no prior training on your specific data—and supports fine-tuning, exogenous variables, prediction intervals, cross-validation, and irregular timestamps. It depends on pandas for data handling, pydantic for configuration, httpx for HTTP calls, tenacity for retry logic, and several utility packages. The package also supports Snowflake deployment via optional extras.
Use it for:
- Forecast electricity demand or retail sales for the next 24 hours with confidence intervals.
- Detect anomalies in IoT sensor streams or financial time series without labeled training data.
- Fine-tune TimeGPT on domain-specific historical data to improve accuracy for your particular use case.
- Integrate forecasting into a web application via the Python SDK without building a custom model.
- Run forecasting directly in Snowflake using stored procedures without exporting data.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Python SDK for accessing TimeGPT, a foundation model for time series forecasting and anomaly detection via API.
Yes, if you need time series forecasting or anomaly detection and have access to an API key. The low install friction, active maintenance, permissive license, and zero-shot capability make it a practical choice for rapid prototyping. The external API dependency and lack of offline capability are trade-offs; verify cost and rate limits before production use.
Install
nixtla on PyPI
pip
pip install nixtlauv
uv add nixtlapoetry
poetry add nixtlaInstalling nixtla
Before you install
Low install friction with a pure Python wheel and nine runtime dependencies. The project is actively maintained with recent releases and 3987 GitHub stars, indicating stable ongoing development.
License in practice
Licensed under Apache Software License 2.0 (permissive), allowing commercial use, modification, and distribution with minimal restrictions.
Quickstart
pip install nixtla>=0.7.0
import pandas as pd
from nixtla import NixtlaClient
nixtla_client = NixtlaClient(api_key='YOUR_API_KEY')
df = pd.read_csv('your_timeseries.csv')
fcst_df = nixtla_client.forecast(df, h=24)
Requires a valid API key from Nixtla (available via free trial at nixtla.io). The package cannot function offline without access to the TimeGPT API.
Verify before relying
- Whether the API key requirement and external service dependency impose practical limitations for offline or air-gapped deployments.
- Performance characteristics and latency expectations when calling the remote TimeGPT API.
- Cost structure and rate limits for API usage beyond the free trial tier.
Package facts
| License | Apache Software License 2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 9 — annotated-types, httpx, narwhals, orjson, pandas, pydantic, tenacity, tqdm, utilsforecast |
| Maintenance | actively maintained — 24 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 125,589/month — #11,808 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: nixtla-0.8.0-py3-none-any.whl
Keywords: time-series, forecasting, gpt
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
neuralforecastNeuralForecast provides a collection of neural…
permissive · top 15,000 on PyPI
sktimesktime provides a unified interface for time…
permissive · top 5,000 on PyPI
statsforecastStatsForecast provides fast implementations of…
permissive · top 5,000 on PyPI
timesfmTimesFM is a pretrained time-series foundation…
permissive · top 15,000 on PyPI
coreforecastProvides fast C++ implementations of…
permissive · top 5,000 on PyPI
adtkADTK provides detectors, transformers, and…
copyleft · top 15,000 on PyPI
chronos-forecastingChronos provides pretrained transformer-based…
permissive · top 15,000 on PyPI
tbatsImplements BATS and TBATS exponential smoothing…
permissive · top 15,000 on PyPI
asknewsPython SDK for the AskNews API that retrieves…
permissive · top 15,000 on PyPI
anomaloProvides a Python client library and…
permissive · top 15,000 on PyPI