Title
Expose remaining Topic and TopicDetails fields in the Python SDK
Description
The Python SDK's Topic and TopicDetails classes expose only a subset of the
fields available on their Rust counterparts (iggy::prelude::Topic /
TopicDetails), so a topic's full configuration can't be read from Python and
those fields can't be asserted in tests.
Already exposed:
TopicDetails: id, name, messages_count, partitions_count,
compression_algorithm, replication_factor
Topic: id, name, messages_count, partitions_count
This issue tracks adding getters (with docstrings) for the remaining fields.
TopicDetails:
created_at (IggyTimestamp)
size (IggyByteSize)
message_expiry (IggyExpiry)
max_topic_size (MaxTopicSize)
partitions (Vec<Partition>)
Topic:
created_at (IggyTimestamp)
size (IggyByteSize)
message_expiry (IggyExpiry)
compression_algorithm (CompressionAlgorithm)
max_topic_size (MaxTopicSize)
replication_factor (u8)
Affected area / component
Python SDK (foreign/python)
Proposed solution
Add #[getter] methods to Topic and TopicDetails in
foreign/python/src/topic.rs, regenerate apache_iggy.pyi via stub_gen, and
add corresponding tests. For the tri-state enum fields, settle on a faithful
Python representation (e.g. small wrapper classes) before implementing.
Alternatives considered
No response
Contribution
I will work on this once 3572 is closed.
Title
Expose remaining Topic and TopicDetails fields in the Python SDK
Description
The Python SDK's
TopicandTopicDetailsclasses expose only a subset of thefields available on their Rust counterparts (
iggy::prelude::Topic/TopicDetails), so a topic's full configuration can't be read from Python andthose fields can't be asserted in tests.
Already exposed:
TopicDetails:id,name,messages_count,partitions_count,compression_algorithm,replication_factorTopic:id,name,messages_count,partitions_countThis issue tracks adding getters (with docstrings) for the remaining fields.
TopicDetails:created_at(IggyTimestamp)size(IggyByteSize)message_expiry(IggyExpiry)max_topic_size(MaxTopicSize)partitions(Vec<Partition>)Topic:created_at(IggyTimestamp)size(IggyByteSize)message_expiry(IggyExpiry)compression_algorithm(CompressionAlgorithm)max_topic_size(MaxTopicSize)replication_factor(u8)Affected area / component
Python SDK (
foreign/python)Proposed solution
Add
#[getter]methods toTopicandTopicDetailsinforeign/python/src/topic.rs, regenerateapache_iggy.pyiviastub_gen, andadd corresponding tests. For the tri-state enum fields, settle on a faithful
Python representation (e.g. small wrapper classes) before implementing.
Alternatives considered
No response
Contribution
I will work on this once 3572 is closed.