AndrielFR / aionewton

An asyncio-based wrapper for the newton-api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

aionewton

An asnycio-based wrapper for Newton. The Github project can be found here.

Installation

pip install git+https://github.com/AndrielFR/aionewton

Example

import asyncio
import aionewton

# Get event loop
loop = asyncio.get_event_loop()

async def main():
    # Get calculation for `to_calculate`.
    to_calculate = input("Expression: ") # 2^2+2(2)
    
    # Return a Result object with `operation`, `expression`
    # and `result` as attributes.
    result = await aionewton.simplify(to_calculate)
    print(result)

loop.run_until_complete(main())

About

An asyncio-based wrapper for the newton-api

License:MIT License


Languages

Language:Python 100.0%