kyoslib_py
KYOS shared lib code as python package.
Usage
Example code:
from kyoslib_py.simulation import Simulation
simulation_set = Simulation()
Installation
pip install kyoslib_py
Dependencies
Python 3.11+
Development
| Command | Description |
|---|---|
task |
Run lint + typecheck + test + security |
task install |
Install all dependencies |
task lint |
Run ruff format check + ruff lint |
task format |
Auto-format and fix with ruff |
task typecheck |
Run ty type checker |
task test |
Run pytest |
task test:coverage |
Run pytest with coverage report |
task security |
Run bandit SAST + uv audit |
task security:bandit |
Run bandit SAST scanner |
task security:audit |
Check deps for known CVEs |
task build |
Build the sdist and wheel into dist/ |
task publish |
Build and publish to PyPI (needs UV_PUBLISH_TOKEN) |
task docs:serve |
Live preview of the documentation |
task docs:build |
Check that the documentation builds without errors |
task docs:deploy |
Deploy the documentation to GitHub Pages |
task clean |
Remove build artifacts and caches |
Adding dependencies
uv add <package>
uv add --dev <package>
Documentation
The package documentation is generated by MkDocs and published at
https://kyosenergy.github.io/kyoslib_py/. After task install, start a local preview server with:
task docs:serve
Releasing
- Bump
versioninpyproject.tomland add a matching entry todocs/changelog.md(CI checks that the version is in the changelog). - On merge to
master, CI creates a tag for the new version and sends apublish-to-pypirepository dispatch event, which triggers theDeploy kyoslib_pyworkflow that builds and publishes the package to PyPI.
CI
On every PR to master:
- lint — ruff format + ruff lint
- typecheck — ty
- test — pytest, on every supported Python version (3.11, 3.12, 3.13)
- audit — uv audit (known CVEs in deps)
- bandit — bandit SAST scan of
src - secret-scan — gitleaks (committed secrets)
- docs —
mkdocs build --strict - build —
uv build(sdist and wheel), once lint, typecheck, test, audit, bandit and secret-scan pass - version — the
pyproject.tomlversion is listed indocs/changelog.md
On merge to master:
- A tag is created if the version is new, and the package is published to PyPI
- The documentation is deployed to GitHub Pages
Renovatebot opens PRs for dependency updates. The uv-lock-regen workflow
regenerates uv.lock automatically on Renovate PRs.
Project structure
src/
kyoslib_py/ # the package
tests/ # pytest suite
docs/ # MkDocs sources
mkdocs.yml # MkDocs config
pyproject.toml # project metadata + tool config
Taskfile.yml # task runner
renovate.json # dependency update config
Metadata
Release files for kyoslib_py 5.7.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kyoslib_py-5.7.1.tar.gz | 82.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kyoslib_py-5.7.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 152.9 kB
Release files / kyoslib_py-5.7.1.tar.gz
| Download URL | kyoslib_py-5.7.1.tar.gz |
|---|---|
| Size | 82.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ae5e57a5da578fdaf1f0aff8338f0590a92f27beaf8875f5383f6e6b15e7970b
|
|
BLAKE2b-256 checksum How to use checksums |
82a4ddfdac13f68bab7718e258125c344ed35fa149d7ebf0a23e64dbfff78828
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / kyoslib_py-5.7.1-py3-none-any.whl
| Download URL | kyoslib_py-5.7.1-py3-none-any.whl |
|---|---|
| Size | 70.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0903efa1f63aec5797916aa9c2f4bef46deebf4cfa6b283f138647dc1ded50a4
|
|
BLAKE2b-256 checksum How to use checksums |
df65fe5079e03192c31273f1083da570c487b363a346b61ebaf34e8c1f52a4b6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.21 {"installer":{"name":"uv","version":"0.12.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|