Foundation of BUVIS python projects
Project description
buvis-pybase
Foundation library for BUVIS Python projects. Provides configuration management, filesystem utilities, adapters for external tools, and string manipulation.
Install
pip install buvis-pybase
Features
- Configuration - Pydantic settings with Click helpers (
buvis_options,get_settings) - Adapters - Shell, UV, Poetry, JIRA, Console wrappers
- Filesystem - Cross-platform file metadata, directory operations
- Formatting - String slugify, abbreviations, case conversion
Usage
import click
from buvis.pybase.configuration import buvis_options, get_settings, GlobalSettings
from buvis.pybase.adapters import ShellAdapter, ConsoleAdapter
from buvis.pybase.filesystem import DirTree
from buvis.pybase.formatting import StringOperator
# Config via Click (adds --debug/--log-level/--config-dir/--config)
@click.command()
@buvis_options # Use settings_class=CustomSettings for tool-specific models
@click.pass_context
def main(ctx: click.Context) -> None:
settings = get_settings(ctx) # GlobalSettings by default
click.echo(f"Debug: {settings.debug}")
# Shell commands
shell = ShellAdapter()
stderr, stdout = shell.exe("ls -la")
# Console output
console = ConsoleAdapter()
console.success("Done")
# Filesystem
DirTree.remove_empty_directories("/path/to/clean")
# Strings
slug = StringOperator.slugify("Hello World!") # "hello-world"
Development
uv sync --all-groups # install deps
pre-commit install --hook-type pre-commit --hook-type post-commit # setup hooks
uv run pytest # run tests
Release
Releases via GitHub Actions (manual trigger):
- Go to Actions → Release workflow → Run workflow
- Choose
prerelease(test.pypi only) orrelease(both pypis + GitHub release)
Version determined from conventional commits (feat: → minor, fix: → patch).
uv run semantic-release version --print --noop # preview next version
See dev/docs/versioning.md for details.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file buvis_pybase-0.10.0.tar.gz.
File metadata
- Download URL: buvis_pybase-0.10.0.tar.gz
- Upload date:
- Size: 209.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e0811045c0e40e8fba95f2a4f5414446be307e4cfe1d3a24a4d0b9b582399ea
|
|
| MD5 |
be1f63d89c77bfccc0bc3c1ec670fd2e
|
|
| BLAKE2b-256 |
c688d72a69935223f7b392d019ba4a40fff8777443424d014a4e8a71744282ef
|
Provenance
The following attestation bundles were made for buvis_pybase-0.10.0.tar.gz:
Publisher:
release.yml on buvis/buvis-pybase
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
buvis_pybase-0.10.0.tar.gz -
Subject digest:
9e0811045c0e40e8fba95f2a4f5414446be307e4cfe1d3a24a4d0b9b582399ea - Sigstore transparency entry: 940467331
- Sigstore integration time:
-
Permalink:
buvis/buvis-pybase@b094523ad8cc887e7a1055307f8f15e27ed058fb -
Branch / Tag:
refs/heads/master - Owner: https://github.com/buvis
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b094523ad8cc887e7a1055307f8f15e27ed058fb -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file buvis_pybase-0.10.0-py3-none-any.whl.
File metadata
- Download URL: buvis_pybase-0.10.0-py3-none-any.whl
- Upload date:
- Size: 58.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8f31b926c8a4b43018108ba9b7ca45a28eb75367e84b59114a8cf50192f3b20
|
|
| MD5 |
f2cd0a77eb4e3925c2017b3e6fa53ae8
|
|
| BLAKE2b-256 |
f0d67628e774f2ff479e6d2916ab85e3e2629719454f128df9d2b51a84374d15
|
Provenance
The following attestation bundles were made for buvis_pybase-0.10.0-py3-none-any.whl:
Publisher:
release.yml on buvis/buvis-pybase
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
buvis_pybase-0.10.0-py3-none-any.whl -
Subject digest:
c8f31b926c8a4b43018108ba9b7ca45a28eb75367e84b59114a8cf50192f3b20 - Sigstore transparency entry: 940467336
- Sigstore integration time:
-
Permalink:
buvis/buvis-pybase@b094523ad8cc887e7a1055307f8f15e27ed058fb -
Branch / Tag:
refs/heads/master - Owner: https://github.com/buvis
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@b094523ad8cc887e7a1055307f8f15e27ed058fb -
Trigger Event:
workflow_dispatch
-
Statement type: