ezsnake
Librería de utilidades científicas en Python para NetCDF, manipulación avanzada de Word, utilidades geográficas y funciones tipo MATLAB.
📦 Módulos principales
1. NetCDF (ezsnake.netcdf)
Lectura, exploración y escritura de archivos NetCDF usando netCDF4.
Funciones principales:
load_nc(ruta, variable=None)view_att(ruta, variable=None)dict2nc(ruta, data)
2. Word Template Writer (ezsnake.word_template_writer)
Automatización avanzada de plantillas Word (.docx): inserción de figuras, referencias cruzadas, reemplazo de variables, tablas y documentos externos.
API pública:
insertar_figuras_en_plantilla(doc, diccionario_de_reemplazos)insertar_referencias_cruzadas_en_plantilla(doc, diccionario_de_reemplazos)reemplazar_texto_en_plantilla(doc, diccionario_de_reemplazos)insertar_documento_externo_en_plantilla(doc, diccionario_de_reemplazos)rellenar_tablas_en_plantilla(doc, diccionario_de_reemplazos)reemplazar_variables_en_tablas(doc, diccionario_de_reemplazos)
3. MATLAB-like (ezsnake.matlab)
Funciones científicas compatibles con MATLAB para estadística, distribuciones y conversión de fechas:
Funciones principales:
betacdf,betafit,betainv,betalike,betapdf,betalndatenum_to_datetime,datenum_to_pd_datetimedistchck,histlogncdf,lognfit,lognlike,lognpdf,lognrnd,lognstatnormcdf,normfit,normlike,normpdf,norminv
4. Utilidades (ezsnake.utils)
Funciones para cálculos geográficos, manipulación de datos y utilidades varias:
Funciones principales:
uv2polar(u, v)polar2uv(dir_deg, spd)grados_a_km_lat(delta_lat)grados_a_km_lon(delta_lon, latitud)distancia_entre_dos_puntos(lon2, lat2, lon1, lat1, unidad='km')calcular_tiempo_de_viaje(lon2, lon1, lat2, lat1, velocidad, unidad='km')timestamp_a_texto_espanol(fecha, mes_y_anio)get_excel_variables_name(df_datos_documento)get_excel_variable_values(df_datos_documento, nombre_variable)
🚀 Instalación
Desde PyPI:
pip install ezsnake
Desde el repositorio (editable):
pip install -e .
📋 Requerimientos
- Python >= 3.11
- netcdf4 >= 1.7.4
- numpy >= 2.0
- openpyxl >= 3.1
- pandas >= 2.0
- python-docx >= 1.1
- scipy >= 1.17.1
📝 Ejemplo de uso
from ezsnake.netcdf import load_nc, view_att, dict2nc
# Cargar todas las variables de un archivo NetCDF
data = load_nc('archivo.nc')
# Cargar una variable específica
temperatura = load_nc('archivo.nc', 'temperature')
# Ver atributos de una variable
attrs = view_att('archivo.nc', 'temperature')
# Crear un archivo NetCDF desde un diccionario
data_dict = {
'global_atributes': {'title': 'Mi archivo NetCDF'},
'temperature': {
'value': np.array([[1, 2], [3, 4]]),
'dims': ['time', 'lat'],
'units': 'Celsius'
}
}
dict2nc('nuevo_archivo.nc', data_dict)
👤 Autor y créditos
by BelloDev
agregado 2026/05/25
ultima revision 2026/05/25
Release files for ezsnake 0.3.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ezsnake-0.3.13.tar.gz | 6.5 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ezsnake-0.3.13-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.6 MB
Release files / ezsnake-0.3.13.tar.gz
| Download URL | ezsnake-0.3.13.tar.gz |
|---|---|
| Size | 6.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7373c8f56cea19bb2e4277e3578f1735784dba9cdcb1231204e48e37c4f10c9c
|
|
BLAKE2b-256 checksum How to use checksums |
bcf6a6bc8bee48ac62ea63dcfe6503a8400cef571a10705fa10e1406ea6ee69b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / ezsnake-0.3.13-py3-none-any.whl
| Download URL | ezsnake-0.3.13-py3-none-any.whl |
|---|---|
| Size | 69.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
03728f97dc11d76b588c52e313d0c15023ca5c5f1ea49b9b05422967f10894f3
|
|
BLAKE2b-256 checksum How to use checksums |
c2bcfb080838465e9aa707e860960322a844cb82eca6457c133af81d74270c4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.19 {"installer":{"name":"uv","version":"0.12.19","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|