semvec/pypi-packages huggingface dataset:
cryptosnake 0.1.3
Simple crypto data API
License: MIT

### Simple, unofficial python wrapper for [Binance API](https://binance-docs.github.io/apidocs/spot/en/#change-log).

You'll find this easy-to-use package helpful if you're interested in general market data and cryptocurrency values. You don't need to have a Binance account or API Key since you can't purchase/trade cryptocurrencies using this package.

-------------

## Installation

python3 -m pip install cryptosnake

### or

pip3 install cryptosnake

-----------------

## Usage

```

from cryptosnake import CryptoSnake

snake = CryptoSnake()

# Crypto to USDT. Takes currency as an argument.
snake.crypto_to_tether('ETH')

# Crypto to BUSD. Takes currency as an argument. Keep in mind that it is BUSD, not USDT and make sure that API provides you the info you need.
snake.crypto_to_usd('ADA')

# Crypto to euro. 
snake.crypto_to_euro('BTC')

# Get a list of available symbols
snake.get_available_symbols()

# Get a list of available pairings
snake.get_available_pairings()

# Get crypto price. Takes crypto pairing as an argument
snake.get_crypto_price('ETHUSDT')

```

### Donate

If this package was useful, and you'd like to help out, feel free to donate.

* ETH: 0x47b9afb6a0580e79ac228f0ce233323549f30284

* BTC: 1FosbV9CXXwTiLvVa33QyUGvqeF6zhA629

* ADA: DdzFFzCqrhssxaX8qbkwKrG5ZWjeZCBnRVEcV12f2D2TdQttkgjDukZqHv9sTEwdNq8KwXbCEGZboE6rEwLXDYSiVWiVA7RvmyYpoWiA

* LTC: LZNHh8bVZtdeegDPnaMZu1aHYMwKpYsUiW
ore-combinators 0.0.5
Parser combinator library for Python
License: MIT
Requires Python: ==3.*,>=3.6.0
Keywords: parser combinator ore

# Ore

A simple WIP pythonic parser combinator library inspired by Haskell's attoparsec.

It supports two styles: declarative and imperative.

For example, declarative style looks like the following:
```python3
from ore_combinators.combinators import alphabet, transform
from ore_combinators.combinators import sequence, take_while_possible

join = lambda l: ''.join(l)

name = transform(
    sequence(
        alphabet,
        transform(
            take_while_possible(alphabet),
            join
        )
    ),
    join
)
```

The very same combinator could be written as function:
```python3
from typing import Tuple

from ore_combinators.combinators import alphabet
from ore_combinators.combinators import take_while_possible
from ore_combinators import combinator_function, ParserState, Result


@combinator_function()
def name(state: ParserState) -> Tuple[str, ParserState]:
    first_symbol, state = alphabet(state)
    other_symbols, state = take_while_possible(alphabet)(state)

    return Result.make_value(
        first_symbol + ''.join(other_symbols),
        state
    )
```

To run a parser on a given text, use `run` or `run_safe`:

```python3
from typing import Tuple

from ore_combinators.combinators import alphabet
from ore_combinators.combinators import take_while_possible
from ore_combinators import ParserState, Result
from ore_combinators import run_safe, combinator_function


@combinator_function()
def name(state: ParserState) -> Tuple[str, ParserState]:
    first_symbol, state = alphabet(state)
    other_symbols, state = take_while_possible(alphabet)(state)

    return Result.make_value(
        first_symbol + ''.join(other_symbols),
        state
    )

name_result = run_safe(name, "Ore     ")

assert name_result.value == "Ore"
```

The difference between `run` and `run_safe` is that `run_safe` returns result without raising exceptions.
Exceptions saved in the result instead.
`run` just throws exceptions without saving them into result.

# Installation

To install this library, just type `pip install ore-combinators` in the console.