Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ilevn/aionewton
An asyncio-based wrapper for the newton-api
https://github.com/ilevn/aionewton
aiohttp algebra api asnycio calculus maths python-3-6 wrapper
Last synced: 27 days ago
JSON representation
An asyncio-based wrapper for the newton-api
- Host: GitHub
- URL: https://github.com/ilevn/aionewton
- Owner: ilevn
- License: mit
- Created: 2017-04-02T13:04:10.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-08-01T16:51:31.000Z (over 5 years ago)
- Last Synced: 2024-11-23T22:11:48.635Z (about 2 months ago)
- Topics: aiohttp, algebra, api, asnycio, calculus, maths, python-3-6, wrapper
- Language: Python
- Homepage:
- Size: 11.7 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## aionewton
An `asnycio`-based wrapper for [Newton](https://newton.now.sh).
The Github project can be found [here.](https://github.com/aunyks/newton-api)## Installation
```
pip install aionewton
```
For the latest development version:
```
pip install git+https://github.com/ilevn/aionewton
```## Example
```py
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())
```