Skip to main content

Numlet

Numlet es una pequeña librería basada en Python capaz de convertir más de dos duocentillones de números diferentes a letras.

Instrucciones de instalación

Pero antes,
  • Asegurate de tener la última versión de pip instalada.
  • Nota que la primera alternativa se lleva a cabo desde un archivo normal de Python y la segunda desde un Jupyter Notebook.

Primera alternativa.

Esta alternativa se ha probado desde PyCharm.
  1. Abre el script donde quieres importar Numlet.
  2. Ve a la terminal del IDE y ejecuta:
    >  pip install git+https://github.com/roylanmartinez/Numlet.git
Si trabajas desde otro IDE y no sabes como instalar un package haz clíck

aquí

  1. Listo. Ve a la sección Utilización.

Segunda alternativa

Esta alternativa se ha probado desde Jupyter Notebook.
  1. Abre el script donde quieras importar Numlet.
  2. En la primera celda ejecuta:
    In []: ! pip install git+https://github.com/roylanmartinez/Numlet.git
  1. Listo. Ve a la sección Utilización.

Utilización

Ahora en tu script simplemente la importas.

from nlt import numlet as nl
Ejemplo 1:
n = 1
resultado = nl.Numero(n).a_letras
print(resultado)

Uno

Ejemplo 2:
n = -1000.123
resultado = nl.Numero(n).a_letras.lower()
print(resultado)

menos mil con ciento veintitrés milésimas

Ejemplo 3:
Recuerda poner los números décimales muy pequeños en comillas, más información aquí
n = '0.0000000000000000001'
resultado = nl.Numero(n).a_letras.upper()
print(resultado)

CERO CON UNA DIEZTRILLONÉSIMA

Ejemplo 4:
n = -1*abs(1 + 1000 + 1.12)
resultado = nl.Numero(n).a_letras
print(resultado)

Menos Mil Dos Con Doce Centésimas

Contribución

Las pull requests son bienvenidas, así como comentarios acerca de mejoras o bugs.

Licencia

MIT

¡Espero que les guste!

Repositorio: https://github.com/roylanmartinez/Numlet

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

numlet-2.0.0.tar.gz (6.3 kB view details)

Uploaded Source

Built Distribution

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

numlet-2.0.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file numlet-2.0.0.tar.gz.

File metadata

  • Download URL: numlet-2.0.0.tar.gz
  • Upload date:
  • Size: 6.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.5

File hashes

Hashes for numlet-2.0.0.tar.gz
Algorithm Hash digest
SHA256 b571a1b4fbfd2654667b043b926a47fe56e8fd3cc32203e4c376adad420faecd
MD5 082f8c5acdd41dd72069bd2c621c070e
BLAKE2b-256 57288b71c10794998c473d399050a4fb163570a4ca9f94191b952732e92c6bc2

See more details on using hashes here.

File details

Details for the file numlet-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: numlet-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.8.5

File hashes

Hashes for numlet-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bc144119a6ef987ab719eedaaa88e0a499ff3b7fee50466296541a189e01b99c
MD5 22c2e7af1b61ef37defdf6b357b63cc5
BLAKE2b-256 b5a4e41dc75469aefd38b331f8bf905deb2241621a845e801e5492560539d1ad

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page