Code Explainers
Code explainers tagged #csv
go
func (h *ReportHandler) ExportTransactions(w http.ResponseWriter, r *http.Request) { ctx := r.Context() from, to, err := parseDateRange(r.URL.Query())
Streaming a CSV export in Go
streaming
http
csv
Intermediate
8 steps
javascript
import { NextResponse } from 'next/server'; import { db } from '@/lib/db'; function csvCell(value) {
Streaming a CSV export in a Next.js route
streaming
csv
readablestream
Advanced
9 steps
ruby
require "csv" class CsvExporter def initialize(records, columns: nil)
Turning records into CSV in Ruby
csv
data-export
serialization
Intermediate
7 steps
typescript
type CsvRecord = Record<string, string>; function parseCsv(input: string): CsvRecord[] { const rows: string[][] = [];
Parsing CSV with a character state machine
state-machine
parsing
string-processing
Intermediate
8 steps
python
import csv from pathlib import Path
Splitting a large CSV into smaller files
file-io
streaming
csv
Intermediate
8 steps
rust
use std::error::Error; use std::path::Path; use serde::Deserialize;
Custom CSV deserialization with serde in Rust
serde
csv
deserialization
Intermediate
7 steps
python
import csv import io from datetime import datetime
Streaming a CSV export in Flask
streaming
generators
csv
Intermediate
9 steps
python
import csv import io from datetime import date
Streaming a CSV export in FastAPI
streaming
async-generators
csv
Advanced
8 steps