Skip to main content

stream-csv

Latest Commit
Package version

Installation

pip install stream-csv

Usage

from fastapi import FastAPI
from starlette.responses import StreamingResponse

from stream_csv.stream import stream_data

app = FastAPI()


@app.get("/")
def get_csv():
    headers = ["type", "color", "size"]
    dict_data = [
        {"type": "potato", "color": "blue", "size": 1},
        {"type": "banana", "color": "red", "size": 2},
        {"type": "potato", "size": 3, "color": "yellow"},
    ]
    return StreamingResponse(
        stream_data(dict_data, headers),
        media_type="text/csv",
        headers={"Content-Disposition": "attachment; filename=data.csv"},
    )

License

This project is licensed under the terms of the MIT license.

Metadata

Release files for stream-csv 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stream-csv 0.1.1
File Size Uploaded Provenance Actions
stream-csv-0.1.1.tar.gz 3.6 kB Without provenance Details for stream-csv-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for stream-csv 0.1.1
File Interpreter ABI Platform Actions
stream_csv-0.1.1-py3-none-any.whl Python 3 none any Details for stream_csv-0.1.1-py3-none-any.whl

Total release size: 7.4 kB

Release files / stream-csv-0.1.1.tar.gz

Download URL stream-csv-0.1.1.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
56b8e32554ba8b8acbdca3b6c1150ab69a776dc32b3722520fe9ce66868877ee
BLAKE2b-256 checksum
How to use checksums
bbe6904a56efa094719c0b4805114e4ea6007ad026e606cd550160f4343a97f5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.8.5 Linux/5.4.0-59-generic

Release files / stream_csv-0.1.1-py3-none-any.whl

Download URL stream_csv-0.1.1-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a2d9c819c43473406d53abba16b529acf13fc071023fcbf64485d7a4fe4839b
BLAKE2b-256 checksum
How to use checksums
2b593ffdff3a071dc2db735cdd7908a90b5c863191c0267ea9188d37fe359d72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.8.5 Linux/5.4.0-59-generic

Security for stream-csv 0.1.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.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page