Cloud Encoder - Quantum-Codes/ScraGet GitHub Wiki

Note: If you are using this feature to encode/decode clouddata from scratch, you need to use this encoder only (Scratch side): Scratch encoder/decoder

Encoder:

from ScraGet import ScraGet
data = ["hello!", 23] #you can put anything to encode in this list.
encoder = ScraGet.encoder()
x = encoder.encode(data) #Data only should be in list format
print(f"encoded: {x}")

The data should only be a list. It can be a single item list too! Items in list can be int, str and float!

Decoder:

from ScraGet import ScraGet
encoder = ScraGet.encoder()
x = encoder.encode(["hey! how are you?"]) #encoding the list
print(f"decoded: {encoder.decode(x)}") #decoding and printing
print(encoder.decode("120045003456789000")) #decoding by directly inputting number. Must be str because of limitation of prefix 0 in int...

Note that the value to decode should not be of odd number of digits and should be a whole number in string format. The output from decoder is a list with all str items regardless of what types you encoded to save cloud space.