Python examples: add a multi-tenant producer and consumer
维护者通常 1 天内回复
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 72/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- python
调研方向
Start with the Rust model at examples/rust/src/multi-tenant/producer/main.rs and the existing Python helper in examples/python/message-headers/common.py, then look at the permission classes and create_user/update_permissions in foreign/python/apache_iggy.pyi. Add examples/python/multi-tenant/producer.py and consumer.py plus a section in examples/python/README.md. Done when both scripts run with uv run against a fresh server, the producer shows that cross-tenant access is refused, and the README lists the commands.
由索引模型根据 Issue 内容生成。
描述
Description
The Rust, Java and Node examples include a multi-tenant example: each tenant gets its own stream and its own user, limited to that stream, and the example shows that a tenant cannot reach another tenant's stream. The Python examples have none.
Affected area / component
Python examples
Proposed solution
Add examples/python/multi-tenant/producer.py and consumer.py, and a README section in examples/python/README.md.
- Use
examples/rust/src/multi-tenant/producer/main.rsas the model. It takes the tenant count fromTENANTS_COUNT(default 3) and checks that other tenants' streams are refused. - The Python SDK already has
create_user(with an optionalpermissionsargument),update_permissions, and thePermissions,GlobalPermissions,StreamPermissionsandTopicPermissionsclasses inforeign/python/apache_iggy.pyi. - The producer creates each tenant's stream, topic and restricted user, sends messages as each tenant, and prints that reading another tenant's stream fails.
- The consumer reads one tenant's stream as that tenant.
- Use the argument and logging style of
message-headers/common.py.
How to test: start a fresh server, then run both scripts with uv run from examples/python. The README should list the commands.
Good first issue
- I think this could be a good first issue for a new contributor
- 主要语言
- Rust
- 星标
- 5.2k
- 派生
- 502
- 平均合并
- 3 天 3 小时
- 30 天内合并 PR
- 163
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/iggy 的其他 Issue
-
Go examples: add a message envelope producer and consumer可能已有人在做 @ThunderGod77 于 3 天前认领。 未关闭go good first issue
难度 2/5 1-3 小时 新手友好度 82/100
apache/iggy#4694 · 3 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
HTTP client treats a consumer group as a plain consumer可能已有人在做 @mohitduhan19 于 21 天前认领。 未关闭bug rust server
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
Add the fail-fast connection option to the Rust and Python quick-starts可能已有人在做 @QIW9 于 9 天前认领。 未关闭docs good first issue
难度 1/5 1-3 小时 新手友好度 92/100
维护者通常 1 天内回复
-
ResourceNotFound from the binary protocol prints an empty key可能已有人在做 @xalestar 今天认领。 未关闭api python rust
apache/iggy#4767 · 2 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Node SDK: send accepts malformed user headers that fail during polling可能已有人在做 @Subham-KRLX 于 1 天前认领。 未关闭bug good first issue javascript
apache/iggy#4750 · 3 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
相似的 Issue
-
🐞 bug 🧩 bevy_gantz_egui
难度 2/5 1-3 小时 新手友好度 82/100
nannou-org/gantz#500 ·
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 68/100
metasequoiaime/msime#10989 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
fritzprix/libr-agent#2612 ·
维护者通常 1 天内回复
-
crate: spate-core priority: low
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
NSPG13/agent-bounties#1749 ·
维护者通常 1 天内回复