Skip to main content

A framing library for content with headers and body.

Project description

Kirje

A framing library for content with headers and body.

Installation: pip install kirje

Usage

Import Kirje and KirjeDetails. Initialize KirjeDetails and use it as parameter to construct concrete Kirje object.

from kirje import Kirje, KirjeDetails

details = KirjeDetails(
    headers={
        'ID': 2,
        'Title': 'Hello world',
        'Created': '2023-10-27 14:18:14',
        'Modified': '2023-10-27 14:18:25'
    },
    content="Hello\nworld."
)

message = Kirje(details)
message.display("rounded")

Expected output:

╭──────────Hello world──────────╮
│ ID: 2                         │
│ Created: 2023-10-27 14:18:14  │
│ Modified: 2023-10-27 14:18:25 │
├───────────────────────────────┤
│ Hello                         │
│ world.                        │
╰───────────────────────────────╯

Styles

Default:

+----------Hello world----------+
| ID: 2                         |
| Created: 2023-10-27 14:18:14  |
| Modified: 2023-10-27 14:18:25 |
+-------------------------------+
| Hello                         |
| world.                        |
+-------------------------------+

Rounded:

╭──────────Hello world──────────╮
│ ID: 2                         │
│ Created: 2023-10-27 14:18:14  │
│ Modified: 2023-10-27 14:18:25 │
├───────────────────────────────┤
│ Hello                         │
│ world.                        │
╰───────────────────────────────╯

Doubled style letter:

+==========Hello world==========+
‖ ID: 2                         ‖
‖ Created: 2023-10-27 14:18:14  ‖
‖ Modified: 2023-10-27 14:18:25 ‖
+===============================+
‖ Hello                         ‖
‖ world.                        ‖
+===============================+

Streamlined style letter:

+==========Hello world==========+
| ID: 2                         |
| Created: 2023-10-27 14:18:14  |
| Modified: 2023-10-27 14:18:25 |
+-------------------------------+
| Hello                         |
| world.                        |
+===============================+

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

kirje-0.1.0.tar.gz (4.2 kB view hashes)

Uploaded Source

Built Distribution

kirje-0.1.0-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

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