eolas-data 1.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,214 @@
1
+ Metadata-Version: 2.4
2
+ Name: eolas-data
3
+ Version: 1.2.0
4
+ Summary: Python client for the eolas.fyi statistical data API (NZ, Australia, OECD)
5
+ Project-URL: Homepage, https://eolas.fyi
6
+ Project-URL: Documentation, https://phildonovan.github.io/vswarehouse-docs/
7
+ Project-URL: Repository, https://github.com/phildonovan/eolas-data
8
+ Project-URL: Bug Tracker, https://github.com/phildonovan/eolas-data/issues
9
+ Author-email: Virtus Solutions <phil@virtus-solutions.io>
10
+ License: MIT
11
+ Keywords: api,australia,economics,eolas,new-zealand,statistics
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Intended Audience :: Science/Research
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Programming Language :: Python :: 3
17
+ Classifier: Programming Language :: Python :: 3.10
18
+ Classifier: Programming Language :: Python :: 3.11
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Classifier: Programming Language :: Python :: 3.13
21
+ Classifier: Topic :: Scientific/Engineering
22
+ Requires-Python: >=3.10
23
+ Requires-Dist: pandas>=1.5
24
+ Requires-Dist: requests>=2.28
25
+ Provides-Extra: cli
26
+ Requires-Dist: rich>=13; extra == 'cli'
27
+ Requires-Dist: typer>=0.12; extra == 'cli'
28
+ Provides-Extra: dev
29
+ Requires-Dist: geopandas>=0.14; extra == 'dev'
30
+ Requires-Dist: pandas; extra == 'dev'
31
+ Requires-Dist: pytest; extra == 'dev'
32
+ Requires-Dist: responses; extra == 'dev'
33
+ Requires-Dist: rich>=13; extra == 'dev'
34
+ Requires-Dist: shapely>=2.0; extra == 'dev'
35
+ Requires-Dist: typer>=0.12; extra == 'dev'
36
+ Provides-Extra: geo
37
+ Requires-Dist: geopandas>=0.14; extra == 'geo'
38
+ Requires-Dist: shapely>=2.0; extra == 'geo'
39
+ Provides-Extra: plot
40
+ Requires-Dist: matplotlib>=3.5; extra == 'plot'
41
+ Provides-Extra: polars
42
+ Requires-Dist: polars>=0.20; extra == 'polars'
43
+ Description-Content-Type: text/markdown
44
+
45
+ # eolas-data
46
+
47
+ Python client for the [eolas.fyi](https://eolas.fyi) statistical data API — 717+ datasets across NZ, Australia, OECD, and more, served as tidy `pandas` DataFrames (or `polars` / `geopandas` if you prefer).
48
+
49
+ ```bash
50
+ pip install eolas-data
51
+ ```
52
+
53
+ ## Quickstart
54
+
55
+ ```python
56
+ from eolas_data import Client
57
+
58
+ client = Client("your_api_key") # or set EOLAS_API_KEY in env
59
+
60
+ # Generic
61
+ df = client.get("nz_cpi", start="2020-01-01")
62
+
63
+ # Source-specific (sets the `eolas_source` metadata)
64
+ df = client.statsnz("nz_cpi")
65
+ df = client.oecd("nz_gdp_production_annual")
66
+
67
+ # Discovery
68
+ all_datasets = client.list()
69
+ nz_only = client.list("Stats NZ")
70
+ meta = client.info("nz_cpi")
71
+ ```
72
+
73
+ Get an API key at <https://eolas.fyi/signup>. Free plan is 10 requests/month; Starter is 100; Pro is unlimited.
74
+
75
+ ## Command-line interface
76
+
77
+ `pip install eolas-data[cli]` adds an `eolas` command for browsing, fetching, and
78
+ scheduling — useful for shell scripts, cron jobs, and AI-agent workflows. Output
79
+ auto-detects piping: rich tables in a terminal, newline-delimited JSON when
80
+ stdout is piped.
81
+
82
+ ```bash
83
+ # one-time setup
84
+ eolas auth set-key
85
+ eolas health
86
+
87
+ # discover
88
+ eolas datasets list --source "Stats NZ"
89
+ eolas datasets list --search cpi --json | jq '.[].name'
90
+ eolas datasets info nz_cpi
91
+ eolas datasets preview nz_cpi --limit 5
92
+
93
+ # fetch (verb matches the Python lib's client.get())
94
+ eolas get nz_cpi --format csv > cpi.csv
95
+ eolas get nz_cpi --start 2020-01-01 --format json | jq '.[].value'
96
+ eolas get sa2_2023 --format parquet --out sa2.parquet
97
+ ```
98
+
99
+ ### Scheduling
100
+
101
+ Set up recurring fetches without touching crontab/Task Scheduler syntax. Works
102
+ on Linux, macOS (cron), and Windows (Task Scheduler).
103
+
104
+ ```bash
105
+ eolas schedule add nz_cpi --daily --out ~/data/cpi.csv
106
+ eolas schedule add nz_gdp --weekly --out ~/data/gdp.csv
107
+ eolas schedule add nzd_usd --cron "0 */6 * * *" --out ~/data/fx.csv # POSIX only
108
+
109
+ eolas schedule list
110
+ eolas schedule remove nz_cpi
111
+ ```
112
+
113
+ Daily is the default. Pre-flight check refuses to install a schedule unless
114
+ your API key is configured (otherwise the job would fail silently forever).
115
+
116
+ ### Integrations (Enterprise plan)
117
+
118
+ Generate ready-to-run connector configs for popular data-pipeline tools — eolas
119
+ becomes a one-command source for Meltano, Fivetran, or Azure Data Factory.
120
+
121
+ ```bash
122
+ eolas integrate meltano --datasets nz_cpi,nz_gdp --output ./my-pipeline/
123
+ eolas integrate fivetran --datasets nz_cpi
124
+ eolas integrate azure-data-factory --datasets nz_cpi,nz_gdp
125
+ ```
126
+
127
+ The generated directory has everything needed to plug into your destination
128
+ warehouse: `meltano.yml`, `fivetran.yml`, or ADF JSON resources, plus a `README.md`
129
+ walking through the rest of the setup. Non-Enterprise users see a clear
130
+ upgrade pointer; the gating lives server-side so the capability is bypass-proof.
131
+
132
+ ### Exit codes
133
+
134
+ Distinct exit codes per error class, for shell scripts and agents:
135
+
136
+ | Code | Meaning |
137
+ |---|---|
138
+ | `0` | Success |
139
+ | `1` | Generic error |
140
+ | `2` | Auth (`AuthenticationError`, including Enterprise-gate 403) |
141
+ | `3` | Rate limit hit |
142
+ | `4` | Dataset / resource not found |
143
+ | `5` | Other API error |
144
+ | `64` | Bad usage (mirrors `sysexits.h`) |
145
+
146
+ ## Geospatial
147
+
148
+ Datasets with a `geometry_wkt` column auto-convert to `geopandas.GeoDataFrame` if `geopandas` is installed:
149
+
150
+ ```bash
151
+ pip install eolas-data[geo]
152
+ ```
153
+
154
+ ```python
155
+ gdf = client.get("nz_addresses") # GeoDataFrame
156
+ df = client.get("nz_addresses", as_geo=False) # plain DataFrame, WKT preserved
157
+ ```
158
+
159
+ ## Polars
160
+
161
+ ```bash
162
+ pip install eolas-data[polars]
163
+ ```
164
+
165
+ ```python
166
+ df = client.get("nz_cpi", engine="polars")
167
+ ```
168
+
169
+ ## Plotting
170
+
171
+ ```bash
172
+ pip install eolas-data[plot]
173
+ ```
174
+
175
+ ```python
176
+ df = client.statsnz("nz_cpi")
177
+ df.plot_dataset()
178
+ ```
179
+
180
+ ## Type stubs
181
+
182
+ Dataset names are exposed as a `Literal` so IDEs autocomplete the catalog:
183
+
184
+ ```python
185
+ from eolas_data import Client
186
+
187
+ client = Client()
188
+ client.get("nz_") # autocomplete shows nz_cpi, nz_gdp_production_annual, ...
189
+ ```
190
+
191
+ The list is regenerated from the live API at release time. Passing a name not in the snapshot still works at runtime — the type hint just won't autocomplete it. Catalog snapshot date is exposed as `eolas_data._dataset_names.CATALOG_SNAPSHOT_DATE`.
192
+
193
+ ## Migrating from `vswarehouse`
194
+
195
+ The previous package name was `vswarehouse`. Direct equivalents:
196
+
197
+ | `vswarehouse` | `eolas_data` |
198
+ |---|---|
199
+ | `from vswarehouse import Client, VSeries` | `from eolas_data import Client, Dataset` |
200
+ | `df.vs_name`, `df.vs_source` | `df.eolas_name`, `df.eolas_source` |
201
+ | `df.plot_series()` | `df.plot_dataset()` |
202
+ | `VS_API_KEY` env var | `EOLAS_API_KEY` (legacy `VS_API_KEY` still honoured) |
203
+
204
+ The API surface is otherwise identical. The default base URL is now `https://api.eolas.fyi` (the old `https://api.virtus-solutions.io` still 301-redirects and works fine — but uses the legacy endpoint shape).
205
+
206
+ ## Releasing
207
+
208
+ See [`docs/clients.md`](https://github.com/phildonovan/eolas/blob/master/docs/clients.md) in the eolas data repo for the tagged-release flow and PyPI token rotation.
209
+
210
+ Before each release: `python -m eolas_data._regen_names` to refresh the dataset name stubs from the live API, commit the change, then tag and push.
211
+
212
+ ## License
213
+
214
+ MIT
@@ -0,0 +1,12 @@
1
+ eolas_data/__init__.py,sha256=Eyh7hmKgC49Bgld0a5iyIUHOpqyanub_k_cLGCfWJLM,399
2
+ eolas_data/_dataset_names.py,sha256=I02iGDzm96XQtv6_r7yiEJ5BwFoO7K78yZMgMwFeygQ,48831
3
+ eolas_data/_regen_names.py,sha256=zpU3_C19DT8LZC09VZuVK_-D9tVGtPa5x8DLEO5flwM,1898
4
+ eolas_data/cli.py,sha256=xDwTYIbHTKKCijh7Lj-v6px2SwsFcEBdk5lRZonbwPw,26432
5
+ eolas_data/client.py,sha256=2TrJRGqyO6ZbUSMU94N1fEBC2ffAI7oiRDIMssRRhfU,12976
6
+ eolas_data/dataset.py,sha256=Yw7JoiPbuCkDH06HicAkxmseFnZ94Iqia-wyJXk7BlY,2208
7
+ eolas_data/exceptions.py,sha256=AJXOgymkMFqQP4Q_zdfkkGs2lrOCUpB_1xbWRquGnec,404
8
+ eolas_data/schedule.py,sha256=3npQ9fWg7pU_Ll1wmsA-z3zLdMCXtQTcW-yF68-k__Q,10106
9
+ eolas_data-1.2.0.dist-info/METADATA,sha256=t7V4pcupoDWidhpCsxv45Rx3XxwAwAl4AkNLOOiFWy4,7020
10
+ eolas_data-1.2.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
11
+ eolas_data-1.2.0.dist-info/entry_points.txt,sha256=RKhA3k4kfBLH5S7Rvep2j6B_eKiEHlY70MXxJfvVNVo,45
12
+ eolas_data-1.2.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.29.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ eolas = eolas_data.cli:app