Skip to main content

Flask Data Sets

Flask Endpoints for Data Set Management and Retrieval

  1. Example Usage
  2. Options

Example Usage

from frappyflaskdataset import register_endpoints
from frappyflaskauth import check_login_state
from flask import Flask

app = Flask(__name__)
# create store instances for data sets
data_store = ...
# register the endpoints
register_endpoints(app, data_store, options={
    "manage_permission": "manage",
    "login_check_function": check_login_state,
})

Options

Options for the register_endpoints function are:

  • api_prefix - default /api/data-sets - is the prefix under which the endpoints will be registered. This should match the prefix used in the front-end.
  • manage_permission - default None - the permission required to manage data sets (upload, update, delete), if None is provided the user just needs to be logged in.
  • get_permission - default None - the permission required to fetch data sets via the API. This can be different from the manage_permission.
  • data_folder - default _data - the local directory where to store data files (images primarily). This is relative to your applications root directory (from where you execute the start command)
  • login_check_function - default None - provide a function that performs authentication and uses Flask's abort in case the login / permission check fails. The function has 1 parameter for the required permission. You can use check_login_state from the frappyflaskauth package.
  • allow_public_binary_access - default False - a boolean flag that, when set to True will allow even unauthenticated users to download the files from all BINARY data sets and IMAGE data sets. This allows to directly include <img src="/api/data-sets/<id>/image"> without running into authentication issues (requires using ImageView)

Release files for frappyflaskdataset 1.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for frappyflaskdataset 1.3.3
File Size Uploaded
frappyflaskdataset-1.3.3.tar.gz 4.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for frappyflaskdataset 1.3.3
File Interpreter ABI Platform
frappyflaskdataset-1.3.3-py3-none-any.whl Python 3 none any Details

Total release size: 12.8 kB

Release files / frappyflaskdataset-1.3.3.tar.gz

Download URL frappyflaskdataset-1.3.3.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
8619537623c05042270e2f757160af9b9b8a5989eb648c9ec28c1c0d7f33b547
BLAKE2b-256 checksum
How to use checksums
7acb76b5ee2dd0162b90e8a0ef16d07e3c8b67b81156d51d0dac765a78e2eada
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.12

Release files / frappyflaskdataset-1.3.3-py3-none-any.whl

Download URL frappyflaskdataset-1.3.3-py3-none-any.whl
Size 8.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
462bd645e8e37a919c609e35d6a84663662ce3e33807c8dac732778442ab0221
BLAKE2b-256 checksum
How to use checksums
3369ba8b554943c58b9d5f219d8a108af29b1b09de70d6256d084fdd67972061
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.58.0 CPython/3.8.12

Release history Release notifications | RSS feed

This release

1.3.3 This release

2 release files

1.3.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page