Skip to main content

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

Project description

Getting started with stdopen

version: 0.2.1

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.1.tar.gz (317.6 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.1-py3-none-any.whl (335.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for stdopen-0.2.1.tar.gz
Algorithm Hash digest
SHA256 cb2631dbc3c1ca581cd95ae4460195eb4575b0817d496752138098dc1bc572c4
MD5 bc59f44856235e4936bcbd80993a6aaf
BLAKE2b-256 6191cdcd6845aa47768b628fb3d7e4f59d7ff47a0896b8847c597482cb66de21

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for stdopen-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 47a839bc4b86e97ef2ee2311ac1500a8ef0958f3fdaee3ae26168e0fbdff8079
MD5 f7794df76952512489750cc6ad1c87f7
BLAKE2b-256 64083d0a4c2746e9050d08e7e523c8aba6b6ee87795fed997f4deb4af0ccbbf7

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