CHXLibrary
CHXLibrary es una pequeña colección de utilidades para Python, en español y sin dependencias externas de ejecución. Incluye funciones para trabajar con texto, números, fechas, archivos y herramientas creativas.
- Distribución en PyPI:
chxlibrary - Módulo de importación:
chrotrixurum - Versión actual del proyecto:
0.1.0 - Python: 3.8 o superior
- Licencia: Apache-2.0
Instalación
Cuando la publicación esté disponible en PyPI:
python -m pip install chxlibrary
Para desarrollar desde este repositorio:
git clone https://github.com/programador777lolxddd-dot/CHXlibrary.git
cd CHXlibrary
python -m pip install -e ".[dev]"
Inicio rápido
import chrotrixurum as chx
print(chx.slugify("Hola Mundo Ñandú!")) # hola-mundo-nandu
print(chx.snake_case("HolaMundoCruel")) # hola_mundo_cruel
print(chx.clamp(15, 0, 10)) # 10
print(chx.is_prime(97)) # True
print(list(chx.fibonacci(6))) # [0, 1, 1, 2, 3, 5]
print(chx.human_size(1536)) # 1.5 KB
print(chx.is_weekend()) # True o False según la fecha actual
Funciones disponibles
Texto
slugify(text): convierte texto en un slug para URLs y elimina acentos.snake_case(text): convierte texto asnake_case.camel_case(text): convierte texto aCamelCase.truncate(text, length, suffix="…"): limita la longitud de un texto.is_palindrome(text, ignore_case=True): comprueba si un texto es palíndromo.
Números
clamp(value, lo, hi): limita un valor a un rango.lerp(a, b, t): interpolación lineal contlimitado entre 0 y 1.is_prime(n): comprueba si un entero es primo.fibonacci(n): genera los primerosnnúmeros de Fibonacci.percent(part, whole, decimals=1): devuelve un porcentaje formateado.
Fechas y tiempo
humanize_delta(delta): expresa una diferencia temporal en español.days_between(a, b): calcula los días absolutos entre dos fechas.is_weekend(d=None): comprueba si una fecha es sábado o domingo.
Archivos
human_size(bytes_): convierte bytes a una unidad legible.read_lines_safe(path): lee un archivo UTF-8 línea por línea.ensure_dir(path): crea un directorio y sus padres si hacen falta.
Herramientas creativas
divine(question, seed=None): genera una respuesta aleatoria reproducible con semilla.sigil(text, length=12): genera un símbolo textual reproducible.palindrome_magic(text): devuelve un análisis lúdico de una frase.
Ejecutar la demostración
python -m chrotrixurum
También puedes usar el comando instalado:
chrotrixurum
Pruebas
python -m pip install -e ".[dev]"
python -m pytest
Licencia
Este proyecto se distribuye bajo la licencia Apache License 2.0. Consulta el archivo LICENSE para ver el texto completo.
Autor y contribuciones
Creado por programador777lolxddd-dot. Las sugerencias y reportes de errores se pueden enviar en Issues.
Metadata
Release files for chxlibrary 0.1.0
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 | Actions |
|---|---|---|---|---|
| chxlibrary-0.1.0.tar.gz | 11.1 kB | With provenance | Details for chxlibrary-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| chxlibrary-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for chxlibrary-0.1.0-py3-none-any.whl |
Total release size: 21.9 kB
Release files / chxlibrary-0.1.0.tar.gz
| Download URL | chxlibrary-0.1.0.tar.gz |
|---|---|
| Size | 11.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0cf50ed7b28f981d271274b8cf27e2ee86e57c45f8a0dc74193b6395d4ae0283
|
|
BLAKE2b-256 checksum How to use checksums |
8fa87ca02898b5d016c87d11a4638da25f6f427def2916e6fcc3a51d5c16f120
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logRelease files / chxlibrary-0.1.0-py3-none-any.whl
| Download URL | chxlibrary-0.1.0-py3-none-any.whl |
|---|---|
| Size | 10.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a1bda2eb8aac5a397562297c31b011d4a3d4d9354f88421e526b4bd3f136a34b
|
|
BLAKE2b-256 checksum How to use checksums |
19ee9c66afe53c98548da46f30cab0eecd4faa20382c2a06751e124adbe30213
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logSecurity for chxlibrary 0.1.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for chxlibrary-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 29, 2026.
Transparency logA 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.