Skip to main content

Split messages (strings) to fit an arbitrary character limit

Project description

https://img.shields.io/travis/elijas/msgsplitter https://img.shields.io/pypi/v/msgsplitter https://img.shields.io/pypi/pyversions/msgsplitter https://img.shields.io/github/license/elijas/msgsplitter

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

This version

1.0

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

msgsplitter-1.0-py3-none-any.whl (6.2 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