Skip to main content

SimpleEncoder

[?] A simple library for encode, decode and hash data.

Installation

Python require 3.6+

install SimpleEncoder libary:

pip install SimpleEncoder

Examples

Encode and decode string and dict:

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:

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

##the library will be constantly updated and will be better soon!

Metadata

Release files for SimpleEncoder 0.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for SimpleEncoder 0.0.3
File Size Uploaded
SimpleEncoder-0.0.3.tar.gz 4.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for SimpleEncoder 0.0.3
File Interpreter ABI Platform
SimpleEncoder-0.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 10.7 kB

Release files / SimpleEncoder-0.0.3.tar.gz

Download URL SimpleEncoder-0.0.3.tar.gz
Size 4.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f9ccea0e9a444d40d5db6eff9dd486a753b2178183450290bd2140c5045ea440
BLAKE2b-256 checksum
How to use checksums
498a2beaa7f1e752a7d059ea7005b2321e488b238c06a3109157bc330f2acf26
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.11

Release files / SimpleEncoder-0.0.3-py3-none-any.whl

Download URL SimpleEncoder-0.0.3-py3-none-any.whl
Size 6.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
591c67c312a5befe3882a4694f8d339419a23c9a18622d697677ea776eec8d96
BLAKE2b-256 checksum
How to use checksums
fca32b942fbd1204a50682a4d4051ffd8c3adb149d54443511dda0fc8390c0dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.11

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page