Skip to content

Commit ae284c4

Browse files
authored
Merge pull request #1 from jegesh/temp
merge
2 parents 75c0d61 + 89e94ca commit ae284c4

File tree

10 files changed

+508
-13
lines changed

10 files changed

+508
-13
lines changed

.idea/workspace.xml

Lines changed: 193 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.rst

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Random Access File Reader
2+
-------------------------
3+
4+
| This is a small library that allows for reading any given line in a file without having to read all the lines before it
5+
or load the entire file into memory. Only the line indexes and lengths are held in memory, which enables random
6+
access even on very large files at a very minuscule memory cost.
7+
8+
Installation
9+
============
10+
11+
12+
Usage
13+
=====
14+
15+
| Usage is very straightforward, and standard csv line endings (newline character), value delimiter (comma), and
16+
quotation character (double quote) are the defaults. These can be changed in the constructor.
17+
|
18+
| Plain text file example:
19+
20+
::
21+
reader = RandomAccessReader('~/myfile.txt')
22+
line = reader.get_line(2)
23+
print line
24+
25+
| Csv example:
26+
27+
::
28+
reader = CsvRandomAccessReader('~/myfile.csv')
29+
line = reader.get_line_dict(5)
30+
for x in line:
31+
print x + " = " line[x]

0 commit comments

Comments
 (0)