Skip to main content

jit-open: Just in time open files..

Project description

# Just in time open files. This package provides a way to delay opening files until the something is written to the file handle. This can be convenient when opening a large number of files of which most of them will not be frequently used. To deal with resource limits a queue is used from which, when full, the least frequent file is closed.

## Installation Via [pypi](

pip install jit_open

From source:

git clone cd jit_open pip install .

## Library The library provides the Handle and Queue classes. Full documentation can be found [here](

### Usage In the following example, only the file used.txt is created.

`python >>> from jit_open import Handle, Queue >>> >>> queue = Queue() >>> used = Handle("used.txt", queue) >>> unused = Handle("unused.txt", queue) >>> >>> used.write("line 1\n") >>> used.write("line 2\n") `

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for jit-open, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size jit-open-0.0.4.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page