nanotopy


Namenanotopy JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttps://github.com/gr0vity-dev/nanotopy
Summaryasync extended nano.to library for ease of use
upload_time2024-01-23 12:46:42
maintainer
docs_urlNone
authorgr0vity
requires_python>=3.7
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
### nanoto_py : Python gateway to rpc.nano.to
The goal is to create the easiest way to prototype nano apps.

Get your free API_KEY from https://rpc.nano.to and hack around!

### How to install :
``` 
pip install nanotopy
```
or from source :
```
git clone https://github.com/gr0vity-dev/nanotopy.git
cd nanotopy
pip install .
```



### Example code :
```python
import asyncio
from nanotopy.client import NanoTo

async def run():

    # This can only be done once ! Write down the key!
    AUTH_KEY = await NanoTo.get_auth_key("your@email.address")
    print(AUTH_KEY)
    nano_to = NanoTo(AUTH_KEY["key"])

    # Create a new nano account
    # Seed generation is done locally! No secrets are ever shared
    seed = NanoTo.generate_seed()
    seed_index = 0
    # Same seed and seed_index will ALWAYS result in the same private_key
    private_key = NanoTo.get_private_key_from_seed(seed, seed_index)
    account = NanoTo.get_account_from_key(private_key)
    print(account)

    # Get account info
    account_info = await nano_to.account_info(account)
    print(account_info)

    # Receive all blocks
    received_hashes = await nano_to.receive_blocks_many(private_key)
    print(received_hashes)


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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/gr0vity-dev/nanotopy",
    "name": "nanotopy",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "",
    "author": "gr0vity",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/a6/ba/ce3dc11603a60cb6ae0ba5689a4fee871f8aa4adbd76155762e1481d1a7c/nanotopy-0.1.0.tar.gz",
    "platform": null,
    "description": "\n### nanoto_py : Python gateway to rpc.nano.to\nThe goal is to create the easiest way to prototype nano apps.\n\nGet your free API_KEY from https://rpc.nano.to and hack around!\n\n### How to install :\n``` \npip install nanotopy\n```\nor from source :\n```\ngit clone https://github.com/gr0vity-dev/nanotopy.git\ncd nanotopy\npip install .\n```\n\n\n\n### Example code :\n```python\nimport asyncio\nfrom nanotopy.client import NanoTo\n\nasync def run():\n\n    # This can only be done once ! Write down the key!\n    AUTH_KEY = await NanoTo.get_auth_key(\"your@email.address\")\n    print(AUTH_KEY)\n    nano_to = NanoTo(AUTH_KEY[\"key\"])\n\n    # Create a new nano account\n    # Seed generation is done locally! No secrets are ever shared\n    seed = NanoTo.generate_seed()\n    seed_index = 0\n    # Same seed and seed_index will ALWAYS result in the same private_key\n    private_key = NanoTo.get_private_key_from_seed(seed, seed_index)\n    account = NanoTo.get_account_from_key(private_key)\n    print(account)\n\n    # Get account info\n    account_info = await nano_to.account_info(account)\n    print(account_info)\n\n    # Receive all blocks\n    received_hashes = await nano_to.receive_blocks_many(private_key)\n    print(received_hashes)\n\n\nif __name__ == \"__main__\":\n    asyncio.run(run())\n```\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "async extended nano.to library for ease of use",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/gr0vity-dev/nanotopy"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cbc661161de216ae0d0c47d3f89133f72b30b550278caa316d799929af5d408d",
                "md5": "f925bc078b088af4c27395d4a0b85d42",
                "sha256": "642fd70e15ea689be7a1526c2eec97d0dc60be477ee4e4be5d71399e9d1badd7"
            },
            "downloads": -1,
            "filename": "nanotopy-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f925bc078b088af4c27395d4a0b85d42",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 4461,
            "upload_time": "2024-01-23T12:46:40",
            "upload_time_iso_8601": "2024-01-23T12:46:40.580613Z",
            "url": "https://files.pythonhosted.org/packages/cb/c6/61161de216ae0d0c47d3f89133f72b30b550278caa316d799929af5d408d/nanotopy-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a6bace3dc11603a60cb6ae0ba5689a4fee871f8aa4adbd76155762e1481d1a7c",
                "md5": "e00e97a168f2262f2b976412a92f879f",
                "sha256": "b4881611c4827e94ad46e75d63178c5b9d7b1fa5ed1be489a1cd886b9976fffd"
            },
            "downloads": -1,
            "filename": "nanotopy-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e00e97a168f2262f2b976412a92f879f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 3964,
            "upload_time": "2024-01-23T12:46:42",
            "upload_time_iso_8601": "2024-01-23T12:46:42.147553Z",
            "url": "https://files.pythonhosted.org/packages/a6/ba/ce3dc11603a60cb6ae0ba5689a4fee871f8aa4adbd76155762e1481d1a7c/nanotopy-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-23 12:46:42",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "gr0vity-dev",
    "github_project": "nanotopy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "nanotopy"
}
        
Elapsed time: 0.23488s