Skip to main content

C-extension module for efficient writing of fixed width text

Project description

PyAnsys Python PyPI GH-CI MIT Black

Hollerith is a small python library that supports fixed-width formatting of some value types and tables. It is named after Herman Hollerith, the inventor of punch cards.

Install the package

Install in user mode

Before installing hollerith in user mode, make sure you have the latest version of pip with:

python -m pip install -U pip

Then, install hollerith with:

pip install hollerith

Install in developer mode

Installing hollerith in developer mode allows you to modify the source and enhance it.

To install hollerith in developer mode, perform these steps:

git clone https://github.com/pyansys/hollerith
cd hollerith
pip install .

Install in offline mode

If you lack an internet connection on your installation machine, you should install hollerith by downloading the wheelhouse archive from the Releases Page for your corresponding machine architecture.

Each wheelhouse archive contains all the Python wheels necessary to install hollerith from scratch on Windows, Linux, and MacOS from Python 3.8 to 3.11.

Documentation

In addition to installation information, the hollerith documentation provides information on API reference.

Usage

Example:

>>> import io
>>> import hollerith as holler
>>> s = io.StringIO()
>>> holler.write_float(s, 1.2099, 10)
>>> holler.write_int(s, 2803, 10)
>>> holler.write_float(s, float("nan"), 10)
>>> holler.write_int(s, 0, 10)
>>> s.getvalue()
'    1.2099      2803                   0'

License

hollerith is licensed under the MIT license. The full license can be found in the root directory of the repository, see LICENSE.

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

hollerith-0.2.0.tar.gz (87.7 kB view hashes)

Uploaded Source

Built Distributions

hollerith-0.2.0-cp312-cp312-win_amd64.whl (45.4 kB view hashes)

Uploaded CPython 3.12 Windows x86-64

hollerith-0.2.0-cp312-cp312-win32.whl (40.4 kB view hashes)

Uploaded CPython 3.12 Windows x86

hollerith-0.2.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (282.1 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

hollerith-0.2.0-cp312-cp312-macosx_10_9_x86_64.whl (42.7 kB view hashes)

Uploaded CPython 3.12 macOS 10.9+ x86-64

hollerith-0.2.0-cp311-cp311-win_amd64.whl (44.8 kB view hashes)

Uploaded CPython 3.11 Windows x86-64

hollerith-0.2.0-cp311-cp311-win32.whl (39.9 kB view hashes)

Uploaded CPython 3.11 Windows x86

hollerith-0.2.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (272.9 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

hollerith-0.2.0-cp311-cp311-macosx_10_9_x86_64.whl (42.4 kB view hashes)

Uploaded CPython 3.11 macOS 10.9+ x86-64

hollerith-0.2.0-cp310-cp310-win_amd64.whl (44.9 kB view hashes)

Uploaded CPython 3.10 Windows x86-64

hollerith-0.2.0-cp310-cp310-win32.whl (40.1 kB view hashes)

Uploaded CPython 3.10 Windows x86

hollerith-0.2.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (252.7 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

hollerith-0.2.0-cp310-cp310-macosx_10_9_x86_64.whl (42.6 kB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

hollerith-0.2.0-cp39-cp39-win_amd64.whl (44.6 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

hollerith-0.2.0-cp39-cp39-win32.whl (39.7 kB view hashes)

Uploaded CPython 3.9 Windows x86

hollerith-0.2.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (251.7 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64 manylinux: glibc 2.5+ x86-64

hollerith-0.2.0-cp39-cp39-macosx_10_9_x86_64.whl (42.4 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

hollerith-0.2.0-cp38-cp38-win_amd64.whl (44.9 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

hollerith-0.2.0-cp38-cp38-win32.whl (40.0 kB view hashes)

Uploaded CPython 3.8 Windows x86

hollerith-0.2.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (235.3 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

hollerith-0.2.0-cp38-cp38-macosx_10_9_x86_64.whl (42.4 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page