# ain-py
A python version of [ain-js](https://www.npmjs.com/package/@ainblockchain/ain-js).
## Installation
```
pip install ain-py
```
## Examples
```python
from ain.ain import Ain
import asyncio
ain = Ain('https://mainnet-api.ainetwork.ai/')
async def process():
accounts = await ain.db.ref('/accounts').getValue()
print(accounts)
loop = asyncio.get_event_loop()
loop.run_until_complete(process())
```
## Test How-To
1. Clone AIN Blockchain and install
```
git clone git@github.com:ainblockchain/ain-blockchain.git
yarn install
```
2. Start blockchain locally
```
bash start_local_blockchain.sh
```
3. Run tests
```
tox
```
## License
This project is licensed under the MIT License
Raw data
{
"_id": null,
"home_page": "https://github.com/ainblockchain/ain-py",
"name": "ain-py",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "ain, ainetwork, ainblockchain, API",
"author": "AIN Dev Team",
"author_email": "dev@ainetwork.ai",
"download_url": "https://files.pythonhosted.org/packages/57/d3/7c49cab35d581656b009d292f1d31165d9c38ca683c3b40016cd1de3fc8c/ain_py-1.2.1.tar.gz",
"platform": null,
"description": "# ain-py\n\nA python version of [ain-js](https://www.npmjs.com/package/@ainblockchain/ain-js).\n\n\n## Installation\n```\npip install ain-py\n```\n\n\n## Examples\n```python\nfrom ain.ain import Ain\nimport asyncio\n\nain = Ain('https://mainnet-api.ainetwork.ai/')\n\nasync def process():\n accounts = await ain.db.ref('/accounts').getValue()\n print(accounts)\n\nloop = asyncio.get_event_loop()\nloop.run_until_complete(process())\n```\n\n\n## Test How-To\n1. Clone AIN Blockchain and install\n```\ngit clone git@github.com:ainblockchain/ain-blockchain.git\nyarn install\n```\n\n2. Start blockchain locally\n```\nbash start_local_blockchain.sh\n```\n\n3. Run tests\n```\ntox\n```\n\n\n## License\n\nThis project is licensed under the MIT License\n\n",
"bugtrack_url": null,
"license": "MPL license",
"summary": "AI Network Client Library for Python3",
"version": "1.2.1",
"project_urls": {
"Homepage": "https://github.com/ainblockchain/ain-py"
},
"split_keywords": [
"ain",
" ainetwork",
" ainblockchain",
" api"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "15ed6ff2ca5db995eae02681aee8d05bbb36bf03af65f5acb40a38eff6e58ff9",
"md5": "dd10ac16a934fd220c20427f0bbfb303",
"sha256": "02f00c6462343388461fa679190d735ec73c5e40696f16a31c347edbe9f7ae87"
},
"downloads": -1,
"filename": "ain_py-1.2.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "dd10ac16a934fd220c20427f0bbfb303",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 28760,
"upload_time": "2024-04-29T06:42:33",
"upload_time_iso_8601": "2024-04-29T06:42:33.898245Z",
"url": "https://files.pythonhosted.org/packages/15/ed/6ff2ca5db995eae02681aee8d05bbb36bf03af65f5acb40a38eff6e58ff9/ain_py-1.2.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "57d37c49cab35d581656b009d292f1d31165d9c38ca683c3b40016cd1de3fc8c",
"md5": "72c382aba6d49f2f9371957847a9f976",
"sha256": "02abc18b3ec07266f47c71723c6f46a17d1025c90b557802c9c5fabfc00f5a7c"
},
"downloads": -1,
"filename": "ain_py-1.2.1.tar.gz",
"has_sig": false,
"md5_digest": "72c382aba6d49f2f9371957847a9f976",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 33528,
"upload_time": "2024-04-29T06:42:36",
"upload_time_iso_8601": "2024-04-29T06:42:36.325985Z",
"url": "https://files.pythonhosted.org/packages/57/d3/7c49cab35d581656b009d292f1d31165d9c38ca683c3b40016cd1de3fc8c/ain_py-1.2.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-04-29 06:42:36",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ainblockchain",
"github_project": "ain-py",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "typing-extensions",
"specs": []
},
{
"name": "pycryptodome",
"specs": [
[
"==",
"3.18.0"
]
]
},
{
"name": "coincurve",
"specs": [
[
"==",
"18.0.0"
]
]
},
{
"name": "aiohttp",
"specs": [
[
"==",
"3.8.5"
]
]
},
{
"name": "jsonrpcclient",
"specs": [
[
"==",
"4.0.3"
]
]
},
{
"name": "mnemonic",
"specs": [
[
"==",
"0.20"
]
]
},
{
"name": "bip32",
"specs": [
[
"==",
"3.4"
]
]
},
{
"name": "simplejson",
"specs": [
[
"==",
"3.19.2"
]
]
},
{
"name": "snapshottest",
"specs": []
},
{
"name": "sphinx-rtd-theme",
"specs": []
},
{
"name": "readthedocs-sphinx-ext",
"specs": []
}
],
"tox": true,
"lcname": "ain-py"
}