Skip to main content

Jupyter kernel provisioner package for Cybershuttle

Project description

cybershuttle-jupyter-kernel

A small example repository that demonstrates a minimal pattern for implementing a Jupyter-style kernel provisioner and how to integrate it with a Jupyter server's kernel lifecycle.

This repository includes a sample provisioner, a tiny CLI, and tests. The sections below show how to build, install, and publish the package (sdist and wheel), how to test locally, and suggestions for CI publishing.

Quick start

Install test deps and run the sample provisioner:

python -m pip install -r requirements.txt
python run_kernel.py run --id demo --mode sample
# press Ctrl-C to stop

Run tests:

PYTHONPATH=. pytest -q

Install editable (developer workflow):

python -m pip install -e .

Packaging and build instructions

Below are step-by-step packaging commands for macOS/zsh. They create an sdist and a wheel in dist/, validate them, and show how to install and (optionally) upload to TestPyPI/PyPI.

  1. Create and activate a build virtual environment (recommended)
python -m venv .venv-build
source .venv-build/bin/activate
python -m pip install --upgrade pip
  1. Install build tools
python -m pip install --upgrade build twine
  1. Ensure pyproject.toml contains a proper project name and version

Open pyproject.toml and set project.version (for example 0.1.0) and confirm project.name is the package name you want to publish. Example:

[project]
name = "cybershuttle-kernel-example"
version = "0.1.0"
requires-python = ">=3.8"
description = "Example kernel provisioner package"
readme = "README.md"
authors = [{ name = "cyber-shuttle" }]
  1. Build sdist and wheel
python -m build --sdist --wheel
# artifacts are in ./dist
ls -l dist/
  1. Validate artifacts
python -m twine check dist/*
  1. Install locally from the wheel to test the installed package
python -m pip install dist/*.whl
python -c "import cybershuttle_kernel; print('ok', getattr(cybershuttle_kernel, '__all__', None))"
  1. Publish to TestPyPI (recommended first)
python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
  • Install from TestPyPI to verify:
python -m pip install --index-url https://test.pypi.org/simple/ --no-deps cybershuttle-kernel-example
  1. Publish to PyPI (when ready)
python -m twine upload dist/*
  1. Cleanup build artifacts (optional)
rm -rf build dist *.egg-info

Common issues and troubleshooting

  • Missing build tools: run python -m pip install --upgrade build setuptools wheel.
  • pyproject metadata errors: twine check will point out missing/invalid fields.
  • Versioning: ensure project.version is updated for each release.
  • Package name: the installable package name comes from project.name in pyproject.toml, not the repository name.
  • Editable vs built package: pip install -e . is for local development. For distribution, create the wheel and sdist and upload.

Continuous integration (optional)

You can add a GitHub Actions workflow to run tests and publish on tags. The workflow commonly:

  • runs tests on push/PR,
  • builds artifacts on tag, and
  • uploads to PyPI using a repository secret for TWINE_USERNAME and TWINE_PASSWORD (or TWINE_API_TOKEN).

If you'd like, I can add a sample .github/workflows/publish.yml that:

  • runs pytest,
  • builds artifacts,
  • uploads to TestPyPI on a test-* tag and to PyPI on a release tag.

Security and best practices

  • Use TestPyPI for initial verification to avoid polluting the real PyPI.
  • Use API tokens for Twine uploads; store them as encrypted secrets in CI.
  • Pin your development dependencies where appropriate.

If you want me to run a local build here and show the created dist/ files, I can do that (I won't upload to PyPI without credentials). Tell me if you'd like me to run the build now.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cspyk-0.1.0.tar.gz (16.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cspyk-0.1.0-py3-none-any.whl (18.4 kB view details)

Uploaded Python 3

File details

Details for the file cspyk-0.1.0.tar.gz.

File metadata

  • Download URL: cspyk-0.1.0.tar.gz
  • Upload date:
  • Size: 16.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.6

File hashes

Hashes for cspyk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ec9a5f2d610bf1fc4fcd61ea92db4d6b7eb48a66a38e90258c7e3b20e96a0ed3
MD5 ffd4c1fe6f0f924ec5d999940c7d7fde
BLAKE2b-256 7997547a54a396103eeab8ce52fdff01abbe78be593e7d378946f7234331676e

See more details on using hashes here.

File details

Details for the file cspyk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: cspyk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.6

File hashes

Hashes for cspyk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5d644b3347ca30956febf7505a87c44d92e598a7e7f30b31091eac25fdf46889
MD5 4236b829dd3c7bc93d5c5a24353a8514
BLAKE2b-256 b80c999f45616bc9c031c39d4c337d3420d0205d38f2ceb66911f391a1eaea01

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page