Skip to main content

utf-table-generator

Модуль генерирует код для печати вот так таких таблиц:

╔════════╦═════════════╦═══════╦═════════╦════╗
║ number ║       float ║     t ║ boolean ║  a ║
╠════════╬═════════════╬═══════╬═════════╬════╣
║    123 ║   12345.456 ║  test ║    True ║  1 ║
╚════════╩═════════════╩═══════╩═════════╩════╝

Вот так использовать:

from utf_table_generator.table import Table

titles = ('number', 'float', 't', 'boolean', 'a')
variables = (123, 12345.4564876435, 'test', True, 1)
t = Table(titles, variables, precision=3)  # precision -- количество знаков после запятой, по умолчанию 5
print(t.get_code())

Пример сгенерированного кода:

print("╔" + "═" * 8 + "╦" + "═" * 13 + "╦" + "═" * 7 + "╦" + "═" * 9 + "╦" + "═" * 4 + "╗")
print("║%7s ║%12s ║%6s ║%8s ║%3s ║" % ("number", "float", "t", "boolean", "a"))
print("╠" + "═" * 8 + "╬" + "═" * 13 + "╬" + "═" * 7 + "╬" + "═" * 9 + "╬" + "═" * 4 + "╣")
print("║%7d ║%12.3f ║%6s ║%8s ║%3d ║" % ())
print("╚" + "═" * 8 + "╩" + "═" * 13 + "╩" + "═" * 7 + "╩" + "═" * 9 + "╩" + "═" * 4 + "╝")

Принимаемые значения: int, float, boolean и все объекты с методом __str__

Metadata

Release files for utf-table-generator 1.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for utf-table-generator 1.0.4
File Size Uploaded Provenance
utf_table_generator-1.0.4.tar.gz 4.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for utf-table-generator 1.0.4
File Interpreter ABI Platform
utf_table_generator-1.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 7.8 kB

Release files / utf_table_generator-1.0.4.tar.gz

Download URL utf_table_generator-1.0.4.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fbff76c4d5de1511b8aa01f8c327e4a93c8469573cee0cd78edf14e90ea15bac
BLAKE2b-256 checksum
How to use checksums
035e25ee0261f6a0117b787964fe2facad5dbf1b00ac968ba0e208240ad8cec6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release files / utf_table_generator-1.0.4-py3-none-any.whl

Download URL utf_table_generator-1.0.4-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
064071e1fd1cde3406c7e051e2824d5ec68ccb324ba906f3a211fe58325e2b24
BLAKE2b-256 checksum
How to use checksums
8f04db95a40f0b33f6bab576a5ab6f25f7cadcdd56a1a494ebfde3a06ecdc146
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Security for utf-table-generator 1.0.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page