Skip to main content

Python client for the vs-warehouse statistical data API

Project description

vswarehouse

Python client for the vs-warehouse statistical data API — macro and economic time series for New Zealand, Australia, and more.

Installation

pip install vswarehouse

Quick start

from vswarehouse import Client

client = Client("vs_your_api_key")

# List all available series
series = client.list()

# Get metadata for a series
meta = client.info("nz_cpi")

# Fetch data as a pandas DataFrame
df = client.get("nz_cpi", start="2020-01-01")
print(df.head())

Authentication

Pass your key directly or set the VS_API_KEY environment variable:

export VS_API_KEY=vs_your_api_key
client = Client()  # reads VS_API_KEY automatically

Get a free API key at api.virtus-solutions.io.

API reference

Client(api_key, base_url)

Method Returns Description
list() list[dict] All available series with metadata
info(name) dict Metadata for a single series
get(name, start, end, format) DataFrame Time-series data

get() parameters

Param Type Description
name str Series identifier, e.g. "nz_cpi"
start str ISO date lower bound, e.g. "2020-01-01"
end str ISO date upper bound
format str "json" (default) or "csv"

Exceptions

Exception When
AuthenticationError Invalid or inactive API key
RateLimitError Daily free-tier limit reached
NotFoundError Series not found
APIError Other HTTP errors

License

MIT

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

vswarehouse-0.2.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vswarehouse-0.2.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file vswarehouse-0.2.0.tar.gz.

File metadata

  • Download URL: vswarehouse-0.2.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for vswarehouse-0.2.0.tar.gz
Algorithm Hash digest
SHA256 1125252cc7c4a7a115f6a33e0a762b8c13dd32197d3b81e6fa714f49b989521c
MD5 5d0bbd43f579859fbbd69704384790fc
BLAKE2b-256 1ef5378c7554ed591fec8be781eba13a9aaa8f6b47651a70262db38a2345b580

See more details on using hashes here.

File details

Details for the file vswarehouse-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: vswarehouse-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for vswarehouse-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 06187d4bae9ba644f04f07617bc82d9a941465931dea6e60a7f1bd736a844d17
MD5 2726a5f6bca316efb8761ac9ae54aaeb
BLAKE2b-256 efb435d4c47bf23c1630d6dae0b2d8125d575e14a1f4b13d5d7978a0b41676ac

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