Uploading a Plugin to PyPI
Once your plugin is developed and tested, you can share it with the DashAI community on PyPI.
Prerequisites
Before uploading, ensure you have completed:
- Plugin Structure — Your plugin has the correct folder and configuration format
- Developing a Plugin — Your plugin is fully implemented and tested locally
Publishing Your Plugin to PyPI
This guide uses twine to upload your package, though other methods are available.
Step 1: Build Your Package
Install the build tools:
python -m pip install --upgrade build
Build your plugin package:
python -m build
This creates two distribution files in the dist/ folder:
dist/
├── dashai_my_plugin-0.0.1-py3-none-any.whl
└── dashai_my_plugin-0.0.1.tar.gz
Step 2: Obtain a PyPI API Token
- Create a PyPI account (if you don't have one)
- Go to your API tokens page
- Click "Add API token"
- Save the token in a secure location (you'll need it in the next step)
Step 3: Upload to Test PyPI (Recommended First)
Before uploading to the production PyPI, test your package on Test PyPI:
Install twine:
python -m pip install --upgrade twine
Upload to Test PyPI:
python -m twine upload --repository testpypi dist/*
When prompted, use:
- Username:
__token__ - Password:
<your-test-pypi-token>
Visit https://test.pypi.org/project/dashai-my-plugin/ to verify your package appears correctly.
Step 4: Upload to Production PyPI
Once testing is complete, upload to the official PyPI:
python -m twine upload --repository pypi dist/*
When prompted, use:
- Username:
__token__ - Password:
<your-pypi-token>
Your plugin is now live on PyPI! Users can install it with:
pip install dashai-my-plugin
Important Notes
Naming Convention
Ensure your package uses the dashai- prefix (e.g., dashai-my-plugin) so DashAI automatically discovers it when installed.
Package Metadata
Your pyproject.toml should include:
- Clear description and keywords
- Entry points for plugin classes
- Homepage and repository links
- License information
Versioning
Follow Semantic Versioning:
0.0.1for initial releases0.1.0for minor feature additions1.0.0for stable releases with API stability
Sharing Your Plugin
After publishing, share your plugin with the community:
- Add a topic
dashai-pluginto your GitHub repository - Announce it on GitHub Discussions
- Consider adding documentation or a tutorial
Happy sharing! 🚀