Skip to main content

A utility library for working with DSV (Delimited String Values) files

Project description

splurge-safe-io

PyPI version Python versions License: MIT

CI Coverage Ruff mypy

A small, secure, and deterministic text file I/O helper library.

Key features

  • Deterministic newline normalization (LF) for text reads/writes.
  • Secure path validation utilities to avoid traversal and dangerous characters.
  • Streaming reader with incremental decoding and a safe fallback for tricky encodings.
  • Clear, small exception hierarchy for stable error handling.

Quick start

from splurge_safe_io.safe_text_file_reader import SafeTextFileReader
from splurge_safe_io.safe_text_file_writer import open_safe_text_writer

# Read lines
reader = SafeTextFileReader('data.csv')
rows = reader.read()

# Write via context manager
with open_safe_text_writer('out.txt') as buf:
    buf.write('\n'.join(['one','two','three']))

See docs/README-DETAILS.md for a complete guide and usage examples.

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

splurge_safe_io-2025.0.5.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

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

splurge_safe_io-2025.0.5-py3-none-any.whl (21.1 kB view details)

Uploaded Python 3

File details

Details for the file splurge_safe_io-2025.0.5.tar.gz.

File metadata

  • Download URL: splurge_safe_io-2025.0.5.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for splurge_safe_io-2025.0.5.tar.gz
Algorithm Hash digest
SHA256 6fd091ffc96a5ace5a184c2b311dc1b5b0153e93f11b9217ef1bf1c4896a5d12
MD5 c24a0fb0258515fd4a45b2a3ef57c934
BLAKE2b-256 720516b5d35d493d1e3dd07ef959ec96c4c1ad33840156865390e5838ef2d37a

See more details on using hashes here.

File details

Details for the file splurge_safe_io-2025.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for splurge_safe_io-2025.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 cce2ee99b8150dcf00e07e50d0f0eedcf18da314511d697267e9bb1c75322c03
MD5 299ed92f6693d6e789324b196853e3e7
BLAKE2b-256 d7d295b5cdde7b5e36b32242a31a616841be1e508ec7a583042664c653fd5e98

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