An ancient question - I just started digging my nose into Databins. Here's one way to store a package in databins. the key is to drop them as inactivated expressions
Remove[Collatz]
Collatz[5]
bin = CreateDatabin[];
DatabinAdd[bin,
Import["ExampleData/Collatz.m", "InactivatedExpressions"]];
Collatz[5]
(* Collatz should remain unevaluated in both calls above *)
Now, to pull the package from the datadrop:
First@bin["Values"] // Activate
Collatz[5]
(* A string with some package information is generated here *)
(* {5, 16, 4, 2, 1} *)
I played briefly with data semantics since Package
is a valid $InterpreterType
; however, I did not see any immediate benefit to my dummy code outside of requiring more text to parse the Association
.