Skip to main content

UniversalIO

UniversalIO is a library for Python developers looking to seamlessly integrate multiple different file storage solutions.

The concept was born out of a need for a project to allow users to specify files which might be in the Azure Blob Storage, Azure File Store, on a network drive, or on a SFTP server and then manipulate these files. In addition, there was a need to write the same file back to multiple different locations. The solution was to wrap the specific API for those storage solutions in an API that allowed the system to operate on them consistently, as well as coordinating file transfers between them. The need for batch operations led to the adoption of asyncio and its implementations for most of the backend, though non-asynchronous methods are available as well.

Operations Supported

  • is_dir()
  • is_file()
  • exists()
  • parent()
  • child(child_name)
  • basename()
  • joinpath(*paths)
  • remove()
  • read(block_size)
  • write(bytes)
  • text(encoding)
  • copy()
  • move()
  • mkdir(recursive)
  • rmdir(recursive)
  • crawl()
  • detect_encoding()
  • is_local_to(resource)

Asynchronous versions of most of the above exist with the suffix _async

Storage Solutions Supported

  • Local/network drives (via aiofiles)
  • SFTP (via asyncssh)
  • Azure Blob Storage (via azure.storage.blob.aio)
  • HTTP servers (via aiohttp)
    • Requires GET support for read access
    • Requires PUT support for write access
    • Requires DELETE support for delete
    • Supports MKCOL for basic directory/collection creation
    • Supports COPY, falls back to a GET and a PUT, for file copying
    • Supports MOVE, falls back to a COPY and a DELETE, for file moving

Planned Enhancements

  • Some restructuring to match the pathlib API as much as possible
  • Support for pulling credentials from TOML files in user's home directory
  • Support for Azure File Storage
  • Support for FTP and FTPS
  • Support for direct HTTP access and HTML scraping
  • Support for a batch file uploader/downloader
  • Support for glob() matching and other searching options
  • Support for pathlib-style with_name() to change the file name
  • Support for touch()
  • Support for writing text directly
  • Support for HTTP authentication methods, including a custom method to support custom API calls
  • More direct support for file copy/moving if the descriptor and connection is the same
  • Considering support for SSH/SCP
  • Considering support for relative file paths on local/network drives (challenging to understand what the root would be?)
  • Considering support for chmod/etc (but not supported on Windows)
  • Considering support for symbolic link creation (but complex on Windows)

Metadata

Release files for universalio 0.0.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for universalio 0.0.14
File Size Uploaded Provenance Actions
universalio-0.0.14.tar.gz 22.0 kB Without provenance Details for universalio-0.0.14.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for universalio 0.0.14
File Interpreter ABI Platform Actions
universalio-0.0.14-py3-none-any.whl Python 3 none any Details for universalio-0.0.14-py3-none-any.whl

Total release size: 43.5 kB

Release files / universalio-0.0.14.tar.gz

Download URL universalio-0.0.14.tar.gz
Size 22.0 kB
Tags Source
SHA-256 checksum
How to use checksums
1e957df4b71e6e0a8514cd3c738a2f9eed53ff2eefcbef5bf3e0c102320f002d
BLAKE2b-256 checksum
How to use checksums
52a2fa0a2ff70f35072c420942033f0b2bc85a579a8e253f59c836e53b612683
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Release files / universalio-0.0.14-py3-none-any.whl

Download URL universalio-0.0.14-py3-none-any.whl
Size 21.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3dca4114e4dcde0d24abc093e63ea974eb21ecc7332cc6a50e3bce753207ef99
BLAKE2b-256 checksum
How to use checksums
bb18233cd7d1906ca8841056884cd93dfe718998b7e82b9236918da69f7a997d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.6

Security for universalio 0.0.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page