
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Flask Endpoints for Content Management and Retrieval
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 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
- default None
- the permission required to manage content (create, update, delete), if None
is provided the user just needs to be logged in.get_permission
- default None
- the permission required to fetch content via the API. This can be different from
the manage_permission
.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_get_without_auth
- default True
- whether an anonymous user can retrieve content via the GET endpoints.FAQs
Flask Endpoints for Content Management and Retrieval
We found that frappyflaskcontent demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.