Flask Content
Flask Endpoints for Content Management and Retrieval
Example Usage
from frappyflaskcontent import register_endpoints
from frappyflaskauth import check_login_state
from flask import Flask
app = Flask(__name__)
# create store instances for content
content_store = ...
# register the endpoints
register_endpoints(app, content_store, options={
"manage_permission": "manage",
"login_check_function": check_login_state,
})
Options
Options for the register_endpoints function are:
api_prefix- default/api/content- is the prefix under which the endpoints will be registered. This should match the prefix used in the front-end.manage_permission- defaultNone- the permission required to manage content (create, update, delete), ifNoneis provided the user just needs to be logged in.get_permission- defaultNone- the permission required to fetch content via the API. This can be different from themanage_permission.login_check_function- defaultNone- provide a function that performs authentication and uses Flask'sabortin case the login / permission check fails. The function has 1 parameter for the required permission. You can usecheck_login_statefrom thefrappyflaskauthpackage.allow_get_without_auth- defaultTrue- whether an anonymous user can retrieve content via the GET endpoints.
Metadata
Release files for frappyflaskcontent 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| frappyflaskcontent-1.1.1.tar.gz | 2.8 kB | Without provenance | Details for frappyflaskcontent-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| frappyflaskcontent-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for frappyflaskcontent-1.1.1-py3-none-any.whl |
Total release size: 10.1 kB
Release files / frappyflaskcontent-1.1.1.tar.gz
| Download URL | frappyflaskcontent-1.1.1.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
214c9068e2c9e65bcd55ff7886d30fa64490254e60b394ae522c51bea793e89d
|
|
BLAKE2b-256 checksum How to use checksums |
e2e919a7633f7df35df1655fc0c0d20b07e5f19c3ba84adf595231b1ee7f466c
|
| 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 / frappyflaskcontent-1.1.1-py3-none-any.whl
| Download URL | frappyflaskcontent-1.1.1-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9d6926e2b1c893f5c59c47b246e92e5cb76595bf20152b06c96d9d3542022576
|
|
BLAKE2b-256 checksum How to use checksums |
c9ab33daf12e1ec4c8b1445fefe80a75c4ef173a55da81b8218066a9cd41da17
|
| 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
|
Security for frappyflaskcontent 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.