Skip to main content

PyTextBin is a versatile Python library facilitating seamless conversion between text, binary, JSON, base64, xml and CSV formats with ease.

Project description

PyTextBin

PyTextBin is a versatile Python library facilitating seamless conversion between text, binary, JSON, base64, xml and CSV formats with ease.' See the documentaion for more information

Installation

You can install PyTextBin using pip from PyPI:

pip install PyTextBin

Alternatively, you can find the project on GitHub:

GitHub Repository

Usage

Text and Binary

# Import everything from textbin
from pytextbin import *

#To begin, create an object from the Textbin() class, which you'll use to access all the methods.


# 0) create textbin_obj instance 
textbin_obj = pytextbin.Textbin()

# 1) convert text to binary
text = 'hello world'
converted = textbin_obj.to_binary(text)
print("to_binary>>", converted)

# 2) convert json data to a base64 string
json_data = { 'id' : 12 , 'name' : 'Collins' }
converted = textbin_obj.json_to_base64(json_data)
print("json_to_base64>>", converted)

base64_data = 'eyJpZCI6IDEyLCAibmFtZSI6ICJDb2xsaW5zIn0='
converted = textbin_obj.base64_to_json(base64_data)
print("base64_to_json>>", converted)

Contributions

Contributions to PyTextBin are welcome! You can find the project's GitHub repository and contribute to its development.

Contributors

Your contributions are highly appreciated! We hope that PyTextBin proves helpful to you. Thank you for using it.

I hope it be of help to you thank you. Collins O. Odhiambo

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

PyTextBin-0.0.3.tar.gz (4.9 kB view hashes)

Uploaded Source

Built Distribution

PyTextBin-0.0.3-py3-none-any.whl (5.1 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