Skip to content

Add __dir__ whitelist to SyftboxManager for cleaner Colab autocomplete#140

Merged
koenvanderveen merged 1 commit intomainfrom
koen/api-cleanup-2
Feb 18, 2026
Merged

Add __dir__ whitelist to SyftboxManager for cleaner Colab autocomplete#140
koenvanderveen merged 1 commit intomainfrom
koen/api-cleanup-2

Conversation

@koenvanderveen
Copy link
Collaborator

Summary

  • Add _PUBLIC_API whitelist and __dir__ override to SyftboxManager so that Colab/IPython autocomplete only shows the 27 user-facing API names
  • Hides ~30+ Pydantic internals (model_dump, model_fields, etc.) and internal fields (datasite_owner_syncer, file_writer, etc.) from Tab completion
  • All hidden attributes remain fully accessible via direct access
  • Add unit test verifying public API visibility and internal hiding

Test plan

  • just test-unit-fast — all 175 tests pass
  • In Colab: manager = SyftboxManager.for_colab(email, only_ds=True) then Tab-complete on manager. — should show clean API only

🤖 Generated with Claude Code

@koenvanderveen koenvanderveen merged commit 36a5522 into main Feb 18, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments