Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-pylib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-pylib
Commits
9004ebf4
Verified
Commit
9004ebf4
authored
Dec 20, 2021
by
Daniel Hornung
Browse files
Options
Downloads
Patches
Plain Diff
DOC: Typos, grammar and wording changed.
parent
13557a17
No related branches found
No related tags found
1 merge request
!39
DOC: add doc on serverside
Pipeline
#17632
passed
Dec 20, 2021
Stage: code_style
Stage: linting
Stage: test
Stage: deploy
Changes
2
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
RELEASE_GUIDELINES.md
+2
-2
2 additions, 2 deletions
RELEASE_GUIDELINES.md
src/doc/tutorials/serverside.rst
+17
-13
17 additions, 13 deletions
src/doc/tutorials/serverside.rst
with
19 additions
and
15 deletions
RELEASE_GUIDELINES.md
+
2
−
2
View file @
9004ebf4
# Release Guidelines for the CaosDB Python Client Library
This document specifies release guidelines in addition to the gener
e
l release
This document specifies release guidelines in addition to the gener
a
l release
guidelines of the CaosDB Project
(
[
RELEASE_GUIDELINES.md
](
https://gitlab.com/caosdb/caosdb/blob/dev/RELEASE_GUIDELINES.md
)
)
...
...
@@ -38,5 +38,5 @@ guidelines of the CaosDB Project
10.
Merge the main branch back into the dev branch.
11.
After the merge of main to dev, start a new development version by
setting
`ISRELEASED`
to
`False`
and by increasing at least the
`MI
R
CO`
setting
`ISRELEASED`
to
`False`
and by increasing at least the
`MIC
R
O`
version in
[
setup.py
](
./setup.py
)
and preparing CHANGELOG.md.
This diff is collapsed.
Click to expand it.
src/doc/tutorials/serverside.rst
+
17
−
13
View file @
9004ebf4
Server Side Scripting
=====================
Some regular needed scripts, e.g. for computing a standardized analysis, might
be placed by the administrator on the same machine as the CaosDB server such
that they can be executed there, on the server side.
The execution of those scripts can also be started using the Python client.
The administrator may store regularly needed scripts, e.g. for computing a standardized analysis, on
the same machine as the CaosDB server, "on the server side", where they can be run directly by the
server.
The execution of those scripts can be initiated using the Python client, or the web interface.
Call a Script
~~~~~~~~~~~~~
O
f
course, you need to
have access to the server and sufficient permissions to
run the script that you want to run. Execution is then fairly
simple:
I
f
you
have access to the server and sufficient permissions to
run the script, execution is fairly
simple:
.. code:: python
...
...
@@ -20,34 +21,37 @@ run the script that you want to run. Execution is then fairly simple:
print(response.stderr,response.stdout)
This
triggers the execution of
the script ``scriptname.py``. The output of the
This
makes the server run
the script ``scriptname.py``. The output of the
script (``stderr`` and ``stdout``) is returned within an response object.
If the script requires additional arguments, those can be provided after the
scriptname.
script
's
name.
Note
,
that by default the script runs with your account. It has your
Note that by default the script runs with your
CaosDB
account. It has your
permissions and changes are logged as if they were done by you directly.
Testing it
~~~~~~~~~~
You can try this out using for example the ``diagnos
i
tics.py`` script (it is
also available on
https://demo.indiscale.com). The script returns
some
information in JSON format. You can
do for example the following
You can try this out using for example the ``diagnostics.py`` script (it is
also available on
https://demo.indiscale.com). The script returns
information about the server in JSON format. You can
do for example the following
:
.. code:: python
import json
from caosdb.utils.server_side_scripting import run_server_side_script
response = run_server_side_script('administration/diagnostics.py')
print("JSON content:")
print(json.loads(response.stdout))
print("stderr:")
print(response.stderr)
Further Information
~~~~~~~~~~~~~~~~~~~
Additionally, you might have a look at https://docs.indiscale.com/caosdb-server/specification/Server-side-scripting.html
Additionally, you might want to have a look at
https://docs.indiscale.com/caosdb-server/specification/Server-side-scripting.html
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment