Skip to main content

Introduction

Welcome to my small python project. This library just provides some functions to read from csv files. I developed this library for fun. If anyone wants to contribute, feel free to contact me or open an issue. This library uses the built-in csv module

Installation

Type this into your command prompt: pip install csv-reader

Usage

at the top of your py files:

from reader import Reader

in your code:

with Reader.openWithName("test.csv") as file:
    for line in file:
        print(line)

Documentation

openWithName(name: str)

opens a file with the given file name and returns a context manager.
name - the name of the csv file.
throws: FileNotFoundError - when the file could not be found. e.g.

with Reader.openWithName("test.csv") as file:
    for line in file:
        print(line)

note: when used in a `for` loop, each `line` is a list of values in each line of the file.
openWithFile(file: TextIO)

returns a context manager from an already opened file.
file - the file object.
throws: FileNotFoundError - when the file could not be found. e.g.

with Reader.openWithFile(open("test.csv" newline="")) as file:
    for line in file:
        print(line)

note: when used in a `for` loop, each `line` is a list of values in each line of the file.
readFromName(name: str)

opens a file with given name and returns a context manager that yields an iterator that yields each line in the file.
name - the name of the csv file.
throws: FileNotFoundError - when the file could not be found. e.g.

with Reader.readFromName("test.csv") as file:
    for line in file:
        print(line)

note: `line` is a string.
readFromFile(file: TextIO)

returns an context manager from an already opened file that yields an iterator that yields each line in the file.
file - the file object.
throws: FileNotFoundError - when the file could not be found. e.g.

with Reader.readFromFile(open("test.csv", newline="")) as file:
    for line in file:
        print(line)

note: `line` is a string.

Metadata

Release files for csv-reader 1.2.0

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

Built distribution (wheel)

Table of built distributions (wheels) for csv-reader 1.2.0
File Interpreter ABI Platform Actions
csv_reader-1.2.0-py3-none-any.whl Python 3 none any Details for csv_reader-1.2.0-py3-none-any.whl

Release files / csv_reader-1.2.0-py3-none-any.whl

Download URL csv_reader-1.2.0-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ebbda94537614b3a617cd7cae3115596814beea13828f67b6f5130d5c9aee54f
BLAKE2b-256 checksum
How to use checksums
80813f8f59c334bd6cd87f15508c35e72f3139dd468bab523d6347a17c26fa73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.7

Security for csv-reader 1.2.0

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.

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