The __all__ attribute controls the names that are directly accessible from outside the module. Non-public entities, usually denoted by names starting with an underscore (_), are not included in __all__ and are not intended for direct usage.