Skip to main content

Handles reading queries and writing GarfReport from garf-core package

Project description

garf-io - Writing GarfReport to anywhere

PyPI Downloads PyPI

garf-io handles reading queries and writing GarfReport to various local/remote storages.

Currently it supports writing data to the following destination:

identifier Writer Options
console ConsoleWriter page-size=10,format=table|json
csv CsvWriter destination-folder
json JsonWriter destination-folder
bq BigQueryWriter project, dataset, location, write-disposition
sqldb SqlAlchemyWriter connection-string, if-exists=fail|replace|append
sheets SheetsWriter share-with, credentials-file, spreadsheet-url, is_append=True|False

Installation

pip install garf-io

By default garf-io has only support for console, csv and json writers.
To install all writers use the following command pip install garf-io[all].
To install specific writers use:

  • pip install garf-io[bq] for BigQuery support
  • pip install garf-io[sheets] for Google spreadsheets support
  • pip install garf-io[sqlalchemy] for SqlAlchemy support

Usage

import garf_core import report
from garf_io import writer

# Create example report
sample_report = report.GarfReport(results=[[1]], column_names=['one'])

# Initialize CSV writer
concrete_writer = writer.create_writer('csv', destination_folder='/tmp/')

# Write data to /tmp/sample.csv
concrete_writer.write(sample_report, 'sample')

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

garf_io-0.0.3.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

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

garf_io-0.0.3-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

Details for the file garf_io-0.0.3.tar.gz.

File metadata

  • Download URL: garf_io-0.0.3.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.29

File hashes

Hashes for garf_io-0.0.3.tar.gz
Algorithm Hash digest
SHA256 6f0ba2d484fa1ca2cf40fb64ff1e493331d88942aadbe0805cc6e9a89945a2f5
MD5 9bf5ab52b0b78f94c1245b9b93303de7
BLAKE2b-256 9c170d3772aa3ad407cdeb18de363e3c9ccb44513726c98137e87ae1938e6ff1

See more details on using hashes here.

File details

Details for the file garf_io-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: garf_io-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.29

File hashes

Hashes for garf_io-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4041d7bc3620c39908bcab788cfa15310a882ccecb829d7a9f3b2ae66b26aefe
MD5 681811c9927ac5b49050efc9a4e3af51
BLAKE2b-256 d82a13b9faec74e643e3d36a8eeb8a307cc29ab1a3029ee23ee3014540c1f907

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