Mi Librería
Una librería de ejemplo para demostrar cómo crear y publicar un paquete en PyPI.
Instalación
pip install mi-libreria
Uso
from mi_libreria import saludar, calcular
# Saludar
print(saludar("Ana")) # ¡Hola, Ana!
# Operaciones matemáticas
print(calcular(2, 3)) # 5 (suma por defecto)
print(calcular(10, 4, "resta")) # 6
print(calcular(3, 7, "multiplicacion")) # 21
print(calcular(15, 3, "division")) # 5.0
Funciones disponibles
saludar(nombre: str) -> str
Saluda a una persona por su nombre.
calcular(a: float, b: float, operacion: str = "suma") -> float
Realiza operaciones matemáticas básicas.
Parámetros:
a: Primer númerob: Segundo númerooperacion: Tipo de operación ("suma", "resta", "multiplicacion", "division")
Desarrollo
Para instalar en modo desarrollo:
git clone https://github.com/tu-usuario/mi-libreria
cd mi-libreria
pip install -e .[dev]
Para ejecutar tests:
pytest tests/
Licencia
MIT
Metadata
Release files for mi-libreria-tobuja48 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 | |
|---|---|---|---|
| mi_libreria_tobuja48-0.1.0.tar.gz | 3.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mi_libreria_tobuja48-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.1 kB
Release files / mi_libreria_tobuja48-0.1.0.tar.gz
| Download URL | mi_libreria_tobuja48-0.1.0.tar.gz |
|---|---|
| Size | 3.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d961d0722d66494960790b6ca9ea45f18171271c6ee326c4fbe3996716dbe915
|
|
BLAKE2b-256 checksum How to use checksums |
47748496d29038b05c319fec9ef024e79409d40450d2a09d73f6f507742afd39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Release files / mi_libreria_tobuja48-0.1.0-py3-none-any.whl
| Download URL | mi_libreria_tobuja48-0.1.0-py3-none-any.whl |
|---|---|
| Size | 2.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
532a531d708a95aade88c632ad388a2a826a175bee0289e3cbe94ba7a34c9004
|
|
BLAKE2b-256 checksum How to use checksums |
cceaad4a04d0cfb0f152b36851c9d6cdb2a7ed8d0bb94be3c953f254e5c30976
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|