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](https://pypi.python.org/pypi/jit-open):

pip install jit_open

From source:

git clone https://git.lumc.nl/j.f.j.laros/jit-open.git cd jit_open pip install .

## Library The library provides the Handle and Queue classes. Full documentation can be found [here](https://git.lumc.nl/j.f.j.laros/jit-open).

### 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.

Source Distribution

jit-open-0.0.4.tar.gz (3.3 kB view details)

Uploaded Source

File details

Details for the file jit-open-0.0.4.tar.gz.

File metadata

  • Download URL: jit-open-0.0.4.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/2.7

File hashes

Hashes for jit-open-0.0.4.tar.gz
Algorithm Hash digest
SHA256 b6fc9425bae5c7056b152f90b7fde41b9ecc5ab8a10135057df0ba7b7ba2121b
MD5 bbf90ec43bfd5460be2ffaf22383aab9
BLAKE2b-256 9bd08c45baf2257bef6bc0b22acfe88f19c7c5277350f416404635f374245c73

See more details on using hashes here.

Supported by

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