
Research
Security News
Malicious npm Packages Use Telegram to Exfiltrate BullX Credentials
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Flask Sugar is a web framework for building APIs with Flask, Pydantic and Python 3.6+ type hints.
Flask Sugar is a web framework for building APIs with Flask, Pydantic and Python 3.6+ type hints.
check parameters and generate API documents automatically
Documentation: https://shangsky.github.io/flask-sugar or https://flask-sugar.vercel.app/
Source Code: https://github.com/shangsky/flask-sugar
$ pip install flask-sugar
# save this as app.py
from flask_sugar import Sugar, Header
from pydantic import BaseModel
app = Sugar(__name__)
class Item(BaseModel):
name: str
size: int
class Resp(BaseModel):
a: int
b: str
c: str
item: Item
@app.post("/item/<a>")
def demo(
a: int, # path param
item: Item, # json body param
b: str = "default_query_param_b", # query param
c: str = Header("default_header_param_b"), # request header param
) -> Resp:
"""demo page"""
return Resp(a=a, b=b, c=c, item=item)
$ flask run --reload
* Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
Now visit the API documentation with Swagger UI at http://localhost:5000/doc:
visit the API documentation with Redoc at http://localhost:5000/redoc:
This project is licensed under the terms of the MIT license.
FAQs
Flask Sugar is a web framework for building APIs with Flask, Pydantic and Python 3.6+ type hints.
We found that flask-sugar 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.
Research
Security News
Socket uncovers an npm Trojan stealing crypto wallets and BullX credentials via obfuscated code and Telegram exfiltration.
Research
Security News
Malicious npm packages posing as developer tools target macOS Cursor IDE users, stealing credentials and modifying files to gain persistent backdoor access.
Security News
AI-generated slop reports are making bug bounty triage harder, wasting maintainer time, and straining trust in vulnerability disclosure programs.