Metadata-Version: 2.1
Name: toncenter
Version: 0.0.3
Summary: Toncenter API Python3 async wrap.
Home-page: https://github.com/witer33/toncenter
Author: witer33
Author-email: dev@witer33.com
License: UNKNOWN
Project-URL: Bug Tracker, https://github.com/witer33/toncenter/issues
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE

# toncenter
Toncenter API Python3 async wrap.

# Installation

```sh
pip3 install toncenter
```

# Documentation (WIP)

https://witer33.github.io/toncenter/

# Example

```python
from toncenter.client import Client
import asyncio


async def main():
    
    async with Client(open("main_api_token.txt").read()) as client:
        info = await client.get_masterchain_info() # Gets masterchain info
        print(info.last) # Prints last block


if __name__ == "__main__":
    asyncio.run(main())
```
# Example without context manager

```python
from toncenter.client import Client
import asyncio


async def main():
    
    client = Client(open("main_api_token.txt").read())
    await client.start()
    
    info = await client.get_masterchain_info() # Gets masterchain info
    print(info.last) # Prints last block
    
    await client.stop() # ALWAYS call this method.


if __name__ == "__main__":
    asyncio.run(main())
```


