apache / iceberg-python

Apache PyIceberg
https://py.iceberg.apache.org/
Apache License 2.0
472 stars 174 forks source link

Explicitly declare supported public APIs with '__all__' #1099

Open sungwy opened 2 months ago

sungwy commented 2 months ago

Feature Request / Improvement

Currently, we rely on the informal naming conventions (with or without underscore) to distinguish between a public or private API.

It will be helpful to declare the names of public APIs in the __all__ attribute on all our public API supporting modules as it will:

ndrluis commented 2 days ago

@sungwy I created a document with the idea to discuss and make it easier for other contributors to help us with this task. I added an example of the table module/class, but before we start defining it, I believe we need to discuss more about the mix of code styles we currently have. Sometimes we expose functions, and in other cases, we expose classes. It would be nice for us to define a "specification" to maintain consistency, and then we can start designing the API.

What do you think?