semvec/pypi-packages huggingface dataset:
zencoreipinfo 0.1.0
Get outgoing ip from https://zencore.cn/ipinfo.
License: MIT
Keywords: ipinfo

# zencoreipinfo

Get outgoing ip from https://zencore.cn/ipinfo.

## Install

```
pip install zencoreipinfo
```

## Usage in Cli

```
test@test zencoreipinfo % ipinfo --help
Usage: ipinfo [OPTIONS]

Options:
  --url TEXT   Server url. Can apply multiple times.
  -q, --quiet  Don't show error information.
  --help       Show this message and exit.

test@test zencoreipinfo % ipinfo
aaa.xxx.yy.zz

```

1. By default, the program will use the default ipinfo server `https://zencore.cn/ipinfo`.
1. We ship cli program in name `ipinfo`, and `zencoreipinfo` as it's alias.

## Usage in Script

```
In [1]: from zencoreipinfo import get_outgoing_ip

In [2]: ip = get_outgoing_ip()

In [3]: print(ip)
aaa.xxx.yy.zz
```

## How to implement self ipinfo server?

You need a linux server with a public ip address, and you need to install nginx service on the linux server. Add the ipinfo location into your site.

```
# your other configs

location /ipinfo {
    add_header Content-Type text/plain;
    return 200 $remote_addr;
}

# your other configs

```

After you setup your ipinfo server. Run the ipinfo command with --url prarameter.

```
test@test zencoreipinfo % ipinfo --url https://you.site.domain.cn/ipinfo
aaa.xxx.yy.zz
```

## About the ipinfo server of zencore.cn

We do not promise continuity or reliability of the service.


## Release

### 0.1.0

- First release.
tritonclient-futures 0.9.0
基于python标准库concurrent & requests封装tritonclient
License: MIT
Requires Python: >=3.8

# tritonclient-futures
<h2 align="center">特性</h2>

- **基于标准库concurrent与requests封装.**
- **完整复现tritonclient，上手简单.**

<h2 align="center">安装</h2>

```
pip install tritonclient-futures
```
<h2 align="center">示例</h2>

```
from tritonclient_futures import InferenceServerClient, InferInput, InferRequestedOutput, as_completed
```

```
# 客户端初始化
## url: tritonserver http url
## concurrency: 线程数
## pool_connections: 连接池个数
## pool_maxsize: 连接池的连接个数
client = InferenceServerClient(url='127.0.0.1:8000', concurrency=100, pool_connections=100, pool_maxsize=200)
```

```
# 同步调用
client.infer(model_name=model_name, inputs=inputs, outputs=outputs)

# 异步调用
fs = []
for i in iters:
    fs.append(client.async_infer(model_name=i["model_name"], inputs=i["inputs"], outputs=i["outputs"]))

resps = [f.get_result() for f in as_completed(fs)]
```

<h2 align="center">性能</h2>
不如grpc，不如gevent/aio