Kaomi Server
This package is the server for KAOMI Deployer.
Installaton, configuration and use
1. Create a virtualenv
virtualenv env --python=python3
source env/bin/activate
2. Install the package
pip install kaomi_server
3. Create configuration folder
python -m kaomi_server configure --folder <path>
5. Create the config file for systemd with path /etc/systemd/system/kaomi-server.service
[Unit]
Description=Kaomi Server (TM) Service
[Service]
Type=simple
User=root
Group=root
# Load env vars from /etc/default/ and /etc/sysconfig/ if they exist.
# Prefixing the path with '-' makes it try to load, but if the file doesn't
# exist, it continues onward.
EnvironmentFile=-/etc/default/kaomi-server
EnvironmentFile=-/etc/sysconfig/kaomi-server
ExecStart=<virtualenv path>/env/bin/python -m kaomi_server start --config <path file server.conf> --apikey <path directory conf.d>
Restart=on-abnormal
WorkingDirectory=<virtualenv path>
# When stopping, how long to wait before giving up and sending SIGKILL?
# Keep in mind that SIGKILL on a process can cause data loss.
TimeoutStopSec=3min
[Install]
WantedBy=multi-user.target
Start Kaomi server on startup
systemctl daemon-reload
systemctl enable kaomi-server.service
Start the server right now
systemctl start kaomi-server.service
Formato rispose del server
The server responses are json dictionaries with the following structure:
{ "status": "status code", "substatus": "substatus code", "message": "meaning of the substatus" "data": "eventual useful data" }
Status and substatus codes
| status | substatus | meaning | data | example |
|---|---|---|---|---|
| 0 | EVERYTHING WENT OK | |||
| 0 | Action executed | - | Specified folder has been created | |
| 1 | Final status reached but not in common way | - | Folder already existed | |
| 1 | REQUEST'S ERRORS | |||
| 0 | Wrong request type | - | Get request where only POST admitted | |
| 1 | Payload content-length greater than maximum allowed | Max request size in bytes | ||
| 2 | Json content cannot be parsed | - | ||
| 3 | Content-length not specified or not valid | - | ||
| 4 | Missing fields in JSON | List of requeted fields | ||
| 5 | ValueError in JSON | Exception text | Permissions received are not valid | |
| 2 | APPLICATION'S ERRORS | |||
| 0 | Generic server error occurred | Exception text | ||
| 1 | Invalid apikey | - | ||
| 2 | Action not permitted | Exception text | ||
| 3 | A RuntimeError occurred | Exception text | ||
| 4 | File/folder already exists | Exception text | ||
| 5 | The uploaded file is too big | - | Uploaded file exceed maximum size (data contains maximum size in MB) | |
| 6 | Client ip not allowed | - | The client ip is not in the allowed list |
Metadata
Release files for kaomi-server 0.5.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 | |
|---|---|---|---|---|
| kaomi-server-0.5.3.tar.gz | 22.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kaomi_server-0.5.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 48.9 kB
Release files / kaomi-server-0.5.3.tar.gz
| Download URL | kaomi-server-0.5.3.tar.gz |
|---|---|
| Size | 22.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
98b771e9fc90ea5e04f87fb62f8c166038cc8af5ffffdb818cfbab2ec0135aa3
|
|
BLAKE2b-256 checksum How to use checksums |
180a736dbe6978d62ba3fb6dbdcbe207f42f0ae68a333b5165477a45bfe30320
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.1.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.3
|
Release files / kaomi_server-0.5.3-py3-none-any.whl
| Download URL | kaomi_server-0.5.3-py3-none-any.whl |
|---|---|
| Size | 26.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
797dbd4d5fde12a8f0aec387e56e355cf61d30789663a5452b84d4f96b74898f
|
|
BLAKE2b-256 checksum How to use checksums |
ca99c628017b3f4255f24f128a7c14c7e3b20b1df5db64dbbfe0181f8bcb60ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.1.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.3
|
Security for kaomi-server 0.5.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.