sleap-share
Python client for SLEAP Share - upload and share SLEAP datasets.
Installation
pip install sleap-share
Or use with uvx for one-off commands:
uvx sleap-share upload labels.slp
Quick Start
Command Line
# Upload a file (no account needed)
sleap-share upload labels.slp
# → https://slp.sh/aBcDeF
# Download a file
sleap-share download aBcDeF
# Get file info
sleap-share info aBcDeF
# Authenticate for more features
sleap-share login
# List your uploads
sleap-share list
# Delete a file
sleap-share delete aBcDeF
Python API
import sleap_share
# Upload (anonymous)
result = sleap_share.upload("labels.slp")
print(result.share_url) # https://slp.sh/aBcDeF
# Download
sleap_share.download("aBcDeF", output="./data/")
# Get metadata
metadata = sleap_share.get_metadata("aBcDeF")
print(f"Labeled frames: {metadata.labeled_frames_count}")
# Lazy loading (stream data on-demand without full download)
import sleap_io
url = sleap_share.open("aBcDeF")
labels = sleap_io.load_slp(url) # Only fetches accessed data!
Authenticated Operations
# Use stored credentials from `sleap-share login`
client = sleap_share.Client()
# Or provide token directly
client = sleap_share.Client(token="slpsh_live_...")
# List your files
files = client.list_files()
# Delete a file
client.delete("aBcDeF")
# Get user info
user = client.whoami()
CLI Commands
| Command | Description |
|---|---|
login |
Authenticate via browser |
logout |
Clear stored credentials |
whoami |
Show current user |
upload <file> |
Upload a .slp file |
download <id> |
Download a file |
list |
List your uploads |
info <id> |
Show file metadata |
preview <id> |
Download preview image |
delete <id> |
Delete a file |
version |
Show version |
Global Options
--env staging- Target staging environment instead of production--help- Show help for any command
Environment Variables
SLEAP_SHARE_ENV- Default environment (productionorstaging)
Token Storage
Credentials are stored securely using:
- System keyring (macOS Keychain, Windows Credential Manager, Linux Secret Service)
- Fallback:
~/.config/sleap-share/credentialswith0600permissions
Development
cd client
# Install dependencies
uv sync --all-extras
# Run tests
uv run pytest
# Lint and format
uv run ruff check .
uv run ruff format .
# Type check
uv run mypy src/sleap_share
Releasing
New versions are published to PyPI via GitHub Releases.
Steps to Release
-
Update version in
pyproject.tomlandsrc/sleap_share/__init__.py -
Update CHANGELOG.md with the new version and release notes
-
Create a GitHub Release:
- Go to Releases
- Tag:
client-v{version}(e.g.,client-v0.2.0) - Title:
Python Client v{version} - Description: Copy from CHANGELOG.md
- Click Publish release
-
The GitHub Action will automatically:
- Run tests on Python 3.9-3.13
- Run linting and type checks
- Build the package
- Publish to PyPI via OIDC trusted publishing
Version Scheme
Tags must start with client-v to trigger publishing (e.g., client-v0.1.0, client-v1.0.0).
This prefix distinguishes Python client releases from other releases in the monorepo.
License
MIT License - see LICENSE for details.
Metadata
Release files for sleap-share 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sleap_share-0.1.3.tar.gz | 69.6 kB | Without provenance | Details for sleap_share-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sleap_share-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for sleap_share-0.1.3-py3-none-any.whl |
Total release size: 91.2 kB
Security for sleap-share 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.