rustkit


Namerustkit JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://github.com/ddjerqq/rustkit
SummaryA Rust toolkit library for python which allows you to write rust-like code in python.
upload_time2022-12-18 11:14:38
maintainer
docs_urlNone
authorddjerqq
requires_python
licenseGNU
keywords rust optional result iterator vector
VCS
bugtrack_url
requirements pytest
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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)
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ddjerqq/rustkit",
    "name": "rustkit",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "rust optional result iterator vector",
    "author": "ddjerqq",
    "author_email": "ddjerqq@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/0d/5b/8cfa06181b5f65caf46c1da11d643afc4604fce9ed430dd6f4864c685a19/rustkit-0.0.2.tar.gz",
    "platform": null,
    "description": "# Rustkit - A Python library for Rust lovers.\n\n> Rustkit is a Python library for Rust lovers. It provides a set of tools to write\nRust-like code in Python. It's written by a fellow rustacean, who also loves Python.\nIn my opinion, Python is a great language, but it lacks some features that Rust\nhas. Rustkit is an attempt to bring some of those features to Python.\n\n\n# Roadmap\n\n#### as of now, only the following features are implemented:\n\n- [x] Result\n- [x] Option\n\n#### with these features on their way in a future release:\n\n- [ ] Vector\n- [ ] Iterators\n\n\n## Installation\n\n```bash\npip install rustkit\n```\n\n\n## Usage\n\n```python\nfrom rustkit import *\n\n# Rust-like optionals\nassert some(10).unwrap() == 10\nassert some(10).unwrap_or(20) == 10\nassert Option.from_(None) == NONE\n\n# Rust-like results, and error handlers\nassert ok(10).unwrap() == 10\nassert ok(10).unwrap_or(20) == 10\nassert Result.from_(lambda: 10 / 0) == err(ZeroDivisionError)\n```\n\n",
    "bugtrack_url": null,
    "license": "GNU",
    "summary": "A Rust toolkit library for python which allows you to write rust-like code in python.",
    "version": "0.0.2",
    "split_keywords": [
        "rust",
        "optional",
        "result",
        "iterator",
        "vector"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "5130c343e63edfa040e27469c01947b5",
                "sha256": "3f04a1d6da59538e7e024053670ceb0351fc505c8ba1df96fe433e45f190d593"
            },
            "downloads": -1,
            "filename": "rustkit-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "5130c343e63edfa040e27469c01947b5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 21715,
            "upload_time": "2022-12-18T11:14:38",
            "upload_time_iso_8601": "2022-12-18T11:14:38.202884Z",
            "url": "https://files.pythonhosted.org/packages/0d/5b/8cfa06181b5f65caf46c1da11d643afc4604fce9ed430dd6f4864c685a19/rustkit-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-18 11:14:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "ddjerqq",
    "github_project": "rustkit",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "pytest",
            "specs": [
                [
                    "~=",
                    "7.2.0"
                ]
            ]
        }
    ],
    "lcname": "rustkit"
}
        
Elapsed time: 0.07679s