Python Package Index

local Python Package Index (PyPI)

corelibs-var (1.0.0)

Published 2025-11-14 19:06:37 +09:00 by clemens

Installation

pip install --index-url  --extra-index-url https://pypi.org/simple corelibs-var

About this package

CoreLibs var helpers and handlers

CoreLibs Var

This is part of the Python CoreLibs

Overview

Helper script for variable checking, conversion and handling

Install

uv add --index=opj-pypi=https://git.egplusww.jp/api/packages/PyPI/pypi/simple corelibs-var

Usage

This module contains

  • corelibs_var.var_helpers

Var Helpers

is_int

Check if a variable is int

On type error or value error return False

def is_int(string: Any) -> bool:

is_float

Check if a variable is float

On type error or value error return False

def is_float(string: Any) -> bool:

str_to_bool

Convert a string to bool if the string is "True", "true", "False" or "false"

On invalid string raise "ValueError"

def str_to_bool(string: Any):

Development

UV setup

uv must be installed

Python venv setup

After clone, run the command below to install all dependenciss

uv sync

Build and Publish

uv build
uv publish --index opj-pypi --token <gitea token>

Python tests

All python tests are the tests/ folder. They are structured by the source folder layout

run them with

uv run pytest

Get a coverate report

uv run pytest --cov=corelibs
uv run pytest --cov=corelibs --cov-report=term-missing

Other tests

In the test-run folder usage and run tests are located, runt them below

uv run test-run/<script>

Requirements

Requires Python: >=3.13
Details
PyPI
2025-11-14 19:06:37 +09:00
0
Clemens Schwaighofer
4.8 KiB
Assets (2)
Versions (3) View all
1.0.0 2025-11-14
0.1.1 2025-10-28
0.1.0 2025-10-28