Robust And Fast Functional IO Toolkit
Raffiot is small (almost) dependency-free python library providing some usual functional tools. It currently provides
- an easy-to-use
IOmonad which is stack-safe, fast, support asynchronous, concurrent, parallel programming, has many other features. - a
Resourcedata type for easy but reliable resource management. - a
Resultdata structure to represent errors
Demo
For a demo, just type this in a terminal:
curl https://raw.githubusercontent.com/chrilves/raffiot.py/main/demos/raffiot_demo.sh | /bin/sh
This demo runs 4 computations in parallel. It demonstrates how simple concurrent and parallel programing is in raffiot.
Note that this command will install raffiot in your current Python environment
Documentation
Guide
The guide is online at https://chrilves.github.io/raffiot.py/index.html.
API
The API is online at https://chrilves.github.io/raffiot.py/api/index.html.
Features
- pure python: Raffiot is written entirely in Python 3.7+.
- small: it is just a few small files.
- (almost) dependency-free: it only depends on
typing-extensions(for the@finalannotation). - crystal clear code
IO
- stack safe: you just won't run into stack overflows anymore.
- fast: you won't notice the overhead.
- dependency injection made easy: make some context visible from anywhere.
- simple asynchronous and concurrent programming: full support of synchronous, asynchronous and concurrent programming with the same simple API.
- railway-oriented programming: clean and simple failure management.
- distinction between expected and unexpected failures: some failures are part of your program's normal behaviour (errors) while others are show something terribly wrong happened (panics). Yes, that's heavily inspired by Rust.
Resource
Python has the with construction, but Resource goes a step further.
- easy user-defined resource creation: just provide some open and close function.
- composability: the resource you want to create depends on another resource? Not a problem, you can compose resources the way you want. It scales.
- failures handling in resources:
Resourcehas everythingIOhas, including its wonderful failure management.
Result
Did I mention Railway-Oriented Programming? Result is represent the 3 possible
result of a computation:
Ok(value): the computation successfully computed the thisvalue.Error(error): the computation failed on some expected failureerror, probably from the business domain.Panic(exception): the computation failed on some unexpected failureexception.
Metadata
Release files for raffiot 0.6.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| raffiot-0.6.3.tar.gz | 40.8 kB | Without provenance | Details for raffiot-0.6.3.tar.gz |
Release files / raffiot-0.6.3.tar.gz
| Download URL | raffiot-0.6.3.tar.gz |
|---|---|
| Size | 40.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
07a07aef11ad43b109c501a93a4de9d1b89fc9fb4c1544dd3cd5788fcaca761a
|
|
BLAKE2b-256 checksum How to use checksums |
07e1518fe2e503a845ce5f3dd3a49e2cb5814619e16b83b54b22533b12332c47
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.7.10
|
Security for raffiot 0.6.3
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.