semvec/pypi-packages huggingface dataset:
tcsdk 0.0.6
tcloud sdk for upload data!

![](https://img.shields.io/pypi/v/tcsdk.svg) [![Build Status](https://travis-ci.com/tsbxmw/tcsdk.svg?branch=master)](https://travis-ci.com/tsbxmw/tcsdk)

# tcsdk

Tcloud SDK for Performance DataSource Program.


# Overview

The Main Program: https://github.com/tsbxmw/datasource

Using for upload data of the program.

# Example

## Auth

Using auth to complete the authorization.

```python
from tcsdk import Auth

auth = Auth("key", "secret")
```

## Init ApiService

Init ApiService with endpoint

```python
from tcsdk import Api

api = Api(auth=auth, endpoint="http://localhost:9030")
```

## Create Task By Api

Task is create by api object, you should offer the `task_name`, otherwise system would offer the "".

```python

task = api.create_task("test")
```

If you offer the `label_name` after the `task_name` in `create_task`, you would get an default `label` with name `label_name` which in `task.labels`. 

## Create Label By Task

Label is the sub process of task, you can also create a label by `label_name`.

```python
label = task.create_label("test")
```

Notice: `task_name` has no relationship with `label_name` .


## Now, you can upload the label data!

```python
label.upload(fps=100)
```

## Full example

```python
from tcsdk import *


if __name__ == "__main__":
    auth = Auth("4c8093f3", "200f759b-1b83-4d")
    api = Api(auth=auth, endpoint="http://localhost:9030")
    task = api.create_task("test_for_sdk_111")
    assert task.task_id != 0

    label = task.create_label("test_for_sdk11")
    assert label.label_id != 0

    assert label.upload(fps=100) is True
```
python-ada 1.0.0
Python library for the ada REST API

# Adapy library
The library now supports create address, push and get transactions for both python 2.7 and 3.x
# Installation
## Linux
```sh
# create virtual environment
mkdir -p ~/envs/adaspy
virtualenv ~/envs/adapy
# activate the environment
source ~/envs/eospy/bin/activate
# install from github
# look [here](https://github.com/khanhct/adapy/releases) for the latest release.
pip install git+https://github.com/khanhct/adapy.git@<release>
# install the library from pip
pip install adapy
```
## Docker Container
```sh
docker-compose up
```

# API Endpoints
For a more complete list of API endpoints check out:
https://cardanodocs.com/technical/wallet/api/

# Example
## Create Address
```sh
from adapy.nodeada import NodeAda
from adapy.wallet import Wallet
import hashlib
no = NodeAda(url='https://localhost:8090/api', version='v1')
wl = Wallet(url='https://localhost:8090/api', version='v1')
print(no.create_address(2520553453, "46734b4a5a6454556c6137356c616171797573793549676864445a6741756c55","2cWKMJemoBakEUmdoCBWmG3b1ya6aa9hcmGF5UY6eqZbXcpzkcwNuEoXMrGvcRW1mDxjA"))
```
## Get transactions
```sh
from adapy.nodeada import NodeAda
from adapy.wallet import Wallet
import hashlib
no = NodeAda(url='https://localhost:8090/api', version='v1')
wl = Wallet(url='https://localhost:8090/api', version='v1')
params = {'wallet_id': '2cWKMJemoBakEUmdoCBWmG3b1ya6aa9hcmGF5UY6eqZbXcpzkcwNuEoXMrGvcRW1mDxjA', 'account_index': 2520553453, 'created_at': 'RANGE[2019-12-24T07:25:18.788036, 2019-12-24T07:25:18.788036]', 'page': 1, 'sort_by': 'DES', 'per_page': 20}
print(no.get_trxs(params))
```

## Push transaction
```sh
from adapy.nodeada import NodeAda
from adapy.wallet import Wallet
import hashlib
no = NodeAda(url='https://localhost:8090/api', version='v1')
wl = Wallet(url='https://localhost:8090/api', version='v1')
trx = {
    "destinations": [
        {
        "address": "37btjrVyb4KDhZhhAQ2yK2RoJ1k4fQAxoFZJ78sgPhsZiQWV2KwgDhqRsjhA2JsiKs6N74V98GPVwSGdjopFv22ksggjCc5xVyW3pGQ954okXPQ5Yj",
        "amount": 500 * 1000000
        }
    ],
    "groupingPolicy": "OptimizeForHighThroughput",
    "source": {
        "accountIndex":2520553453,
        "walletId": "2cWKMJemoBakEUmdoCBWmG3b1ya6aa9hcmGF5UY6eqZbXcpzkcwNuEoXMrGvcRW1mDxjA"
    },
    "spendingPassword": "46734b4a5a6454556c6137356c616171797573793549676864445a6741756c55"
}
try:
    result = no.send_trx(trx_data=trx)
    print(result)
except Exception as ex:
    print(ex)
```