使用手册
快速开始
1)生产者
import kafkaplus
producer = kafkaplus.getProducer("localhost:9092")
# 发送一条消息
producer.send("test_topic", "data-a")
# 同步发送一条消息
producer.sendSync("test_topic", "data-b")
# 批量发送消息
producer.sendBatch("test_topic", "data1", "data2", "data3")
2)消费者
import kafkaplus
# 接收消息的回调函数
def callback(data, **kwargs):
print(data)
print(kwargs)
consumer = kafkaplus.getConsumer("localhost:9092")
# 监听topic,使用回调函数处理消息
consumer.onListener("test_topic",group="G-test",callback=callback)
Metadata
Release files for kafkaplus 0.0.1
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 | |
|---|---|---|---|---|
| kafkaplus-0.0.1.tar.gz | 5.1 kB | Without provenance | Details |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kafkaplus-0.0.1-py3.9.egg | Legacy Egg format | - | - | Details |
| kafkaplus-0.0.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 15.2 kB
Release files / kafkaplus-0.0.1.tar.gz
| Download URL | kafkaplus-0.0.1.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1ab0625dcc74b95f79ad79711772ed6c85c8cfe1f97ac7dd893b2b7d3af849f2
|
|
BLAKE2b-256 checksum How to use checksums |
5649920e0f5dcd358f2cc89adf1644715d43171c03226ba31549b9cbdd2d25cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Release files / kafkaplus-0.0.1-py3.9.egg
| Download URL | kafkaplus-0.0.1-py3.9.egg |
|---|---|
| Size | 6.4 kB |
| Tags | Egg |
|
SHA-256 checksum How to use checksums |
f1cb2f464788e80f5dcada073db85312aed9ce5b2bcd4e2c7330b0578dc812de
|
|
BLAKE2b-256 checksum How to use checksums |
a7247763020cccd32322ffa2e99d3f1e9d5f205d1ab872e3ef7111dd57c8ad41
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Release files / kafkaplus-0.0.1-py2.py3-none-any.whl
| Download URL | kafkaplus-0.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
8a362238d9d9e35b78da104e2c6bb141cdc2550fdc6117edc9595f853aad5fda
|
|
BLAKE2b-256 checksum How to use checksums |
76b49e69af080331e52fbdd5529c1e76185ff1534e35d7df3430c7be58ffd5a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
|
Security for kafkaplus 0.0.1
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.