generated from Hazel/python-project
feat: implemented functions
This commit is contained in:
parent
4f252a83cc
commit
adef56790f
@ -0,0 +1,10 @@
|
||||
import json
|
||||
|
||||
|
||||
def escape_json(json_str: str) -> str:
|
||||
nested_object: dict = {"key": json_str}
|
||||
return json.dumps(nested_object)
|
||||
|
||||
def unescape_json(json_str: str) -> str:
|
||||
nested_json_string: str = '{"key": ' + json_str + '}'
|
||||
return json.loads(nested_json_string)["key"]
|
@ -1,5 +0,0 @@
|
||||
from .__about__ import __name__, __version__
|
||||
|
||||
|
||||
def cli():
|
||||
print(f"Running {__name__} version {__version__} from __main__.py")
|
@ -12,9 +12,6 @@ classifiers = [
|
||||
"Operating System :: OS Independent",
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
json-unescape = "json_unescape.__main__:cli"
|
||||
|
||||
[build-system]
|
||||
requires = ["hatchling", "hatch-requirements-txt"]
|
||||
build-backend = "hatchling.build"
|
||||
|
Loading…
Reference in New Issue
Block a user