Skip to main content

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

Project description

Getting started with stdopen

version: 0.2.3

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.3.tar.gz (20.8 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.3-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: stdopen-0.2.3.tar.gz
  • Upload date:
  • Size: 20.8 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.3.tar.gz
Algorithm Hash digest
SHA256 1b5fe7539c6abeaf49f87b1b0bc78ab3e22a399750373c5aadde561bb30f4750
MD5 32dfbd94d1536dc1afa2cb0915444638
BLAKE2b-256 eb120f5663a38de89797a258af91dd0f5ff488cd91d5d204b48e7c88e6322b29

See more details on using hashes here.

File details

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

File metadata

  • Download URL: stdopen-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 20.3 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 4ba1fe474007b916cd704979925c274d4b2bd8b4d7083153e7edcd05ec3d3388
MD5 f39273265ded9974ddb3bda7dbc9660a
BLAKE2b-256 80009a4fb1c903d3e4b35dcf1055341492b70ac6593a0d8d9fbe1ecf21f77965

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