Skip to main content

Embed an EPICS IOC in a Python process

Project description

Code CI Docs CI Test Coverage Latest PyPI version Apache License

This module allows an EPICS IOC with Python Device Support to be run from within the Python interpreter. Records can be programmatically created and arbitrary Python code run to update them and respond to caputs. It supports cothread and asyncio for concurrency. PVs are served over Channel Access and PVAccess.

PyPI

pip install softioc

Source code

https://github.com/DiamondLightSource/pythonSoftIOC

Documentation

https://DiamondLightSource.github.io/pythonSoftIOC

Changelog

https://github.com/DiamondLightSource/pythonSoftIOC/blob/master/CHANGELOG.rst

A simple example of the use of this library:

# Import the basic framework components.
from softioc import softioc, builder
import cothread

# Set the record prefix
builder.SetDeviceName("MY-DEVICE-PREFIX")

# Create some records
ai = builder.aIn('AI', initial_value=5)
ao = builder.aOut('AO', initial_value=12.45, on_update=lambda v: ai.set(v))

# Boilerplate get the IOC started
builder.LoadDatabase()
softioc.iocInit()

# Start processes required to be run after iocInit
def update():
    while True:
        ai.set(ai.get() + 1)
        cothread.Sleep(1)


cothread.Spawn(update)

# Finally leave the IOC running with an interactive shell.
softioc.interactive_ioc(globals())

See https://DiamondLightSource.github.io/pythonSoftIOC for more detailed documentation.

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

softioc-4.7.0.tar.gz (92.7 kB view details)

Uploaded Source

Built Distributions

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

softioc-4.7.0-cp313-cp313-win_amd64.whl (118.5 kB view details)

Uploaded CPython 3.13Windows x86-64

softioc-4.7.0-cp313-cp313-manylinux2014_x86_64.whl (124.6 kB view details)

Uploaded CPython 3.13

softioc-4.7.0-cp313-cp313-macosx_10_13_x86_64.whl (118.8 kB view details)

Uploaded CPython 3.13macOS 10.13+ x86-64

softioc-4.7.0-cp312-cp312-win_amd64.whl (118.5 kB view details)

Uploaded CPython 3.12Windows x86-64

softioc-4.7.0-cp312-cp312-manylinux2014_x86_64.whl (124.6 kB view details)

Uploaded CPython 3.12

softioc-4.7.0-cp312-cp312-macosx_10_13_x86_64.whl (118.8 kB view details)

Uploaded CPython 3.12macOS 10.13+ x86-64

softioc-4.7.0-cp311-cp311-win_amd64.whl (118.4 kB view details)

Uploaded CPython 3.11Windows x86-64

softioc-4.7.0-cp311-cp311-manylinux2014_x86_64.whl (124.6 kB view details)

Uploaded CPython 3.11

softioc-4.7.0-cp311-cp311-macosx_10_9_x86_64.whl (118.8 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

softioc-4.7.0-cp310-cp310-win_amd64.whl (118.4 kB view details)

Uploaded CPython 3.10Windows x86-64

softioc-4.7.0-cp310-cp310-manylinux2014_x86_64.whl (124.6 kB view details)

Uploaded CPython 3.10

softioc-4.7.0-cp310-cp310-macosx_10_9_x86_64.whl (118.8 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

softioc-4.7.0-cp39-cp39-manylinux2014_x86_64.whl (124.6 kB view details)

Uploaded CPython 3.9

softioc-4.7.0-cp39-cp39-macosx_10_9_x86_64.whl (118.8 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

softioc-4.7.0-cp38-cp38-win_amd64.whl (118.4 kB view details)

Uploaded CPython 3.8Windows x86-64

softioc-4.7.0-cp38-cp38-manylinux2014_x86_64.whl (124.5 kB view details)

Uploaded CPython 3.8

softioc-4.7.0-cp38-cp38-macosx_10_9_x86_64.whl (118.8 kB view details)

Uploaded CPython 3.8macOS 10.9+ x86-64

softioc-4.7.0-cp37-cp37m-win_amd64.whl (118.3 kB view details)

Uploaded CPython 3.7mWindows x86-64

softioc-4.7.0-cp37-cp37m-manylinux2014_x86_64.whl (124.3 kB view details)

Uploaded CPython 3.7m

softioc-4.7.0-cp37-cp37m-macosx_10_9_x86_64.whl (118.7 kB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

File details

Details for the file softioc-4.7.0.tar.gz.

File metadata

  • Download URL: softioc-4.7.0.tar.gz
  • Upload date:
  • Size: 92.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for softioc-4.7.0.tar.gz
Algorithm Hash digest
SHA256 8514c6f6b9df1191462171df6a2b9d9b33e6492fe252d3c5839d2f132d307add
MD5 21d9bffbe799a0ebe9c17968953562d4
BLAKE2b-256 64fd7b42c8c57703abbae0e78c351291eee1414bdc8219754ac8fcb2160605c5

See more details on using hashes here.

File details

Details for the file softioc-4.7.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: softioc-4.7.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 118.5 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for softioc-4.7.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 f93647ab279856e9653c545a626ed40aea71d3432391c3df721655d4888c656b
MD5 57fe17a91cedba49ee5f38358b1ef075
BLAKE2b-256 f8b2bf80cc846aed9aa2d87c29e613e9d55932c9a180962da9c5de97d6da8b73

See more details on using hashes here.

File details

Details for the file softioc-4.7.0-cp313-cp313-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for softioc-4.7.0-cp313-cp313-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3a662a934af3c46eb7f5390539aa210a72fef5b48dd92167c4dd248bdc234597
MD5 294ce70dbe73e33ebbf8b71ae40f715a
BLAKE2b-256 4790d96f39b25f4cca886ac3f36a1bbfb1b04daef9512ec295d6319bcb7e2707

See more details on using hashes here.

File details

Details for the file softioc-4.7.0-cp313-cp313-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for softioc-4.7.0-cp313-cp313-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 eda2a04105c0c2f397068ec074e43db2264dd330baa2d7ac2a94702f2fa4cab3
MD5 da89a76cb337d67067f21ce3e1c44dfa
BLAKE2b-256 58fe8c9bf481416f8f9a6bd6e47b3ee7fb5282c320731e66ab47ccbbca9164b2

See more details on using hashes here.

File details

Details for the file softioc-4.7.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: softioc-4.7.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 118.5 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for softioc-4.7.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3b2ac39cb9223fd936a9ffe5676dce6d7c499a5d1f5919380085829c1c38bf07
MD5 b0cbefeebe290721d1241dbb25fc0ab4
BLAKE2b-256 0381f976b094616fb605dad6d21a0b4b78278e3585439ec5cb2ae4da1ff52441

See more details on using hashes here.

File details

Details for the file softioc-4.7.0-cp312-cp312-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for softioc-4.7.0-cp312-cp312-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 4fe5cb8fa3c156b81940b7e9a456fe90a55ec1194eb75d4c286af405ff27ab22
MD5 f26304e550a4f3e29d99169068724d9e
BLAKE2b-256 2362d59270acbec972aea0c36d65cc13673e786c12664070cf437869678655e9

See more details on using hashes here.

File details

Details for the file softioc-4.7.0-cp312-cp312-macosx_10_13_x86_64.whl.

File metadata

File hashes

Hashes for softioc-4.7.0-cp312-cp312-macosx_10_13_x86_64.whl
Algorithm Hash digest
SHA256 a8e101f4f3ad35c32fecbca422dcf6496ec3c98545965fedc5a9dc48ba0dbe37
MD5 5194e5a58ddf1c16e288ba161ce3f810
BLAKE2b-256 57cc5b4a59eebfb419ab2e9ffa58b4c09ce89af896b13c60516b5c5e42e86c89

See more details on using hashes here.

File details

Details for the file softioc-4.7.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: softioc-4.7.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 118.4 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for softioc-4.7.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 4413a2ed7ae4f0bddc9179a9ec1afa2b514343de1aa72bb5a327fdfe1a2f1729
MD5 3300199fbc09faea25c086ae008efd9e
BLAKE2b-256 d9bc622aa9138057c8c8249a1ad94bd2a12d69e814f327b988b8545891d93a15

See more details on using hashes here.

File details

Details for the file softioc-4.7.0-cp311-cp311-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for softioc-4.7.0-cp311-cp311-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 1bcf79de8cbe49599cecbafa01c145058e60a22c055408609da95afd3fcbdc4b
MD5 42e1bd6ae2d55bc5261cfafe1c26fe20
BLAKE2b-256 365fe16232e8bcf05ab633c39bb7ae2f1ed334b686383db41d20e2a59500ceeb

See more details on using hashes here.

File details

Details for the file softioc-4.7.0-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for softioc-4.7.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d8a7c66f3ed372659ede74ff145b6c5ff041c33ff7921d744c01e6b4f1a1df5e
MD5 eb2ed4d671f991453d4406b1d83e82d5
BLAKE2b-256 39342e64ab5adc6708cd4344a757746d842d86b18b818d986e9b341917a7bfb3

See more details on using hashes here.

File details

Details for the file softioc-4.7.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: softioc-4.7.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 118.4 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for softioc-4.7.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 2bd3e3cb0c52a59048676440ea410782b2df36f7cf1cbd439ee81968bf92f012
MD5 50041a1ef76d6212a6914f16db6a93fa
BLAKE2b-256 4647179530aa81b4eeb0a0106e3fd2aaad1f80b0638c1a2b2c5d147d6c024e32

See more details on using hashes here.

File details

Details for the file softioc-4.7.0-cp310-cp310-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for softioc-4.7.0-cp310-cp310-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 3ecf1535d4a78161c278065cdd3b357cb686e3833d58a5d5f74276c9f4ac3e44
MD5 51f2545a69e871fca23fc4e0bc64f37d
BLAKE2b-256 c7f50b72d64cd10067c5cd3ae57dc51927b87f37a272193270d52ebd1df9cd19

See more details on using hashes here.

File details

Details for the file softioc-4.7.0-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for softioc-4.7.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0c08434fd6078cfb88d989de25278d221800711c7a617b899ac8ba5e2f1c273f
MD5 904ca7cc66c2f6d5fef31be1a6fafa5e
BLAKE2b-256 3870be69997640b0f6bd4b3aa3d71feb78eeacdab73a7411462a3399cbec0501

See more details on using hashes here.

File details

Details for the file softioc-4.7.0-cp39-cp39-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for softioc-4.7.0-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8a9177cbce9d648280c859a0dd2c95e7df883e284f49eaabee7f62931bdbf8e9
MD5 3436a3633bf491f6bf377a49984ab07c
BLAKE2b-256 f22a928881fb8ec140b450d2378f1227e4a08302e2418ca69990b71ee429b1e9

See more details on using hashes here.

File details

Details for the file softioc-4.7.0-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for softioc-4.7.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d3e7eeff6822ace5236c55623aaad4f5fe1b6249546287e14f67db3b895a86d0
MD5 2e6bae5ced52f545af5364d9a0506064
BLAKE2b-256 8a021f68cafd5be2b650c9f473e9c43833634297d9b27851a3d18d738eaabb78

See more details on using hashes here.

File details

Details for the file softioc-4.7.0-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: softioc-4.7.0-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 118.4 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for softioc-4.7.0-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 904bb7f77c2d51f08ba59e99db226a37aa4a5527d78201114c6473e4d7c07284
MD5 3808df78d05fd2bc757e5b7264a87422
BLAKE2b-256 f0e46135164a5a29f09e4d278a4d2a9fe761c65a825ab20de3d75a3f1612f21d

See more details on using hashes here.

File details

Details for the file softioc-4.7.0-cp38-cp38-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for softioc-4.7.0-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 647e14e18bf6cf341e0c87c4600e388ac92547e7a8a60b350abaed44569e242c
MD5 e34a29a51361086c2e9b6476d837e4fc
BLAKE2b-256 aaef3d7790565a14caf4485291ccb58d8c9a7a2697385b55508e7c6dedbca7ea

See more details on using hashes here.

File details

Details for the file softioc-4.7.0-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for softioc-4.7.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d67969b38f65c083eb8655fbb5432e161729e0df3f5e5c046478bea605d8c903
MD5 811385092584f2e37e0cc331f6283216
BLAKE2b-256 24c1be3edd602f4e4da80b1326061efebb9ba940b846fb0605584f7fe6566b63

See more details on using hashes here.

File details

Details for the file softioc-4.7.0-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: softioc-4.7.0-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 118.3 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for softioc-4.7.0-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 95fc6f8fac282639cc8109ae9952e6971b596c08f4ace014703ef82c3fe982ae
MD5 98cbdc7eecea54e0edb66401fa6196dd
BLAKE2b-256 32a1f31d2b8c64dac2105c38f1a772aeff54f2ae5d8f30f3bd45d35f0bf8e881

See more details on using hashes here.

File details

Details for the file softioc-4.7.0-cp37-cp37m-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for softioc-4.7.0-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 10dca20c7810445eefb4b8f997fdb4c203a6d20c12c23bf0c39a503e85585caf
MD5 0e4f142098f6454d8bb5b1b9fec914c6
BLAKE2b-256 9189902eb98d6a210d6f37558eb9e8c5659e2335320d66abdd6ef8401ab6b597

See more details on using hashes here.

File details

Details for the file softioc-4.7.0-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for softioc-4.7.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f2b52f50d852f1048bd700bd691ca3481dae11556effaad3a6af790190a42b5b
MD5 2606e687837cd06418cdfda79a7ac2ed
BLAKE2b-256 3a428c25814ee1773c1a4ae2aa0193be055696169b53c55d2c29995e32969b79

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