Skip to main content

Frontend CI Backend CI Coverage PyPI License

DAQ Config Server

A service to read files on Diamond's filesystem from a BlueAPI container. Currently this service is only able to read files on /dls_sw/. Writing to configuration files will come in a future release.

Source https://github.com/DiamondLightSource/daq-config-server
Docker docker run ghcr.io/DiamondLightSource/daq-config-server:latest
Releases https://github.com/DiamondLightSource/daq-config-server/releases
Documentation https://DiamondLightSource.github.io/daq-config-server

Here is a minimal example to read a file from the centrally hosted service after installing this package

from daq_config_server.client import ConfigClient

config_client = ConfigClient("https://daq-config.diamond.ac.uk")

file_contents = config_client.get_file_contents({ABSOLUTE_PATH_TO_CONFIG_FILE}, desired_return_type=str)

The output will come out as a raw string - you should format it as required in your own code. You may also request that the file contents is returned as a dict or in bytes - this will raise an http exception if the file cannot be converted to that type. To be able to read a file, you must first add it to the whitelist.

Testing

To run unit tests, type tox -e unit_tests from within the dev container

There is a convenient script in ./deployment/build_and_push.sh which can be used to easily build and run the container locally for testing, and optionally push the container to a repository. In general we should rely on the CI to be pushing new containers - however it is sometimes useful to push a development image to a private repo for development or debugging.

To run local system tests, start a local container by running ./deployment/build_and_push.sh -r -b. Then, in the dev container, forward port 8555. There are instructions on port forwarding within vscode here. Next, in a terminal in the devcontainer, run tox -e system_tests_local from the daq-config-server directory.

To run a test deployment on argus, log in to argus in your namespace and run:

helm install daq-config ./helmchart/ --values dev-values.yaml

followed by:

kubectl port-forward service/daq-config-server-svc 8555

after which you should be able to access the API on http://localhost:8555/docs

See https://DiamondLightSource.github.io/daq-config-server for more detailed documentation.

Download files

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

Source Distribution

daq_config_server-1.5.3.tar.gz (237.6 kB view details)

Uploaded Source

Built Distribution

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

daq_config_server-1.5.3-py3-none-any.whl (36.5 kB view details)

Uploaded Python 3

File details

Details for the file daq_config_server-1.5.3.tar.gz.

File metadata

  • Download URL: daq_config_server-1.5.3.tar.gz
  • Upload date:
  • Size: 237.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for daq_config_server-1.5.3.tar.gz
Algorithm Hash digest
SHA256 bc0e91f2b720245bf527ad9ac0fa54ff36e129c88a2104983d773bf504b19d96
MD5 99fb2f139d0774047253eeb7cb868d53
BLAKE2b-256 1241e533b030a2f4cdcf6f10a42bd5beae9aed48c4def457a23e21c31df8b439

See more details on using hashes here.

File details

Details for the file daq_config_server-1.5.3-py3-none-any.whl.

File metadata

File hashes

Hashes for daq_config_server-1.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c162f3653243ee1c24e656d812f927ffdc83e0d51c1f3d71cef6fcb9697579f2
MD5 14d780cb69e9e0c4c0f11521d8a20b79
BLAKE2b-256 e0b9cd7bcd402c73add50a791cea500419d97f44e7e9ef8e4945d002b6c690fe

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.5.3 This release

2 files

1.5.2

2 files

1.5.1

2 files

1.5.0

2 files

1.4

2 files

1.3.7

2 files

1.3.6

2 files

1.3.5

2 files

1.3.4

2 files

1.3.3

2 files

1.3.2

2 files

1.3.1

2 files

1.3.0

2 files

1.2.0

2 files

1.1.2

2 files

1.1.1

2 files

1.1.0

2 files

1.0.0

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page