Metadata-Version: 2.1
Name: rustkit
Version: 0.0.1
Summary: A Rust toolkit library for python which allows you to write rust-like code in python.
Home-page: https://github.com/ddjerqq/rustkit
Author: ddjerqq
Author-email: ddjerqq@gmail.com
License: GNU
Keywords: rust optional result iterator vector
Platform: UNKNOWN
Description-Content-Type: text/markdown
License-File: LICENSE

# 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:

- [x] Result
- [x] Option

#### with these features on their way in a future release:

- [ ] Vector
- [ ] Iterators


## Installation

```bash
pip install rustkit
```


## Usage

```python
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)
```

