Thrift client pool for Takumi.
Install
$ pip install takumi-client
Usage
This module relies on takumi-config for settings.
CLIENT_SETTINGS
service: required, service name defined in thrift file
thrift_file: required, existing thrift file path
pool_size: optional, connection pool size, default 30
timeout: optional, connection timeout, default 30s
check_time: optional, time interval for checking failed connections, default 10s
hosts: optional, a list of hosts: [(‘hostname’, port)]
extra args: vary for different hosts extensions
Example settings:
CLIENT_SETTINGS = {
'demo': {
'service': 'PingService',
'thrift_file': 'ping.thrift',
'hosts': [
('localhost', 1990),
('localhost', 8010),
('localhost', 1890)
]
}
}
To get a pool:
from takumi_client import clients
pool = clients['demo']
To invoke an api:
with pool.client_ctx() as c:
c.ping()
Metadata
Release files for takumi-client 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| takumi_client-0.1.3.tar.gz | 4.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| takumi_client-0.1.3-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 12.0 kB
Release files / takumi_client-0.1.3.tar.gz
| Download URL | takumi_client-0.1.3.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
474644739d909c1b0cfff22c4192a364b2cce7b277c29beff0600243e2d5a9c4
|
|
BLAKE2b-256 checksum How to use checksums |
23613c27e6aa9edb0f11d3ba4d6001d168b3f9b332153a5e69dfebf7d1b16a5c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / takumi_client-0.1.3-py2.py3-none-any.whl
| Download URL | takumi_client-0.1.3-py2.py3-none-any.whl |
|---|---|
| Size | 7.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
12300842892fb8cd4bde58cda4406a5547a7ed8e62fc91b0898b6d3fc5b8bdf8
|
|
BLAKE2b-256 checksum How to use checksums |
5ae63a826c88bc80dfab6cea8b7ba891f7c6ac4a697e6fdfee26b08327566a4f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for takumi-client 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.