Hello Rodrigo,
Create a bin
mybin = CreateDatabin[]
a simple package read from disk with escapes
packstring =
"BeginPackage[\"droptest`\"]
Unprotect[myFunc];
myFunc::usage=\"a function from the data drop\"
Begin[\"`Private`\"]
myFunc[x_]:= x + 1
End[]
EndPackage[]"
Drop it in a bin
DatabinAdd[mybin, <| "myPack" -> packstring |>]
Ask for the values in your bin
Values[mybin]
if there is a lot of stuff in your bin you need to be more specific
x = mybin["Data"]["myPack"]["Values"][[3]]
The "Values" parameter is used because the datadrops representation is in "EventSeries" and I don't want the "Times" part of the coordinates. The part [[3]] is just the third selection.
You package tekst is now back from the data drop. Next challenge is the Get function to load it. My solution is to first export it to disk.
f = Export["e:\\folder\\tst2.wl", x, "Text"]
If you write to tst2.txt it works fine. For convention I write to .wl in plain text.
Get[f]
the context droptest is on the context path and myFunc[2] results in 3. Nice
So yes it is possible but why do you need such a solution? Wouldn't is be much easier if your package was loaded from your own web-server somewhere.