nbs-sim
nbs-sim provides a configurable EPICS simulation IOC for NBS beamline environments.
It builds a caproto-based IOC from startup configuration files and simulated device
classes so UIs and orchestration systems can be exercised without hardware.
Features
- Loads simulated devices from configuration
- Exposes PVs through a caproto IOC.
- Supports startup from a profile startup directory or explicit config file paths.
- Includes simulation device classes for motors, shutters, detectors, optics, and beamline-specific components.
Requirements
- Python
>=3.8 - Runtime dependencies from
pyproject.toml:caprotoscipynumpynbs-blnbs-core
Installation
pip (editable)
pip install -e .
pixi
If you use pixi in this monorepo:
pixi install
pixi run python -m pip install -e .
Running the IOC
The CLI entrypoint is nbs-sim.
Option 1: startup directory
Point to a startup directory that contains:
devices.tomlsim_conf.toml
nbs-sim --startup-dir /path/to/startup --list-pvs
Option 2: explicit file paths
nbs-sim \
--device-file /path/to/devices.toml \
--config-file /path/to/sim_conf.toml \
--list-pvs
If neither --startup-dir nor both config file options are provided, startup exits
with a CLI error.
How it works
nbs_sim.beamline:mainparses CLI arguments and loads device configuration.generate_device_configmerges the device and simulation configuration files.loadFromConfiginstantiates devices withcreateIOCDevice.- The IOC is started with caproto
run(...).
Development
Install development tools:
pip install -e ".[dev]"
Run tests:
pytest
Format and lint:
black src
flake8 src
Package layout
src/nbs_sim/beamline.py: CLI entrypoint and IOC assembly.src/nbs_sim/load.py: device factory helper used by autoload.src/nbs_sim/devices/: simulation device implementations.
Notes
- Project status is currently alpha.
- This package expects configuration files generated or maintained by the broader NBS beamline stack.
Metadata
Release files for nbs-sim 0.2.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 |
|---|---|---|---|---|
| nbs_sim-0.2.3.tar.gz | 215.7 kB | With provenance | Details for nbs_sim-0.2.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nbs_sim-0.2.3-py3-none-any.whl | Python 3 | none | any | Details for nbs_sim-0.2.3-py3-none-any.whl |
Total release size: 439.4 kB
Release files / nbs_sim-0.2.3.tar.gz
| Download URL | nbs_sim-0.2.3.tar.gz |
|---|---|
| Size | 215.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c734bb32f519714ee698a106dce448d3dc2a129fac4e773dc0f077f3c049897e
|
|
BLAKE2b-256 checksum How to use checksums |
4c1917ee9b8eb2517243d9c5d52a86fbef0ce4756783a301d8cffe168080946a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 1, 2026.
Transparency logRelease files / nbs_sim-0.2.3-py3-none-any.whl
| Download URL | nbs_sim-0.2.3-py3-none-any.whl |
|---|---|
| Size | 223.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5952efcccc8dfae85268d26385792e4bc955b052ca8b1f422dda31a6298070c0
|
|
BLAKE2b-256 checksum How to use checksums |
3ae64ad1dd469a8e5b4f5e1da7c22bc13d6de263a5a0031460363e89020d069a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 1, 2026.
Transparency logSecurity for nbs-sim 0.2.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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for nbs_sim-0.2.3.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 1, 2026.
Transparency logA 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.