Skip to content

Commit

Permalink
rename to pytextbin
Browse files Browse the repository at this point in the history
  • Loading branch information
comony committed Dec 14, 2023
1 parent 487070b commit c9731f3
Show file tree
Hide file tree
Showing 8 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions examples.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Import everything from textbin
from textbin import *
from pytextbin import *

"""
Inside the textbin.py, there is a 'Textbin()' class which has the methods:
Expand All @@ -18,21 +18,21 @@
"""

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

# 1) convert text to binary
text = 'hello world'
converted = textbin_obj.to_binary(text)
print(converted)
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(converted)
print("json_to_base64>>", converted)

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



Expand Down
1 change: 1 addition & 0 deletions pytextbin/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__all__ = ["pytextbin"]
Binary file added pytextbin/__pycache__/__init__.cpython-310.pyc
Binary file not shown.
Binary file added pytextbin/__pycache__/pytextbin.cpython-310.pyc
Binary file not shown.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion textbin/__init__.py

This file was deleted.

0 comments on commit c9731f3

Please sign in to comment.