Skip to main content

Streamlining file opening from files/stdin/stdout and write via temp

Project description

Getting started with stdopen

version: 0.2.2

This is a wrapper around Python's open (or other open methods), that will automate file-like object creation either by opening a file or from STDIN/STDOUT. It also provides the option writing to a temp file which is seamlessly copied over to the desired output directory upon successful closing, or deleted upon error. It will also pass through (back) any iterators.

All of the functionality described above is particulay useful when implementing cmd-line programs.

There is online documentation for stdopen.

Installation instructions

pip install

pip install stdopen

Installation using conda

A conda build is also available for Python v3.9 - v3.13 on linux-64/osX-64. Although please note that all development and testing is performed in linux-64.

conda install -c conda-forge -c cfin stdopen

Next steps...

If you want to run the tests after install you will need to have cloned the repo and run pytest <REPO-ROOT>/tests.

Change log

You can view the changelog here.

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

stdopen-0.2.2.tar.gz (268.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stdopen-0.2.2-py3-none-any.whl (294.6 kB view details)

Uploaded Python 3

File details

Details for the file stdopen-0.2.2.tar.gz.

File metadata

  • Download URL: stdopen-0.2.2.tar.gz
  • Upload date:
  • Size: 268.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for stdopen-0.2.2.tar.gz
Algorithm Hash digest
SHA256 cc0963fb5da3564efe632e6f1dd079afd47034d86bc4000badc58f3cbb63a607
MD5 5e80776f7515be6d52d8ba3b0a260d5d
BLAKE2b-256 5b8a6131dad7a9611ad6e8ecf9a271d100fd827f52bc180be23aeccfa133bd55

See more details on using hashes here.

File details

Details for the file stdopen-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: stdopen-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 294.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.0

File hashes

Hashes for stdopen-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 356e56477dca4507fa1af41c12b4404068b387dca23b0e76ec60ae467256ca4d
MD5 fb7122c66724c78f956d6a9b6ae2882a
BLAKE2b-256 477fab98b01bb9b2f09211199930f9b567acf38e82da1625216fa4201794df49

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