module server.filestore_sqlite
¶
Short summary¶
module pyquickhelper.server.filestore_sqlite
Simple class to store and retrieve files with a sqlite3 detabase.
Classes¶
class |
truncated documentation |
---|---|
Simple file storage implemented with :epkg:`python:sqlite3`. |
Static Methods¶
staticmethod |
truncated documentation |
---|---|
|
Methods¶
method |
truncated documentation |
---|---|
Creates the database if it does not exists. |
|
Queries the database, enumerates the results. |
|
Queries the database, enumerates the results, returns the content as well. |
|
Queries the database, enumerates the results. |
|
Submits a file to the database. |
|
Submits data to the database. |
Documentation¶
Simple class to store and retrieve files with a sqlite3 detabase.
- class pyquickhelper.server.filestore_sqlite.SqlLite3FileStore(path='_file_store_.db3')[source]¶
Bases:
object
Simple file storage implemented with :epkg:`python:sqlite3`.
- Parameters:
path – location of the database.
- enumerate(name=None, format=None, date=None, metadata=None, team=None, project=None, version=None)[source]¶
Queries the database, enumerates the results.
- Parameters:
name – filename
format – format
date – date, by default now
metadata – addition information
team – another name
project – another name
version – version
- Returns:
results
- enumerate_content(name=None, format=None, date=None, metadata=None, team=None, project=None, version=None)[source]¶
Queries the database, enumerates the results, returns the content as well.
- Parameters:
name – filename
format – format
date – date, by default now
metadata – addition information
team – another name
project – another name
version – version
- Returns:
results
- enumerate_data(idfile=None, name=None, join=False, project=None)[source]¶
Queries the database, enumerates the results.
- Parameters:
idfile – file identifier
name – value name, None if not specified
join – join with the table files
project – filter by project
- Returns:
results
- submit(name, content, format=None, date=None, metadata=None, team=None, project=None, version=None)[source]¶
Submits a file to the database.
- Parameters:
name – filename
content – file content (it can be a dataframe)
format – format
date – date, by default now
metadata – addition information
team – another name
project – another name
version – version
- Returns:
added data as a dictionary (no content)