
Research
/Security News
10 npm Typosquatted Packages Deploy Multi-Stage Credential Harvester
Socket researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.
edgedb-pydantic-codegen
Advanced tools
Alternative Python EdgeDB code generator (Pydantic V2 + asyncio, FastAPI compatible)
This tool generates Python typesafe async code for EdgeQL queries using Pydantic V2.
The generated models can be directly used with other libraries such as FastAPI.
This is an alternative to the built-in code generator of the official edgedb-python library.
In an EdgeDB initialized project, simply run
uvx edgedb-pydantic-codegen <directory>
All *.edgeql files in <directory> and its subdirectories will be processed and the generated code saved next to them.
from enum import StrEnum
from edgedb import AsyncIOExecutor
from pydantic import BaseModel, TypeAdapter
EDGEQL_QUERY = r"""
with
discord_id := <int64>$discord_id,
moecoins := <optional int32>$moecoins,
blood_shards := <optional int32>$blood_shards,
updated := (
update waicolle::Player
filter .client = global client and .user.discord_id = discord_id
set {
moecoins := .moecoins + (moecoins ?? 0),
blood_shards := .blood_shards + (blood_shards ?? 0),
}
)
select updated {
game_mode,
moecoins,
blood_shards,
user: {
discord_id,
discord_id_str,
},
}
"""
class WaicolleGameMode(StrEnum):
WAIFU = "WAIFU"
HUSBANDO = "HUSBANDO"
ALL = "ALL"
class PlayerAddCoinsResultUser(BaseModel):
discord_id: int
discord_id_str: str
class PlayerAddCoinsResult(BaseModel):
game_mode: WaicolleGameMode
moecoins: int
blood_shards: int
user: PlayerAddCoinsResultUser
adapter = TypeAdapter(PlayerAddCoinsResult | None)
async def player_add_coins(
executor: AsyncIOExecutor,
*,
discord_id: int,
moecoins: int | None = None,
blood_shards: int | None = None,
) -> PlayerAddCoinsResult | None:
resp = await executor.query_single_json(
EDGEQL_QUERY,
discord_id=discord_id,
moecoins=moecoins,
blood_shards=blood_shards,
)
return adapter.validate_json(resp, strict=False)
Currently this tool does not support:
TupleType, RangeType and MultiRangeType collectionsstd::duration, cal::relative_duration, cal::date_duration, cfg::memory and ext::pgvector::vector objectsFAQs
Alternative Python EdgeDB code generator (Pydantic V2 + asyncio, FastAPI compatible)
We found that edgedb-pydantic-codegen demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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 researchers found 10 typosquatted npm packages that auto-run on install, show fake CAPTCHAs, fingerprint by IP, and deploy a credential stealer.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.