
Research
SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.
govyn
Advanced tools
A tiny framework for writing async HTTP APIs in typed Python.
govyn (verb) - ask, inquire, query, question, request (Cornish Dictionary)
/openapi/schema: OpenAPI v3 schema as JSON/openapi/swagger: embedded Swagger UI page for testing/openapi/redoc: embedded Redoc documentation pagefrom dataclasses import dataclass
from typing import List
from govyn import run
@dataclass
class AddRequest:
numbers: List[int]
@dataclass
class Response:
result: int
class CalculatorAPI:
# run initialisation tasks, e.g. connecting to a database
async def startup(self) -> None:
pass
# be a good citizen and dispose of things appropriately
async def shutdown(self) -> None:
pass
# get_ methods take a query string
# callers will receive a 400 Bad Request if they supply invalid values
async def get_add(self, a: int, b: int) -> Response:
return Response(a + b)
# post_ methods take a JSON request body
# also type-checked according to the dataclass definition
async def post_add(self, req: AddRequest) -> Response:
return Response(sum(req.numbers))
run(CalculatorAPI())
Try out the built-in Swagger UI on this example Heroku deployment, built from source available in the govyn-demo repository!
Or, run the server locally and hit it with curl:
> curl "http://localhost/add?a=10&b=32"
{"result": 42}
> curl "http://localhost/add" -d '{ "numbers": [ 1000, 300, 30, 7 ] }'
{"result": 1337}
# from PyPI
pip install govyn
# or directly from Git
pip install git+ssh://git@github.com/returnString/govyn.git
FAQs
HTTP APIs in typed Python
We found that govyn 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
An emerging npm supply chain attack that infects repos, steals CI secrets, and targets developer AI toolchains for further compromise.

Company News
Socket is proud to join the OpenJS Foundation as a Silver Member, deepening our commitment to the long-term health and security of the JavaScript ecosystem.

Security News
npm now links to Socket's security analysis on every package page. Here's what you'll find when you click through.