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.2.0.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

kirje-0.2.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file kirje-0.2.0.tar.gz.

File metadata

  • Download URL: kirje-0.2.0.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for kirje-0.2.0.tar.gz
Algorithm Hash digest
SHA256 30ad32323ecba5dc1c712524627f08d279ba251593071ad6ff4784ddf1a2b134
MD5 04e8f80a983ad7be0ca210c7b58cd328
BLAKE2b-256 b12a2927aab3124b145dba7bb38b0ff4759020cfea5cea813ba9d419086fb0d5

See more details on using hashes here.

File details

Details for the file kirje-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: kirje-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.0

File hashes

Hashes for kirje-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3d45ee1e4cdecf81bfb14181d1a55081090e495a4602b14ff7f4abd0cfbefb1e
MD5 f7f7919cbfc9266594b20b944695eb16
BLAKE2b-256 6b69fab94a4474b6d5917f4b53981a8ec9ee10030abb9c612d714054ba783208

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