Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/acelee0621/fastapi-demo-project
/ functions
Functions
129 in github.com/acelee0621/fastapi-demo-project
⨍
Functions
129
◇
Types & classes
53
↳
Endpoints
25
Method
get_hero
(self, hero_id: int)
app/domains/heroes/heroes_services.py:32
Function
get_hero_service
Dependency for getting HeroService instance.
app/core/dependencies.py:43
Function
get_hero_service
Dependency for getting HeroService instance.
app/api/v1/heroes_route.py:31
Function
get_hero_story
一个特殊的业务端点,返回英雄信息和一段动态生成的背景故事。 这个端点展示了为什么服务层处理业务逻辑很重要。
app/api/v1/new_hero_route.py:124
Method
get_hero_with_story
获取英雄信息,并动态生成一段背景故事。 这个方法完美展示了服务层的业务逻辑处理能力。
app/domains/heroes/heroes_services.py:129
Method
get_heroes
( self, *, search: str | None = None, order_by: list[str] | None = None, # 多字
app/domains/heroes/heroes_services.py:103
Method
get_list
获取记录列表,返回 (总数, 项目列表) 的元组。 支持可选的分页、搜索、排序和任意数量的精确过滤。
app/core/repository.py:79
Method
get_list
获取 Collection 列表,并定义搜索策略。
app/domains/collections/collections_repository.py:43
Function
get_me
Get current authenticated user.
app/api/v1/auth_route.py:45
Method
get_user
Get user by ID.
app/domains/users/user_service.py:45
Function
get_user_service
(session: AsyncSession = Depends(get_db))
app/domains/users/service_dependencies.py:8
Function
global_exception_handler
(request: Request, exc: Exception)
app/core/exceptions.py:24
Function
health_check
(response: Response)
app/main.py:65
Function
lifespan
(app: FastAPI)
app/lifespan.py:21
Function
list_collections
( search: str | None = Query( None, description="按名称、描述进行模糊搜索", max_length=100 ), orde
app/api/v1/collections_route.py:58
Function
list_heroes
( search: str | None = Query( None, description="按名称、别名、能力进行模糊搜索", max_length=100,
app/api/v1/heroes_route.py:188
Function
list_heroes
获取英雄列表,支持分页、排序和搜索。
app/api/v1/new_hero_route.py:47
Function
login
Authenticate user and return token.
app/api/v1/auth_route.py:17
Function
read_root
一个示例端点,演示如何访问配置。
app/main.py:71
Function
register
( user_data: UserCreate, service: UserService = Depends(get_user_service) )
app/api/v1/auth_route.py:31
Method
sort
(self, query)
app/schemas/heroes_filter.py:11
Function
update_collection
( collection_id: int, data: CollectionUpdate, service: CollectionService = Depends(get_collecti
app/api/v1/collections_route.py:104
Function
update_hero
Update hero.
app/api/v1/heroes_route.py:228
Function
update_hero
局部更新一个英雄的信息。
app/api/v1/new_hero_route.py:89
Method
update_hero
(self, data: HeroUpdate, hero_id: int)
app/domains/heroes/heroes_services.py:122
Function
upgrade
Upgrade schema.
alembic/versions/902aac14d239_add_powers_column_to_heroes_table.py:21
Function
upgrade
Upgrade schema.
alembic/versions/42022bfd0269_intergrate_hero_with_dateimemixin.py:21
Function
upgrade
Upgrade schema.
alembic/versions/6185a991de0c_initial_migration.py:21
Function
upgrade
Upgrade schema.
alembic/versions/f321df2cf6a5_add_collections_table.py:21
← previous
101–129 of 129, ranked by callers