One of the most frequent questions we get is “where do I put my data?” To this, we’ve always had the same answer: Anywhere you want. Unlike other platforms, we’ve never believed in locking in your data into our proprietary data store. Our users keep data in all sorts of different places (AWS, Rackspace, or on their local machines), and in all different forms (flat files, relational databases, and key stores). We don’t plan to change this, because we don’t believe we can provide the single best data storage solution to satisfy everyone’s needs. We’re big fans of using the correct tool for every problem.
So what is our new file storage solution? It’s a simple and easy way for our users to get their data on the cloud to be crunched by PiCloud. We don’t pretend that it’s the holy grail of data storage solutions, but it’s a solid answer for users who don’t already have a data store setup. If you don’t need it, you won’t be affected.
The module is included in our cloud library as cloud.files. Here’s the most basic way to use it:
cloud.files.put('data.txt') # stores data.txt on the cloud
cloud.files.get('data.txt') # saves data.txt onto your machine
cloud.files.getf('data.txt') # gets a stream of the contents of data.txt
See our documentation for the full specification and examples.
Tags: new features
Categories: What's New
You can follow any responses to this entry through the RSS 2.0 feed.

Thank you, this is a welcome addition that should reduce latency. Could we use this storage to store code as well, maybe serialized functions?
Hi Manuel,
Generally, it is best to let PiCloud take care of all function storage (which is done automatically).
That being said, cloud.files accepts any file-like object with cloud.files.putf and cloud.files.getf. Consequently, with the aid of StringIO, you can store any type of data in cloud.files.