Fasteve

Latest version: v0.2.3

Safety actively analyzes 681812 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

0.2.3

**Full Changelog**: https://github.com/Wytamma/fasteve/compare/v0.2.2...v0.2.3

0.2.2

Fix versioning error.

**Full Changelog**: https://github.com/Wytamma/fasteve/compare/v0.2.1...v0.2.2

0.2.1

🎇 Pagination!

0.2.0

Added SQL support via SQLModel.

Below is a example SQL API in fasteve. This API (41 lines) is equivalent to the sqlmodel example (107 lines).

python
from typing import Optional
from fasteve import Fasteve, Resource, SQLModel, SQLField as Field
from fasteve.io.sql import SQLDataLayer


class HeroBase(SQLModel):
name: str = Field(index=True)
secret_name: str
age: Optional[int] = Field(default=None, index=True)


class Hero(HeroBase, table=True):
id: Optional[int] = Field(default=None, primary_key=True)


class HeroCreate(HeroBase):
pass


class HeroRead(HeroBase):
id: int


class HeroUpdate(SQLModel):
name: Optional[str] = None
secret_name: Optional[str] = None
age: Optional[int] = None


hero = Resource(
model=Hero,
response_model=HeroRead,
create_model=HeroCreate,
update_model=HeroUpdate,
resource_methods=["GET", "POST"],
item_methods=["GET", "DELETE", "PATCH"],
)

resources = [hero]

app = Fasteve(resources=resources, data=SQLDataLayer)

0.1.3

I've updated all the dependancies and fixed the tests.

0.1.2

Links

Releases

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.