Skip to main content

Paquete Python para manipulación sencilla de Word, datos y NetCDF. Python package for easy handling of Word, data, and NetCDF files. Doc: https://github.com/Fernandojbf123/ezsnake

Project description

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, betaln
  • datenum_to_datetime, datenum_to_pd_datetime
  • distchck, hist
  • logncdf, lognfit, lognlike, lognpdf, lognrnd, lognstat
  • normcdf, 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


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

ezsnake-0.1.4.tar.gz (89.8 kB view details)

Uploaded Source

Built Distribution

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

ezsnake-0.1.4-py3-none-any.whl (69.0 kB view details)

Uploaded Python 3

File details

Details for the file ezsnake-0.1.4.tar.gz.

File metadata

  • Download URL: ezsnake-0.1.4.tar.gz
  • Upload date:
  • Size: 89.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ezsnake-0.1.4.tar.gz
Algorithm Hash digest
SHA256 cd795de5cab81e3edd12e292de2e7743107573ed4785d73c58587dd427c16b83
MD5 301ea061b7476a50984a318b47e22a39
BLAKE2b-256 260b7c161d6b513f336b6fe373cb1dc17af7ed872b3e803f02809cab8b749b38

See more details on using hashes here.

File details

Details for the file ezsnake-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: ezsnake-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 69.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.10 {"installer":{"name":"uv","version":"0.10.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ezsnake-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 08bd7f618b288dd61dfef414a61c7f88a47b5d6923e7953e69feda336be1d105
MD5 0f7051b21db9e23499b5c17cca077f1c
BLAKE2b-256 777917ecf347fc2facb30a13273d6d7644e167e588831351f10c6f66e9a8d2d3

See more details on using hashes here.

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