sqlcsv-exporter
sqlcsv-exporter is a publishable CLI package for streaming SQL Server query results into CSV files without loading the full result set into memory.
Features
- Reads SQL from a
.sqlfile - Rewrites a declared
@InAsOfDatevalue when present - Supports trusted or SQL authentication
- Streams rows with chunked
fetchmany()and chunked CSV writes - Shows live Rich progress while the export runs
- Ships with pytest coverage for core behavior
Install
poetry install
Run
poetry run sqlcsv-exporter \
--sql ./queries/report.sql \
--output ./exports/report.csv \
--server my-sql-server \
--database Reporting
With SQL authentication:
poetry run sqlcsv-exporter \
--sql ./queries/report.sql \
--output ./exports/report.csv \
--server my-sql-server \
--database Reporting \
--sql-auth \
--username reporting_user \
--password secret
Override the as-of date used in a declared @InAsOfDate variable:
poetry run sqlcsv-exporter \
--sql ./queries/report.sql \
--output ./exports/report.csv \
--server my-sql-server \
--database Reporting \
--date 2026-03-26
Publish
poetry build
poetry publish
Metadata
Release files for sqlcsv-exporter 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sqlcsv_exporter-1.0.1.tar.gz | 7.7 kB | Without provenance | Details for sqlcsv_exporter-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sqlcsv_exporter-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for sqlcsv_exporter-1.0.1-py3-none-any.whl |
Total release size: 17.3 kB
Release files / sqlcsv_exporter-1.0.1.tar.gz
| Download URL | sqlcsv_exporter-1.0.1.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e1fabdcec939d47f22c5c990beb6e6965cf56a35493e657799227d93a5ffada
|
|
BLAKE2b-256 checksum How to use checksums |
148106e4d9b022c5f47e71185950720b7a4924dd85690f4eeb5a411a93890ed5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.12.7 Windows/11
|
Release files / sqlcsv_exporter-1.0.1-py3-none-any.whl
| Download URL | sqlcsv_exporter-1.0.1-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
047ce3ba353fd865f3aa82f312c92263e2974c468e2a621587b9a258d2bfa857
|
|
BLAKE2b-256 checksum How to use checksums |
d921f7d19a486f09e19b5e8cdb294a722ab8b7258ca655a307cab9fe21ee53c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.5 CPython/3.12.7 Windows/11
|
Security for sqlcsv-exporter 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.