semvec/pypi-packages huggingface dataset:
antchain-ak-727a48eea1b24a469ff11ca2938fb727 1.0.0
Ant Chain Ak_727a48eea1b24a469ff11ca2938fb727 SDK Library for Python
License: Apache License 2.0
Requires Python: >=3.6
Keywords: antchain,ak,727a48eea1b24a469ff11ca2938fb727

English | [简体中文](README-CN.md)

## Ant Chain ak_727a48eea1b24a469ff11ca2938fb727 SDK for Python

## Requirements

- Python >= 3.6

## Installation

- **Install with pip**

Python SDK uses a common package management tool named `pip`. If pip is not installed, see the [pip user guide](https://pip.pypa.io/en/stable/installing/ "pip User Guide") to install pip.

```bash
# Install the antchain-ak_727a48eea1b24a469ff11ca2938fb727
pip install antchain-ak_727a48eea1b24a469ff11ca2938fb727
```

## Issues

[Opening an Issue](https://github.com/alipay/antchain-openapi-prod-sdk/issues/new), Issues not conforming to the guidelines may be closed immediately.

## Usage

[Quick Examples](https://github.com/alipay/antchain-openapi-prod-sdk)

## Changelog

Detailed changes for each release are documented in the [release notes](./ChangeLog.md).

## References

- [Latest Release](https://github.com/alipay/antchain-openapi-prod-sdk/tree/master/python)

## License

[Apache-2.0](http://www.apache.org/licenses/LICENSE-2.0)

Copyright (c) 2009-present, Alibaba Cloud All rights reserved.
nice-datapath 0.0.1
easy data picker
License: Apache License 2.0
Requires Python: >=3

# nice-datapath User Guide

------

### Talk is cheap. Show me the code

```python
from datapath import value, register_pipe


import datapath


def concat(*args):
    return "".join(args)


def test_value():
    data = {
        "f1": "a",
        "f2": 2,
        "f3": {
            "f4": "b",
            "f5": 3,
            "f6": [
                "l1", "l2", "l3"
            ],
        },
        "f7": [
            {
                "f8": "f8-1",
                "f9": [1, 2, 3]
            },
            {
                "f8": "f8-2",
                "f9": [1, 2, 3]
            },
            {
                "f8": "f8-3",
                "f9": [1, 2, 3]
            }
        ],
        "f10": {
            "f11": [
                [{"f12": [1]}],
                [{"f12": [2]}],
                [{"f12": 3}],
            ]
        },
        "f13": '{"a": 1}',
        "f14": 0.01123,
        "f15": 0.01,
        "f16": 23.79
    }

    datapath.register_pipe("concat", concat)
    assert datapath.value(data, "f1") == "a"
    assert datapath.value(data, "f2") == 2
    assert datapath.value(data, "f2|str") == "2"
    assert datapath.value(data, "f3.f4") == "b"
    assert datapath.value(data, "f3.f5") == 3
    assert datapath.value(data, "f3.f5 | str  ") == "3"
    assert datapath.value(data, "f3.f6") == ["l1", "l2", "l3"]
    assert datapath.value(data, "f3.f6") == ["l1", "l2", "l3"]
    assert datapath.value(data, "f3.f6|jsondump") == '["l1", "l2", "l3"]'
    assert datapath.value(data, "f7.f8") == ["f8-1", "f8-2", "f8-3"]
    assert datapath.value(data, "f7.f9") == [[1, 2, 3], [1, 2, 3], [1, 2, 3]]
    assert datapath.value(data, "f10.f11.f12") == [[[1]], [[2]], [3]]
    assert datapath.value(data, "f13 | jsonload") == {"a": 1}
    assert datapath.value(data, "f14 | %") == "1.123%"
    assert datapath.value(data, "f14 | % 0") == "1%"
    assert datapath.value(data, "f14 | % 1") == "1.1%"
    assert datapath.value(data, "f14 | % 2") == "1.12%"
    assert datapath.value(data, "f14 | % 3") == "1.123%"
    assert datapath.value(data, "f14 | % 4") == "1.1230%"
    assert datapath.value(data, "f14 | % 5") == "1.12300%"
    assert datapath.value(data, "f15 | %") == "1%"
    assert datapath.value(data, "f16 | int") == 23
    assert datapath.value(data, "f16 | float") == 23.79
    assert datapath.value(data, "f16 | str | concat a b c") == "23.79abc"
```