semvec/pypi-packages huggingface dataset:
dtmcli 1.7.7.0
python client for dtm

# dtmcli [![Version][version-badge]][version-link] ![MIT License][license-badge]


a client for distributed transaction manager [dtm](https://github.com/dtm-labs/dtm)


`dtmcli` 是分布式事务管理器[dtm](https://github.com/dtm-labs/dtm)的客户端sdk

## dtm分布式事务管理服务

DTM是一款跨语言的开源分布式事务管理器，优雅的解决了幂等、空补偿、悬挂等分布式事务难题。提供了简单易用、高性能、易水平扩展的分布式事务解决方案。

## 亮点

* 极易接入
  - 支持HTTP，提供非常简单的接口，极大降低上手分布式事务的难度，新手也能快速接入
* 使用简单
  - 开发者不再担心悬挂、空补偿、幂等各类问题，框架层代为处理
* 跨语言
  - 可适合多语言栈的公司使用。方便go、python、php、nodejs、ruby各类语言使用。
* 易部署、易扩展
  - 仅依赖mysql，部署简单，易集群化，易水平扩展
* 多种分布式事务协议支持
  - TCC、SAGA、XA、事务消息

## 与其他框架对比

目前开源的分布式事务框架，暂未看到非Java语言有成熟的框架。而Java语言的较多，有阿里的SEATA、华为的ServiceComb-Pack，京东的shardingsphere，以及himly，tcc-transaction，ByteTCC等等，其中以seata应用最为广泛。

下面是dtm和seata的主要特性对比：

|  特性| DTM | SEATA |备注|
|:-----:|:----:|:----:|:----:|
| 支持语言 |<span style="color:green">Golang、python、php及其他</span>|<span style="color:orange">Java</span>|dtm可轻松接入一门新语言|
|异常处理| <span style="color:green">[子事务屏障自动处理](https://zhuanlan.zhihu.com/p/388444465)</span>|<span style="color:orange">手动处理</span> |dtm解决了幂等、悬挂、空补偿|
| TCC事务| <span style="color:green">✓</span>|<span style="color:green">✓</span>||
| XA事务|<span style="color:green">✓</span>|<span style="color:green">✓</span>||
|AT事务|<span style="color:red">✗</span>|<span style="color:green">✓</span>|AT与XA类似，性能更好，但有脏回滚|
| SAGA事务 |<span style="color:orange">简单模式</span> |<span style="color:green">状态机复杂模式</span> |dtm的状态机模式在规划中|
|事务消息|<span style="color:green">✓</span>|<span style="color:red">✗</span>|dtm提供类似rocketmq的事务消息|
|通信协议|HTTP|dubbo等协议，无HTTP|dtm后续将支持grpc类协议|
|star数量|<img src="https://img.shields.io/github/stars/dtm-labs/dtm.svg?style=social" alt="github stars"/>|<img src="https://img.shields.io/github/stars/seata/seata.svg?style=social" alt="github stars"/>|dtm从20210604发布0.1，发展快|

从上面对比的特性来看，如果您的语言栈包含了Java之外的语言，那么dtm是您的首选。如果您的语言栈是Java，您也可以选择接入dtm，使用子事务屏障技术，简化您的业务编写。

### 使用方式

```python
from dtmcli import tcc

def fire_tcc():
    gid = tcc.tcc_global_transaction(dtm, gid, tcc_trans)
    return {"gid": gid}

def tcc_trans(t):
    req = {"amount": 30}
    t.call_branch(req, svc + "/TransOutTry", svc + "/TransOutConfirm", svc + "/TransOutCancel")
    t.call_branch(req, svc + "/TransInTry", svc + "/TransInConfirm", svc + "/TransInCancel")

```


### 安装

```
$ pip install dtmcli
```

### 完整示例

[dtmcli-py-sample](https://github.com/dtm-labs/dtmcli-py-sample)


### License

[MIT](https://github.com/dtm-labs/dtmcli/blob/master/LICENSE)


[version-badge]:   https://img.shields.io/pypi/v/dtmcli
[version-link]:    https://pypi.python.org/dtm-labs/dtmcli-py/
[license-badge]:   https://img.shields.io/github/license/dtm-labs/dtmcli-py
dhl-express 0.2.1
A Python library for interacting with DHL Express API
Requires Python: >=3.8

## Project Description

With *dhl-express*, you can use DHL API to create and manage your shipping labels.

## Requirements

* Python (3.8 or higher)

## Installation

Install using pip

`pip install dhl-express`

## Usage

Use the `DHLService` class to create a new instance of the service.

```python
from dhl_express import DHLService

service = DHLService(
    api_key='YOUR_API_KEY',
    api_secret='YOUR_API_SECRET',
    test_mode=True
)
```

Validate shipment address using the `validate_address` method.

```python
service.validate_address(
    country_code='DE',
    postal_code='12345',
    city='Berlin',
    street='Teststrasse',
    house_number='1'
)
```
Create a shipment using the `create_shipment` method.

```python
service.create_shipment(
    **shipment_data
)
```
Get shipment status using the `get_shipment_status` method.

```python
service.get_shipment_status(
    shipment_id='1234567890'
)
```
Get shipment proof using the `get_shipment_proof` method.

```python
service.get_shipment_proof(
    shipment_id='1234567890'
)
```

## P.S.

If you find bugs, need help, or want to talk to the developers, please write an issue
on [GitHub](https://github.com/DCDie/dhl-express/issues).
pinyin-tone-converter 1.0.2
Numbered pinyin to accented pinyin converter
Keywords: python,pinyin,pinyin-tone-converter,tones,numbered tones,marked tones,accented tones,chinese

# pinyin-tone-converter

<p align="center">
    <a href="https://circleci.com/gh/Synkied/pinyin-tone-converter">
        <img src="https://circleci.com/gh/Synkied/pinyin-tone-converter.svg?style=svg" alt="TravisCI Build Status"/>
    </a>
</p>

Python library to convert pinyin with numbers to tone with marks. This library is based on https://github.com/chanind/pinyin-tone-converter

## Install

```python
pip install pinyin-tone-converter
```

## How to use

```python
from pinyin_tone_converter.pinyin_tone_converter import PinyinToneConverter
PinyinToneConverter().convert_text("lu4")

"lù"
```

Examples can be seen in tests.