toyai / python-playground

Interactive Playground for Python
https://python-playground.netlify.app
MIT License
12 stars 1 forks source link

Unique url for every code #3

Closed ydcjeff closed 3 years ago

ydcjeff commented 3 years ago

Clear and concise description of the problem

Make a unique url from client side content and extract the content from that unique url after sharing the link

Suggested solution

Use atob and btoa to convert string to base64 for url and revert base64 back to string content. Unicode support can be a problem. MDN ref.

Alternative

Since we are going to run python on server side, it might be possible to store respective content with unique urls. But I am not sure we can do fully in the free services.

Additional context

N/A