Skip to main content

Python Functional String Utilities

Project description

stringipy: developer utilities for strings

What is it?

There are instances that you got a list over the internet, and you want to transform those strings so you can paste them easily in your code? Or you just want to make use this library to perform basic string transformation. stringipy got you covered.

stringipy is created guided with functional programming paradigms that can easily pipe operations in a single line of code.

Main Features

  • FluentString and FluentStringList handles the functional string operations
  • Current features are snake_case, prefix, suffix, join... more to come
  • This applies to both string and list of strings

How to install

Library is available in Python Package Index (PyPI).

pip install stringipy

Getting Started

Here's an example of how to perform and chain string operations.

data = ["HelloDarkness", "MyOldFriend"]

FluentStringList(data) \
	.snake_case() \
	.prefix("\"") \
    .suffix("\"") \
    .join(", ") \
    .prefix("[") \
    .suffix("]") \
    .print()

Output

["hello_darkness", "my_old_friend"]

Contributing

All contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome.

The library does not require much except for pytest and should work with the python 3.x versions. Feel free to send me a pull request or open an issue to discuss feature requests.

License

MIT

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

StringiPy-0.1.0.tar.gz (3.1 kB view details)

Uploaded Source

File details

Details for the file StringiPy-0.1.0.tar.gz.

File metadata

  • Download URL: StringiPy-0.1.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

File hashes

Hashes for StringiPy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 98ae4ac7717679363236f36eb8feed7df365967c527065520da3390bfac7cb92
MD5 80f232ed0a4aef08b3ed2d3a97ad4fb0
BLAKE2b-256 0072e220c5752062cae16de0342af708d96758758b97158bb7f953964696484e

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