semvec/pypi-packages huggingface dataset:
optional-python 0.0.2
Optional object for python
Requires Python: >=3.8,<4.0

# PyOptional

optional object for python

### How to install

`pip install -U optional_python`

### How to use

#### `Optional.of & Optional.of_nullable`

```python

from pyoptional import Optional

value = 1

final_value = Optional.of(value).map(lambda x: x + 1).or_else(333)
assert final_value == 1

final_value = Optional.of_nullable(None).map(lambda x: x + 1).or_else(333)
assert final_value == 333


```

#### `Optional.or_raise`

```python

from pyoptional import Optional

Optional.of_nullable(None).or_raise(ValueError("value is None"))

```

#### `Try.of`

```python

from pyoptional import Try


def func():
    return 1 / 0


def func2():
    return 2 / 1


def handle_exception(e: ZeroDivisionError):
    return "error"


result = Try.of(func).recover(handle_exception)
assert result.get() == "error"

result = Try.of(func2).recover(handle_exception)
assert result.get() == 2

result = Try.of(lambda: 1 / 000000000)

# no exception handler
assert result.get() is None

result = Try.of(lambda: 1 / 000000000, raise_exception=True)

result.get()  # will raise ZeroDivisionError

```
fabric-e2e 1.14.post1
Fabric is a simple, Pythonic tool for remote execution and deployment (py2.7/py3.4+ compatible fork).


Fabric3 is a fork of `Fabric <http://fabfile.org>`_ to provide compatability
with Python 3.4+. The port still works with Python 2.7.

The goal is to stay 100% compatible with the original Fabric.  Any new releases
of Fabric will also be released here.  Please file issues for any differences
you find. Known differences are `documented on github
<https://github.com/mathiasertl/fabric/>`.

To find out what's new in this version of Fabric, please see `the changelog
<http://fabfile.org/changelog.html>`_ of the original Fabric.

For more information, please see the Fabric website or execute ``fab --help``.
tendril-utils-types 0.2.5
Type classes for tendril
Requires Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*
Keywords: tendril



.. image:: https://img.shields.io/pypi/v/tendril-utils-types.svg?logo=pypi
    :target: https://pypi.org/project/tendril-utils-types

.. image:: https://img.shields.io/pypi/pyversions/tendril-utils-types.svg?logo=pypi
    :target: https://pypi.org/project/tendril-utils-types

.. image:: https://img.shields.io/travis/tendril-framework/tendril-utils-types.svg?logo=travis
    :target: https://travis-ci.org/tendril-framework/tendril-utils-types

.. image:: https://img.shields.io/coveralls/github/tendril-framework/tendril-utils-types.svg?logo=coveralls
    :target: https://coveralls.io/github/tendril-framework/tendril-utils-types

.. image:: https://img.shields.io/codacy/grade/eb5c1b09e6454c57910f370a6b4536c4?logo=codacy
    :target: https://www.codacy.com/app/chintal/tendril-utils-types

.. image:: https://img.shields.io/requires/github/tendril-framework/tendril-utils-types.svg
    :target: https://requires.io/github/tendril-framework/tendril-utils-types/requirements

.. image:: https://img.shields.io/pypi/l/tendril-utils-types.svg
    :target: https://www.gnu.org/licenses/agpl-3.0.en.html



.. inclusion-marker-do-not-remove

Introduction
------------

TODO Some brief introduction


Package Information
-------------------

The latest version of the documentation, including installation, usage, and
API/developer notes can be found at
`ReadTheDocs <https://tendril-utils-types.readthedocs.io/en/latest/index.html>`_.

The latest version of the sources can be found at
`GitHub <https://github.com/tendril-framework/tendril-utils-types>`_. Please use 
GitHub's features to report bugs, request features, or submit pull/merge requests.

The principle author for ``tendril-utils-types`` is Chintalagiri Shashank. The 
author can be contacted if necessary via the information on the
`author's github profile <https://github.com/chintal>`_ . See the AUTHORS file
for a full list of collaborators and/or contributing authors, if any.

``tendril-utils-types`` is distributed under the terms of the
`AGPLv3 license <https://www.gnu.org/licenses/agpl-3.0.en.html>`_ .
A copy of the text of the license is included along with the sources.