niota


Nameniota JSON
Version 0.8.0 PyPI version JSON
download
home_pagehttps://github.com/numbersprotocol/niota
SummaryNumbers IOTA tool
upload_time2023-06-23 10:46:38
maintainer
docs_urlNone
authorNumbers Co., Inc
requires_python>=3.6
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # NIOTA

Make IOTA to be an integrity chain.

Niota registers Asset history records to the integrity chain.

## Installation

```shell
python3 -m pip install niota
 ```

## Unit Testing

```shell
make test
```

## Usage

### Iota Client

The `IotaClient` class is a client to interact with [IOTA REST API](https://editor.swagger.io/?url=https://raw.githubusercontent.com/rufsam/protocol-rfcs/master/text/0026-rest-api/0026-rest-api.yaml).

Below is a minimal example for connecting to an IOTA hornet node with JWT authentication enabled, and create a message.

```python
from niota import IotaClient

iota = IotaClient(base_url='https://example.iota.hornet.node', jwt_token='enter JWT token here')
create_message_resp = iota.create_message('example-index', 'example-data')
message_id = create_message_resp.data.messageId
```


### Niota client

The `Niota` class can be used as a client to interact with IOTA Tangle messages with Numbers Protocol integrity record format.

```python

example_integrity_info = {
    'raw_cid': 'bafkreihdwdcefgh4dqkjv67uzcmw7ojee6xedzdetojuzjevtenxquvyku',
    'ida_cid': 'bafkreihdwdcefgh4dqkjv67uzcmw7ojee6xedzdetojuzjevtenxquvyku',
    'ida_mid': 'c7dfa6e5-346d-4b4d-a663-a421e7f9171f',
    'ida_sha256sum': 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',
    'metadata_cid': 'bafkreidgkmzpzvot7a5r2iy44tmcojuvoyjgbwi5udldfisbvn4lnfrmoq',
    'service_message': 'Create test data',
}

niota = Niota(
    base_url='https://example.iota.hornet.node',
    jwt_token='enter JWT token here'
    private_key=private_key,
    public_key=public_key,
)
message_id, index = niota.create_message(**message_data_fixture)

```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/numbersprotocol/niota",
    "name": "niota",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "",
    "author": "Numbers Co., Inc",
    "author_email": "hi@numbersprotocol.io",
    "download_url": "https://files.pythonhosted.org/packages/01/50/abd1f139e21f7045e2a873fbd58fa10f1b68ed80a7d63b8c2d07ef87149c/niota-0.8.0.tar.gz",
    "platform": null,
    "description": "# NIOTA\n\nMake IOTA to be an integrity chain.\n\nNiota registers Asset history records to the integrity chain.\n\n## Installation\n\n```shell\npython3 -m pip install niota\n ```\n\n## Unit Testing\n\n```shell\nmake test\n```\n\n## Usage\n\n### Iota Client\n\nThe `IotaClient` class is a client to interact with [IOTA REST API](https://editor.swagger.io/?url=https://raw.githubusercontent.com/rufsam/protocol-rfcs/master/text/0026-rest-api/0026-rest-api.yaml).\n\nBelow is a minimal example for connecting to an IOTA hornet node with JWT authentication enabled, and create a message.\n\n```python\nfrom niota import IotaClient\n\niota = IotaClient(base_url='https://example.iota.hornet.node', jwt_token='enter JWT token here')\ncreate_message_resp = iota.create_message('example-index', 'example-data')\nmessage_id = create_message_resp.data.messageId\n```\n\n\n### Niota client\n\nThe `Niota` class can be used as a client to interact with IOTA Tangle messages with Numbers Protocol integrity record format.\n\n```python\n\nexample_integrity_info = {\n    'raw_cid': 'bafkreihdwdcefgh4dqkjv67uzcmw7ojee6xedzdetojuzjevtenxquvyku',\n    'ida_cid': 'bafkreihdwdcefgh4dqkjv67uzcmw7ojee6xedzdetojuzjevtenxquvyku',\n    'ida_mid': 'c7dfa6e5-346d-4b4d-a663-a421e7f9171f',\n    'ida_sha256sum': 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855',\n    'metadata_cid': 'bafkreidgkmzpzvot7a5r2iy44tmcojuvoyjgbwi5udldfisbvn4lnfrmoq',\n    'service_message': 'Create test data',\n}\n\nniota = Niota(\n    base_url='https://example.iota.hornet.node',\n    jwt_token='enter JWT token here'\n    private_key=private_key,\n    public_key=public_key,\n)\nmessage_id, index = niota.create_message(**message_data_fixture)\n\n```\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Numbers IOTA tool",
    "version": "0.8.0",
    "project_urls": {
        "Homepage": "https://github.com/numbersprotocol/niota"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f7bbb8aa91be22b9b29af4ec82a015156f62362b8e0d1819491face81df43c52",
                "md5": "d578e0e01e9fe55579c41b0a56db5c5b",
                "sha256": "a3bf9a0f9383e3d04d8eff3f45ffac5b66ef02f04643a7ed01dbdbf222fe06ab"
            },
            "downloads": -1,
            "filename": "niota-0.8.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d578e0e01e9fe55579c41b0a56db5c5b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 6792,
            "upload_time": "2023-06-23T10:46:37",
            "upload_time_iso_8601": "2023-06-23T10:46:37.530958Z",
            "url": "https://files.pythonhosted.org/packages/f7/bb/b8aa91be22b9b29af4ec82a015156f62362b8e0d1819491face81df43c52/niota-0.8.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0150abd1f139e21f7045e2a873fbd58fa10f1b68ed80a7d63b8c2d07ef87149c",
                "md5": "7085af05880dac00df28dace12bae5a9",
                "sha256": "f75e85330c75e1a4634183487352e194b49754a14c9785dbe2669510c802bb0c"
            },
            "downloads": -1,
            "filename": "niota-0.8.0.tar.gz",
            "has_sig": false,
            "md5_digest": "7085af05880dac00df28dace12bae5a9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 7516,
            "upload_time": "2023-06-23T10:46:38",
            "upload_time_iso_8601": "2023-06-23T10:46:38.893423Z",
            "url": "https://files.pythonhosted.org/packages/01/50/abd1f139e21f7045e2a873fbd58fa10f1b68ed80a7d63b8c2d07ef87149c/niota-0.8.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-23 10:46:38",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "numbersprotocol",
    "github_project": "niota",
    "github_not_found": true,
    "lcname": "niota"
}
        
Elapsed time: 0.20044s