Metadata-Version: 2.1
Name: pxwebpy
Version: 0.1.2
Summary: Get data from PxWeb API easily.
Home-page: https://github.com/stefur/pxwebpy/
License: MIT
Keywords: pxweb,statistics,dataframes,pandas,polars
Author: stefur
Author-email: stefan@furne.net
Requires-Python: >=3.11,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: requests (==2.31)
Project-URL: Issue tracker, https://github.com/stefur/pxwebpy/issues
Project-URL: Repository, https://github.com/stefur/pxwebpy/
Description-Content-Type: text/markdown

# pxwebpy
[![ci](https://github.com/stefur/pxwebpy/actions/workflows/ci.yml/badge.svg)](https://github.com/stefur/pxwebpy/actions/workflows/ci.yml)
[![release](https://github.com/stefur/pxwebpy/actions/workflows/release.yml/badge.svg?event=release)](https://github.com/stefur/pxwebpy/actions/workflows/release.yml)   
Easily get data from the PxWeb API and into either a polars or pandas dataframe.  
  
Pxwebpy parses the PxWeb table data as well as metadata using the json-stat2 response format. 
  
It has been tested with [Statistics Sweden](https://scb.se), [Statistics Finland](https://www.stat.fi), [Statistics Greenland](https://stat.gl) and [Statistics Norway](https://www.ssb.no).  

## Basic usage
```python
import pandas as pd
import polars as pl

from pxwebpy import PxWeb

some_px_table = PxWeb(url, query)

pandas_df = pd.DataFrame(some_px_table.dataset)

polars_df = pl.DataFrame(some_px_table.dataset)
```

See [examples](examples/example.py) for more details on how to use pxwebpy.
