You can upload flat files to an Amphora. A flat file could be an image, a table, a text file or anything!. You can upload multiple files to a single Amphora. You can upload flat files alongside signals as well if you like.
Upload a file
Uploading a file is easy. Make sure you have the
amphora_id of the Amphora that you want to upload a file to. To upload a file simple use the
amphora.push_file as shown below. You can also override the filename if you like.
The file uploader extension wraps some fundamental SDK calls, and simply let's you upload a file from disk.
Note: File Attribute keys must be purely alphabetical
View your file online
Your file should now be available on Amphora Data, in the Amphora you just referenced. Replace the id in the link below to check your file exists.
https://app.amphoradata.com/Amphorae/Files?id=<YOUR AMPHORA ID>
Download the file
Downloading the file via the SDK is simple:
Query the remote files
When there are many files in an Amphora, it's best to do some filtering on the server. For example, you can query by attributes like so:
See the table below for options on how to filter files.
File Query Options
|take||64||integer||Must be > 0|
|skip||0||integer||Must be > 0|
|order_by||'Alphabetical'||string||Alphabetical or LastModified|
|all_attributes||boolean||False||If true, files must have all attributes specified in attributes|
Other tips and tricks
You can check your Amphora exists by looking at its metadata
Make sure you're authenticating your api client, as shown in the getting started with Python page