# SimpleEncoder
[?] A simple library for encode, decode and hash data.
## Installation
[Python](https://python.org) require 3.6+
install SimpleEncoder libary:
```sh
pip install SimpleEncoder
```
## Examples
### Encode and decode string and dict:
```python
from SimpleEncoder import SimpleEncode as SE
str_encoded = SE.Encode("hello world!").b64_str()
print(str_encoded) # aGVsbG8gd29ybGQh
str_decoded = SE.Decode(str_encoded).b64_str()
print(str_decoded) # hello world!
```
example use b64_dict:
```python
from SimpleEncoder import SimpleEncode as SE
mydict = dict(hello_content="hello", username="world", use_important=True, important_suffix="!")
str_encoded = SE.Encode(mydict).b64_dict()
print(str_encoded) # {'hello_content': 'aGVsbG8=', 'username': 'd29ybGQ=', 'use_important': 'VHJ1ZQ==', 'important_suffix': 'IQ=='}
str_decoded = SE.Decode(str_encoded).b64_dict()
print(str_decoded) # {'hello_content': 'hello', 'username': 'world', 'use_important': 'True', 'important_suffix': '!'}
# use b64_dict argument encode keys:
str_encoded = SE.Encode(mydict).b64_dict(encode_keys=True)
print(str_encoded) # {'aGVsbG9fY29udGVudA==': 'aGVsbG8=', 'dXNlcm5hbWU=': 'd29ybGQ=', 'dXNlX2ltcG9ydGFudA==': 'VHJ1ZQ==', 'aW1wb3J0YW50X3N1ZmZpeA==': 'IQ=='}
str_decoded = SE.Decode(str_encoded).b64_dict(encode_keys=True)
print(str_decoded) # {'hello_content': 'hello', 'username': 'world', 'use_important': 'True', 'important_suffix': '!'}
```
#### Documentation for the library: [GitHub WIKI](https://github.com/SikWeet/SimpleEncoder/wiki)
##the library will be constantly updated and will be better soon!
Raw data
{
"_id": null,
"home_page": "https://github.com/SikWeet/SimpleEncode/tree/main",
"name": "SimpleEncoder",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "simple encoder,pypi simple encode,encoder,pypi encoding,simpleEncoder",
"author": "Xpeawey",
"author_email": "girectx@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/49/8a/2beaa7f1e752a7d059ea7005b2321e488b238c06a3109157bc330f2acf26/SimpleEncoder-0.0.3.tar.gz",
"platform": null,
"description": "# SimpleEncoder\r\n[?] A simple library for encode, decode and hash data.\r\n\r\n## Installation\r\n\r\n[Python](https://python.org) require 3.6+\r\n\r\ninstall SimpleEncoder libary:\r\n```sh\r\npip install SimpleEncoder\r\n```\r\n\r\n## Examples\r\n### Encode and decode string and dict:\r\n```python\r\nfrom SimpleEncoder import SimpleEncode as SE\r\n\r\nstr_encoded = SE.Encode(\"hello world!\").b64_str()\r\nprint(str_encoded) # aGVsbG8gd29ybGQh\r\nstr_decoded = SE.Decode(str_encoded).b64_str()\r\nprint(str_decoded) # hello world!\r\n```\r\nexample use b64_dict:\r\n```python\r\nfrom SimpleEncoder import SimpleEncode as SE\r\n\r\nmydict = dict(hello_content=\"hello\", username=\"world\", use_important=True, important_suffix=\"!\")\r\n\r\nstr_encoded = SE.Encode(mydict).b64_dict()\r\nprint(str_encoded) # {'hello_content': 'aGVsbG8=', 'username': 'd29ybGQ=', 'use_important': 'VHJ1ZQ==', 'important_suffix': 'IQ=='}\r\nstr_decoded = SE.Decode(str_encoded).b64_dict()\r\nprint(str_decoded) # {'hello_content': 'hello', 'username': 'world', 'use_important': 'True', 'important_suffix': '!'}\r\n\r\n# use b64_dict argument encode keys:\r\n\r\nstr_encoded = SE.Encode(mydict).b64_dict(encode_keys=True)\r\nprint(str_encoded) # {'aGVsbG9fY29udGVudA==': 'aGVsbG8=', 'dXNlcm5hbWU=': 'd29ybGQ=', 'dXNlX2ltcG9ydGFudA==': 'VHJ1ZQ==', 'aW1wb3J0YW50X3N1ZmZpeA==': 'IQ=='}\r\nstr_decoded = SE.Decode(str_encoded).b64_dict(encode_keys=True)\r\nprint(str_decoded) # {'hello_content': 'hello', 'username': 'world', 'use_important': 'True', 'important_suffix': '!'}\r\n```\r\n\r\n#### Documentation for the library: [GitHub WIKI](https://github.com/SikWeet/SimpleEncoder/wiki)\r\n\r\n##the library will be constantly updated and will be better soon!\r\n",
"bugtrack_url": null,
"license": "",
"summary": "Simple and fast data encoding.",
"version": "0.0.3",
"project_urls": {
"GitHub": "https://github.com/SikWeet",
"Homepage": "https://github.com/SikWeet/SimpleEncode/tree/main"
},
"split_keywords": [
"simple encoder",
"pypi simple encode",
"encoder",
"pypi encoding",
"simpleencoder"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "fca32b942fbd1204a50682a4d4051ffd8c3adb149d54443511dda0fc8390c0dd",
"md5": "4e7692527fb564d150c75578757bf241",
"sha256": "591c67c312a5befe3882a4694f8d339419a23c9a18622d697677ea776eec8d96"
},
"downloads": -1,
"filename": "SimpleEncoder-0.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4e7692527fb564d150c75578757bf241",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6",
"size": 6326,
"upload_time": "2024-03-03T06:36:16",
"upload_time_iso_8601": "2024-03-03T06:36:16.546627Z",
"url": "https://files.pythonhosted.org/packages/fc/a3/2b942fbd1204a50682a4d4051ffd8c3adb149d54443511dda0fc8390c0dd/SimpleEncoder-0.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "498a2beaa7f1e752a7d059ea7005b2321e488b238c06a3109157bc330f2acf26",
"md5": "f36d9fab3b4738e5147980accf530122",
"sha256": "f9ccea0e9a444d40d5db6eff9dd486a753b2178183450290bd2140c5045ea440"
},
"downloads": -1,
"filename": "SimpleEncoder-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "f36d9fab3b4738e5147980accf530122",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 4360,
"upload_time": "2024-03-03T06:36:17",
"upload_time_iso_8601": "2024-03-03T06:36:17.717001Z",
"url": "https://files.pythonhosted.org/packages/49/8a/2beaa7f1e752a7d059ea7005b2321e488b238c06a3109157bc330f2acf26/SimpleEncoder-0.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-03 06:36:17",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "SikWeet",
"github_project": "SimpleEncode",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "simpleencoder"
}