Skip to main content

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):

  1. Go to Actions → Release workflow → Run workflow
  2. Choose prerelease (test.pypi only) or release (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


Download files

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

Source Distribution

buvis_pybase-0.10.0.tar.gz (209.3 kB view details)

Uploaded Source

Built Distribution

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

buvis_pybase-0.10.0-py3-none-any.whl (58.1 kB view details)

Uploaded Python 3

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

Hashes for buvis_pybase-0.10.0.tar.gz
Algorithm Hash digest
SHA256 9e0811045c0e40e8fba95f2a4f5414446be307e4cfe1d3a24a4d0b9b582399ea
MD5 be1f63d89c77bfccc0bc3c1ec670fd2e
BLAKE2b-256 c688d72a69935223f7b392d019ba4a40fff8777443424d014a4e8a71744282ef

See more details on using hashes here.

Provenance

The following attestation bundles were made for buvis_pybase-0.10.0.tar.gz:

Publisher: release.yml on buvis/buvis-pybase

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for buvis_pybase-0.10.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c8f31b926c8a4b43018108ba9b7ca45a28eb75367e84b59114a8cf50192f3b20
MD5 f2cd0a77eb4e3925c2017b3e6fa53ae8
BLAKE2b-256 f0d67628e774f2ff479e6d2916ab85e3e2629719454f128df9d2b51a84374d15

See more details on using hashes here.

Provenance

The following attestation bundles were made for buvis_pybase-0.10.0-py3-none-any.whl:

Publisher: release.yml on buvis/buvis-pybase

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page