snipstr


Namesnipstr JSON
Version 0.0.3 PyPI version JSON
download
home_pagehttps://github.com/imtoopunkforyou/snipstr
SummaryA lightweight library for easy-to-use text truncation with a friendly interface.
upload_time2025-11-01 12:17:57
maintainerNone
docs_urlNone
authorTimur Valiev
requires_python<4.0,>=3.10
licenseMIT
keywords string truncate shorten snip text-processing formatting utility
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            [![codecov](https://codecov.io/github/imtoopunkforyou/snipstr/graph/badge.svg?token=65OY6J3HP9)](https://codecov.io/github/imtoopunkforyou/snipstr)
[![tests](https://github.com/imtoopunkforyou/snipstr/actions/workflows/tests.yaml/badge.svg)](https://github.com/imtoopunkforyou/snipstr/actions/workflows/tests.yaml)
[![pypi package version](https://img.shields.io/pypi/v/snipstr.svg)](https://pypi.org/project/snipstr)
[![status](https://img.shields.io/pypi/status/snipstr.svg)](https://pypi.org/project/snipstr)
[![pypi downloads](https://img.shields.io/pypi/dm/snipstr.svg)](https://pypi.org/project/snipstr)
[![supported python versions](https://img.shields.io/pypi/pyversions/snipstr.svg)](https://pypi.org/project/snipstr)
[![wemake-python-styleguide](https://img.shields.io/badge/style-wemake-000000.svg)](https://github.com/wemake-services/wemake-python-styleguide)
[![mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)
[![ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![license](https://img.shields.io/pypi/l/snipstr.svg)](https://github.com/imtoopunkforyou/snipstr/blob/main/LICENSE)  


# snipstr
A lightweight library for easy-to-use text truncation with a friendly interface.

# ⚠️ Attention ⚠️
- In development.  
- May not work as you expect and may cause errors.


### Example
```python
>>> from snipstr.snipstr import SnipStr
>>> long_text = 'Python source code and installers are available for download for all versions!'
>>> s = SnipStr(long_text)
>>> s.snip_to(10).with_ellipsis()
<snipstr.snipstr.SnipStr object at 0x102df6fe0>
>>> str(s)
'Python ...'
```
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/imtoopunkforyou/snipstr",
    "name": "snipstr",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.10",
    "maintainer_email": null,
    "keywords": "string, truncate, shorten, snip, text-processing, formatting, utility",
    "author": "Timur Valiev",
    "author_email": "cptchunk@yandex.ru",
    "download_url": "https://files.pythonhosted.org/packages/7e/fa/f113216dc6a7249ef1376cb37c08ed31b436589d62134ba9b521c96e035d/snipstr-0.0.3.tar.gz",
    "platform": null,
    "description": "[![codecov](https://codecov.io/github/imtoopunkforyou/snipstr/graph/badge.svg?token=65OY6J3HP9)](https://codecov.io/github/imtoopunkforyou/snipstr)\n[![tests](https://github.com/imtoopunkforyou/snipstr/actions/workflows/tests.yaml/badge.svg)](https://github.com/imtoopunkforyou/snipstr/actions/workflows/tests.yaml)\n[![pypi package version](https://img.shields.io/pypi/v/snipstr.svg)](https://pypi.org/project/snipstr)\n[![status](https://img.shields.io/pypi/status/snipstr.svg)](https://pypi.org/project/snipstr)\n[![pypi downloads](https://img.shields.io/pypi/dm/snipstr.svg)](https://pypi.org/project/snipstr)\n[![supported python versions](https://img.shields.io/pypi/pyversions/snipstr.svg)](https://pypi.org/project/snipstr)\n[![wemake-python-styleguide](https://img.shields.io/badge/style-wemake-000000.svg)](https://github.com/wemake-services/wemake-python-styleguide)\n[![mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](https://mypy-lang.org/)\n[![ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![license](https://img.shields.io/pypi/l/snipstr.svg)](https://github.com/imtoopunkforyou/snipstr/blob/main/LICENSE)  \n\n\n# snipstr\nA lightweight library for easy-to-use text truncation with a friendly interface.\n\n# \u26a0\ufe0f Attention \u26a0\ufe0f\n- In development.  \n- May not work as you expect and may cause errors.\n\n\n### Example\n```python\n>>> from snipstr.snipstr import SnipStr\n>>> long_text = 'Python source code and installers are available for download for all versions!'\n>>> s = SnipStr(long_text)\n>>> s.snip_to(10).with_ellipsis()\n<snipstr.snipstr.SnipStr object at 0x102df6fe0>\n>>> str(s)\n'Python ...'\n```",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A lightweight library for easy-to-use text truncation with a friendly interface.",
    "version": "0.0.3",
    "project_urls": {
        "Homepage": "https://github.com/imtoopunkforyou/snipstr"
    },
    "split_keywords": [
        "string",
        " truncate",
        " shorten",
        " snip",
        " text-processing",
        " formatting",
        " utility"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "df5b262d2d0f25b673d78d8a4424c7f0c5d6b7a218e9eddacdf18828e07834ae",
                "md5": "ee97290e6f450cd3aeb8c58e7409280c",
                "sha256": "67a9c42b60ff48d38468823114d7dd156cf69006e2031b884639a2af2bddc36a"
            },
            "downloads": -1,
            "filename": "snipstr-0.0.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ee97290e6f450cd3aeb8c58e7409280c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.10",
            "size": 6183,
            "upload_time": "2025-11-01T12:17:55",
            "upload_time_iso_8601": "2025-11-01T12:17:55.911844Z",
            "url": "https://files.pythonhosted.org/packages/df/5b/262d2d0f25b673d78d8a4424c7f0c5d6b7a218e9eddacdf18828e07834ae/snipstr-0.0.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7efaf113216dc6a7249ef1376cb37c08ed31b436589d62134ba9b521c96e035d",
                "md5": "6025821e4ca976d930fe0be177b9fc6b",
                "sha256": "d634233696bac323cf2f4465b25da1ca115da0a78abe451b2cda4447fdce1c8a"
            },
            "downloads": -1,
            "filename": "snipstr-0.0.3.tar.gz",
            "has_sig": false,
            "md5_digest": "6025821e4ca976d930fe0be177b9fc6b",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.10",
            "size": 4958,
            "upload_time": "2025-11-01T12:17:57",
            "upload_time_iso_8601": "2025-11-01T12:17:57.162284Z",
            "url": "https://files.pythonhosted.org/packages/7e/fa/f113216dc6a7249ef1376cb37c08ed31b436589d62134ba9b521c96e035d/snipstr-0.0.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-11-01 12:17:57",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "imtoopunkforyou",
    "github_project": "snipstr",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "snipstr"
}
        
Elapsed time: 0.58391s