Skip to main content

Rustkit - A Python library for Rust lovers.

Rustkit is a Python library for Rust lovers. It provides a set of tools to write Rust-like code in Python. It's written by a fellow rustacean, who also loves Python. In my opinion, Python is a great language, but it lacks some features that Rust has. Rustkit is an attempt to bring some of those features to Python.

Roadmap

as of now, only the following features are implemented:

  • Result
  • Option

with these features on their way in a future release:

  • Vector
  • Iterators

Installation

pip install rustkit

Usage

from rustkit import *

# Rust-like optionals
assert some(10).unwrap() == 10
assert some(10).unwrap_or(20) == 10
assert Option.from_(None) == NONE

# Rust-like results, and error handlers
assert ok(10).unwrap() == 10
assert ok(10).unwrap_or(20) == 10
assert Result.from_(lambda: 10 / 0) == err(ZeroDivisionError)

Metadata

Release files for rustkit 0.0.2

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

Source distribution (sdist)

Source distribution for rustkit 0.0.2
File Size Uploaded Provenance
rustkit-0.0.2.tar.gz 21.7 kB Without provenance Details

Release files / rustkit-0.0.2.tar.gz

Download URL rustkit-0.0.2.tar.gz
Size 21.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3f04a1d6da59538e7e024053670ceb0351fc505c8ba1df96fe433e45f190d593
BLAKE2b-256 checksum
How to use checksums
0d5b8cfa06181b5f65caf46c1da11d643afc4604fce9ed430dd6f4864c685a19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Security for rustkit 0.0.2

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.

Release history Release notifications | RSS feed

This release

0.0.2 This release

1 release file No provenance

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