Skip to main content

Standard Interfaces for Object Transformation - File I/O Structures

Project description

sito-io

Standard Interfaces for Transforming Objects - File I/O

The goal of this library is to provide data structures and interfaces which are at least as ergonomic as existing file I/O and path primitives (open, Path, etc), while providing strongly typed functionality to facilitate transformations of collections of files.

Core concepts

Resource

A Resource is the core unit of abstraction. It is kind of like a sum type of a os.Path and urllib.parse.ParseResult. Its essence is to act as a handle to a more sophisticated resource, such as a file, directory, URL, endpoint, transaction, FIFO, special file, etc.

Context

A Context is a Resource that can be used to "anchor" another Resource. For example, a context might be http://example.com, /home/user, or even .. A context can be:

  • Fully qualified - file:///home/user/foo/bar, http://example.com/foo/bar, ftp://example.com/foo/bar
  • Absolute - /home/user/foo/bar, /home/user/arch.tar::/foo/bar
  • Relative - ./bar - Relative contexts must be rooted before they can be fully resolved
  • Naive - bar - Naive contexts must be rooted before they can be fully resolved

Manifest

A Manifest is a collection of Resources. This might be files on disk (or a description thereof, it need not exist), or files in a TAR file, or endpoints. The primary purpose is to facilitate moving collections of files atomically, capturing I/O of a process, and "slurping up" the data, thus allowing stateful processes to be modeled as a transaction. This makes a process behave less like a mutation and more like a lambda, improving referential transparency in pipelines.

A Manifest can be used to generate a ManifestFile, a serialized index of the manifest. This can be packed with the files and give an easy handle to verify the contents of a transaction.

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

sito_io-0.0.2.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

sito_io-0.0.2-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file sito_io-0.0.2.tar.gz.

File metadata

  • Download URL: sito_io-0.0.2.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.6

File hashes

Hashes for sito_io-0.0.2.tar.gz
Algorithm Hash digest
SHA256 a7fc466c2ffb13e4da692ec53454f1637a9674d576284b4a23e3c450824d3e2e
MD5 5a6cf85a2b4336f3cee66dbba71bae43
BLAKE2b-256 864377d2bae2c706fdf57f7712d809383719d93e6e1989985954353dfbb3c74f

See more details on using hashes here.

File details

Details for the file sito_io-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: sito_io-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.6

File hashes

Hashes for sito_io-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 329178f68a014b92a48235354c359d47ff73ad2f67d93ad8fbc0fc6806bf6354
MD5 772aed6e522e2e2efc2f25f7a5c951ee
BLAKE2b-256 4eba90df49f1c5ebc2ee9f0c581ffe9ea302ba040abe5bcd204d7408cb5ab20b

See more details on using hashes here.

Supported by

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