Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yasufumy/arrayfiles
Array-like File Access in Python
https://github.com/yasufumy/arrayfiles
file python text
Last synced: 12 days 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 (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-06-24T00:54:23.000Z (over 1 year ago)
- Last Synced: 2024-10-11T08:24:01.865Z (28 days ago)
- Topics: file, python, text
- Language: Python
- Homepage:
- Size: 388 KB
- Stars: 41
- Watchers: 3
- 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
[![Build Status](https://travis-ci.com/yasufumy/arrayfiles.svg?branch=master)](https://travis-ci.com/yasufumy/arrayfiles)
[![Build Status](https://github.com/yasufumy/arrayfiles/workflows/Run%20CI%20build/badge.svg)](https://github.com/yasufumy/arrayfiles/actions?query=workflow%3A%22Run+CI+build%22)
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/yasufumy/arrayfiles.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/yasufumy/arrayfiles/context:python)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/2de6c7b86da743a7ba1a567d29213dca)](https://www.codacy.com/manual/yasufumy/arrayfiles?utm_source=github.com&utm_medium=referral&utm_content=yasufumy/arrayfiles&utm_campaign=Badge_Grade)
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/2de6c7b86da743a7ba1a567d29213dca)](https://www.codacy.com/manual/yasufumy/arrayfiles?utm_source=github.com&utm_medium=referral&utm_content=yasufumy/arrayfiles&utm_campaign=Badge_Coverage)
[![codecov](https://codecov.io/gh/yasufumy/arrayfiles/branch/master/graph/badge.svg)](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
```