Skip to main content

No project description provided

Project description

randomread

Read a random subset of a text file in an efficient manner.

use

from randomread import sample

# Read randomly picked 10-word snippet from a large text file
text = sample("large_textfile.txt", 10)
# Read 100 randomly picked 2000-word chunks
text = sample("large_textfile.txt", 200000, chunk_size=2000)

install

pip install randomread

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

randomread-0.2.0.tar.gz (1.5 kB view hashes)

Uploaded Source

Built Distribution

randomread-0.2.0-py3-none-any.whl (1.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page