https://github.com/yasufumy/arrayfiles
Array-like File Access in Python
https://github.com/yasufumy/arrayfiles
file python text
Last synced: 4 months ago
JSON representation
Array-like File Access in Python
- Host: GitHub
- URL: https://github.com/yasufumy/arrayfiles
- Owner: yasufumy
- License: mit
- Created: 2019-06-19T06:05:46.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-06-24T00:54:23.000Z (about 2 years ago)
- Last Synced: 2025-03-08T13:37:48.029Z (4 months ago)
- Topics: file, python, text
- Language: Python
- Homepage:
- Size: 388 KB
- Stars: 40
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ArrayFiles: Array-like File Access in Python
[](https://travis-ci.com/yasufumy/arrayfiles)
[](https://github.com/yasufumy/arrayfiles/actions?query=workflow%3A%22Run+CI+build%22)
[](https://lgtm.com/projects/g/yasufumy/arrayfiles/context:python)
[](https://www.codacy.com/manual/yasufumy/arrayfiles?utm_source=github.com&utm_medium=referral&utm_content=yasufumy/arrayfiles&utm_campaign=Badge_Grade)
[](https://www.codacy.com/manual/yasufumy/arrayfiles?utm_source=github.com&utm_medium=referral&utm_content=yasufumy/arrayfiles&utm_campaign=Badge_Coverage)
[](https://codecov.io/gh/yasufumy/arrayfiles)ArrayFiles allows you to access an arbitrary line of a text file.
If your interest is in using arrayfiles for Deep Learning, please check [LineFlow](https://github.com/yasufumy/lineflow).
## Installation
To install arrayfiles:
```bash
pip install arrayfiles
```## Usage
```py
import arrayfilesdata = arrayfiles.read_text('/path/to/text')
data[0] # Access the first line of your text
data[-1] # Access the last line of your text
data[10:100] # Access the 10th line to the 100 the line of your text
```