Split messages (strings) to fit an arbitrary character limit
Project description
Splits long message to multiple messages in order to fit within an arbitrary message length limit (useful for SMS, Twitter, etc.).
Installation
~ $ pip install msgsplitter
or you can install local version
~ $ pip install -e .
Quick start
>>> import msgsplitter
>>> result = msgsplitter.split("Hello, this is a really long message.", length_limit=30)
>>> result
['Hello, this is a really (1/2)', 'long message. (2/2)']
Run tests
$ pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file msgsplitter-1.0-py3-none-any.whl
.
File metadata
- Download URL: msgsplitter-1.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4a959f7009d96f2f38679e991ad67ac48e4fd98ed36b351b7de5a2f00725e74 |
|
MD5 | e96aedecb340be7b08a159b9459f9714 |
|
BLAKE2b-256 | 5ce61ce0c4d5d049eee241907d8f088bcfd7078a78882920292814b0c2f4d8d7 |