local
- class trame.assets.local.LocalFileManager(base_path)
Bases:
object
LocalFileManager provide convenient methods for handling local files
- base64(key, file_path=None)
Store a base64 file content under the provided key name
- url(key, file_path)
Store a url encoded file content under the provided key name
- txt(key, file_path)
Store a file content (text) under the provided key name
- property assets
Return the full set of assets as a dict
- get_assets(*keys)
Return a filtered out dict using the provided set of keys
- trame.assets.local.to_mime(file_path)
Return the mime type from a given path
- trame.assets.local.to_txt(full_path)
Return the text content of the file path
- trame.assets.local.to_base64(full_path)
Return the base64 content of the file path