Heisse Preise Data
Project Overview
This project provides compressed datasets derived from heisse-preise.io, offering an easy and efficient way to access up-to-date pricing data from supermarkets in Austria.
Data Sources
The data originates from:
Build Process
- The dataset is built daily to ensure the latest pricing data is available.
- The most recent build can be downloaded from the following link:
https://github.com/falknerdominik/heisse-preise-data/releases/latest/download/latest-canonical.tar.gz
Usage Examples
Download and Extract Data
Python Package
- No dependencies
- Minimal python version should be 3.6
- Package: https://pypi.org/project/heisse-preise-data
pip install heisse-preise-data
from heisse_preise_data import download
try:
raw = download()
print(json.dumps(raw, indent=2))
except RuntimeError as e:
print(f"An error occurred: {e}")
from heisse_preise_data import download
import pandas as pd
try:
data = pd.DataFrame(download())
data.head(5)
except RuntimeError as e:
print(f"An error occurred: {e}")
Python Example
import requests
import tarfile
import io
import json
url = 'https://github.com/falknerdominik/heisse-preise-data/releases/latest/download/latest-canonical.tar.gz'
json_filename = 'latest-canonical.json'
try:
# Download the tar.gz file into memory
response = requests.get(url)
response.raise_for_status()
# Open the tar.gz file directly from memory
with tarfile.open(fileobj=io.BytesIO(response.content), mode='r:gz') as tar:
# Extract and read the JSON file directly from the tar archive
json_file = tar.extractfile(json_filename)
if json_file:
json_data = json.load(json_file)
print(json.dumps(json_data, indent=2))
else:
print(f"{json_filename} not found in the archive.")
except requests.RequestException as e:
print(f"Error downloading data: {e}")
except (tarfile.TarError, json.JSONDecodeError) as e:
print(f"Error processing files: {e}")
JavaScript Example (Node.js)
const https = require('https');
const fs = require('fs');
const tar = require('tar');
const url = 'https://github.com/falknerdominik/heisse-preise-data/releases/latest/download/latest-canonical.tar.gz';
https.get(url, (response) => {
const file = fs.createWriteStream('latest-canonical.tar.gz');
response.pipe(file);
file.on('finish', () => {
file.close();
tar.x({ file: 'latest-canonical.tar.gz' }).then(() => {
fs.readFile('latest-canonical.json', (err, data) => {
if (err) throw err;
const jsonData = JSON.parse(data);
console.log(JSON.stringify(jsonData, null, 2));
});
});
});
}).on('error', (err) => {
console.error(Error downloading data: ${err.message});
});
Contributing
If you wish to contribute or improve the project, feel free to open an issue or submit a pull request.
Build
python -m build
License
This project is licensed under the terms provided by the original data sources.
Metadata
Release files for heisse-preise-data 1.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| heisse_preise_data-1.0.3.tar.gz | 4.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| heisse_preise_data-1.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.7 kB
Release files / heisse_preise_data-1.0.3.tar.gz
| Download URL | heisse_preise_data-1.0.3.tar.gz |
|---|---|
| Size | 4.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
390324ba9766862cc60616f9bb4b0b2c35fa8ceb72546aa83f75b4c14e9b7901
|
|
BLAKE2b-256 checksum How to use checksums |
365d730d494c88a5f8f4ba5e962a5b89e8f023d3b23ae7190925456642eb3824
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Release files / heisse_preise_data-1.0.3-py3-none-any.whl
| Download URL | heisse_preise_data-1.0.3-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fea29499eaca8a2cc14f21400c9523697dc54748ab23fbf374aca479f3b43160
|
|
BLAKE2b-256 checksum How to use checksums |
94ef2744b9c00422ffae152d7e896f9ec227760eb9b2cd2aadd25b52973a554a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|