You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, users need to import core classes like Catalog and Table from the implementation-specific module py4j:
from pypaimon.py4j import Catalog
from pypaimon.py4j import Table
This exposes internal technical details and creates unnecessary coupling between user code and the implementation mechanism.
I propose to expose these core classes at the package root level by re-exporting them in init.py, allowing users to import directly from the main package:
from pypaimon import Catalog
from pypaimon import Table
Benefits:
Cleaner and more intuitive API - users don't need to know about the underlying Py4J implementation
More flexibility for future refactoring - we can change the underlying implementation without breaking user code
Follows Python best practices of providing a clean public API
This change maintains backward compatibility while providing a better developer experience.
The text was updated successfully, but these errors were encountered:
chenghuichen
changed the title
[Enhancement] Simplify Import Paths by Exposing Core Classes at Package Root
[Enhancement] Simplify Import Paths by truncating py4j
Feb 23, 2025
chenghuichen
added a commit
to chenghuichen/paimon-python
that referenced
this issue
Feb 23, 2025
Currently, users need to import core classes like Catalog and Table from the implementation-specific module py4j:
This exposes internal technical details and creates unnecessary coupling between user code and the implementation mechanism.
I propose to expose these core classes at the package root level by re-exporting them in init.py, allowing users to import directly from the main package:
Benefits:
This change maintains backward compatibility while providing a better developer experience.
The text was updated successfully, but these errors were encountered: