Compare commits
36 Commits
bdc1af6115
...
renovate/d
| Author | SHA1 | Date | |
|---|---|---|---|
| 46b5508a40 | |||
|
106df3574c
|
|||
|
4512844027
|
|||
|
24f78bcd31
|
|||
|
711240311c
|
|||
| c375fd99fa | |||
| b278ffaf95 | |||
| 7236052a4a | |||
| dc0a2e036f | |||
| 78bd487cfe | |||
| f342bf94ad | |||
| 367670897b | |||
| 030690546d | |||
| 834fc3f045 | |||
| 0e7b6a4634 | |||
| 295da91a77 | |||
| 8ab461d601 | |||
| 616accd48f | |||
| 24926644b6 | |||
| 4396c6b534 | |||
| 957439daf7 | |||
| 1dbdec4125 | |||
| 7540750b10 | |||
| b024458812 | |||
| ec19ee3b15 | |||
| 0ffb63994c | |||
| 90f8f2077d | |||
| b29787f86f | |||
| 45c231a7a1 | |||
| 29a6bd78ff | |||
| 8ad53f40ff | |||
| 39d14e056f | |||
| db9ebf501c | |||
| 005a77e8b1 | |||
| a8a307d6bd | |||
| 771a04a6a7 |
@@ -1,33 +0,0 @@
|
||||
name: Build Hugo Docker Image
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- ".gitea/workflows/1_build_hugo_image.yml"
|
||||
|
||||
jobs:
|
||||
build docker:
|
||||
runs-on: linux_amd
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Login to Docker registry
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: git.d3vyce.fr
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GIT_TOKEN }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
build-args:
|
||||
HUGO_VERSION=v0.133.1
|
||||
file: ./hugo.Dockerfile
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
tags: git.d3vyce.fr/d3vyce/hugo:latest
|
||||
@@ -25,7 +25,7 @@ jobs:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Login to Docker registry
|
||||
uses: docker/login-action@v2
|
||||
uses: docker/login-action@v4
|
||||
with:
|
||||
registry: git.d3vyce.fr
|
||||
username: ${{ github.actor }}
|
||||
@@ -34,8 +34,6 @@ jobs:
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
build-args:
|
||||
BLOWFISH_VERSION=v2.77.1
|
||||
file: ./Dockerfile
|
||||
platforms: linux/amd64
|
||||
push: true
|
||||
@@ -1,5 +1,5 @@
|
||||
# Build Stage
|
||||
FROM git.d3vyce.fr/d3vyce/hugo:latest AS build
|
||||
FROM hugomods/hugo:0.155.3 AS build
|
||||
|
||||
ARG BLOWFISH_VERSION
|
||||
|
||||
@@ -7,11 +7,11 @@ WORKDIR /opt/blog
|
||||
COPY . /opt/blog/
|
||||
|
||||
RUN git submodule update --init --recursive && \
|
||||
git -C themes/blowfish/ checkout ${BLOWFISH_VERSION}
|
||||
git -C themes/blowfish/ checkout v2.98.0
|
||||
RUN hugo
|
||||
|
||||
# Publish Stage
|
||||
FROM nginx:1.27-alpine
|
||||
FROM nginx:1.29-alpine
|
||||
|
||||
WORKDIR /usr/share/nginx/html
|
||||
COPY --from=build /opt/blog/public /usr/share/nginx/html/
|
||||
|
||||
@@ -9,7 +9,6 @@ defaultContentLanguage = "en"
|
||||
# pluralizeListTitles = "true" # hugo function useful for non-english languages, find out more in https://gohugo.io/getting-started/configuration/#pluralizelisttitles
|
||||
|
||||
enableRobotsTXT = true
|
||||
paginate = 10
|
||||
summaryLength = 0
|
||||
|
||||
buildDrafts = false
|
||||
@@ -17,6 +16,9 @@ buildFuture = false
|
||||
|
||||
# googleAnalytics = "G-XXXXXXXXX"
|
||||
|
||||
[pagination]
|
||||
pagerSize = 10
|
||||
|
||||
[imaging]
|
||||
anchor = 'Center'
|
||||
|
||||
|
||||
@@ -11,9 +11,9 @@ title = "d3vyce Blog"
|
||||
logo = "img/author_transparent.webp"
|
||||
# secondaryLogo = "img/secondary-logo.png"
|
||||
description = "Hi 👋, Welcome to my Blog!"
|
||||
copyright = "d3vyce 2024 © All rights reserved."
|
||||
copyright = "d3vyce 2021-2026 © All rights reserved."
|
||||
|
||||
[author]
|
||||
[params.author]
|
||||
name = "d3vyce"
|
||||
image = "img/profil.png"
|
||||
headline = "Hi 👋, Welcome to my Blog!"
|
||||
|
||||
@@ -143,5 +143,5 @@ smartTOCHideUnfocusedChildren = false
|
||||
# yandex = ""
|
||||
|
||||
[umamiAnalytics]
|
||||
websiteid = "3f82b8d1-0744-4af3-a29e-c1b5add4a1e5"
|
||||
websiteid = "136df6e7-f469-45ce-b2c1-f324e7228ea5"
|
||||
domain = "analytics.d3vyce.fr"
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
---
|
||||
title: "d3vyce Blog's"
|
||||
description: "This page was built using the Blowfish theme for Hugo."
|
||||
layout: "simple"
|
||||
---
|
||||
|
||||
{{< list title="Latest Projects" cardView=true limit=3 where="Type" value="projects" >}}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
82
content/projects/fastapi-toolsets/index.md
Normal file
82
content/projects/fastapi-toolsets/index.md
Normal file
@@ -0,0 +1,82 @@
|
||||
---
|
||||
title: "Fastapi-Toolsets"
|
||||
date: 2026-01-25
|
||||
slug: "fastapi-toolsets"
|
||||
showAuthor: false
|
||||
showWordCount: false
|
||||
showReadingTime: false
|
||||
showRelatedContent: false
|
||||
showPagination: false
|
||||
tags: ["python", "fastapi", "package", "toolsets"]
|
||||
---
|
||||
|
||||

|
||||
{{< github repo="d3vyce/fastapi-toolsets" >}}
|
||||
|
||||
> Production-ready utilities for FastAPI applications
|
||||
|
||||
A modular collection of production-ready utilities for FastAPI. Install only what you need — from async CRUD and database helpers to CLI tooling, Prometheus metrics, and pytest fixtures. Each module is independently installable via optional extras, keeping your dependency footprint minimal.
|
||||
|
||||
[](https://github.com/d3vyce/fastapi-toolsets/actions/workflows/ci.yml)
|
||||
[](https://codecov.io/gh/d3vyce/fastapi-toolsets)
|
||||
[](https://github.com/astral-sh/ty)
|
||||
[](https://github.com/astral-sh/uv)
|
||||
[](https://github.com/astral-sh/ruff)
|
||||
[](https://www.python.org/downloads/)
|
||||
[](https://opensource.org/licenses/MIT)
|
||||
|
||||
---
|
||||
|
||||
**Documentation**: [https://fastapi-toolsets.d3vyce.fr](https://fastapi-toolsets.d3vyce.fr)
|
||||
|
||||
**Source Code**: [https://github.com/d3vyce/fastapi-toolsets](https://github.com/d3vyce/fastapi-toolsets)
|
||||
|
||||
---
|
||||
|
||||
## Installation
|
||||
|
||||
The base package includes the core modules (CRUD, database, schemas, exceptions, fixtures, dependencies, logging):
|
||||
|
||||
```bash
|
||||
uv add fastapi-toolsets
|
||||
```
|
||||
|
||||
Install only the extras you need:
|
||||
|
||||
```bash
|
||||
uv add "fastapi-toolsets[cli]" # CLI (typer)
|
||||
uv add "fastapi-toolsets[metrics]" # Prometheus metrics (prometheus_client)
|
||||
uv add "fastapi-toolsets[pytest]" # Pytest helpers (httpx, pytest-xdist)
|
||||
```
|
||||
|
||||
Or install everything:
|
||||
|
||||
```bash
|
||||
uv add "fastapi-toolsets[all]"
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
### Core
|
||||
|
||||
- **CRUD**: Generic async CRUD operations with `CrudFactory`, built-in full-text/faceted search and Offset/Cursor pagination.
|
||||
- **Database**: Session management, transaction helpers, table locking, and polling-based row change detection
|
||||
- **Dependencies**: FastAPI dependency factories (`PathDependency`, `BodyDependency`) for automatic DB lookups from path or body parameters
|
||||
- **Fixtures**: Fixture system with dependency management, context support, and pytest integration
|
||||
- **Standardized API Responses**: Consistent response format with `Response`, `PaginatedResponse`, and `PydanticBase`
|
||||
- **Exception Handling**: Structured error responses with automatic OpenAPI documentation
|
||||
- **Logging**: Logging configuration with uvicorn integration via `configure_logging` and `get_logger`
|
||||
|
||||
### Optional
|
||||
|
||||
- **CLI**: Django-like command-line interface with fixture management and custom commands support
|
||||
- **Metrics**: Prometheus metrics endpoint with provider/collector registry
|
||||
- **Pytest Helpers**: Async test client, database session management, `pytest-xdist` support, and table cleanup utilities
|
||||
|
||||
## License
|
||||
|
||||
MIT License - see [LICENSE](LICENSE) for details.
|
||||
|
||||
## Contributing
|
||||
|
||||
Contributions are welcome! Please feel free to submit issues and pull requests.
|
||||
@@ -1,12 +0,0 @@
|
||||
FROM golang:1.23-alpine AS build
|
||||
|
||||
ARG HUGO_VERSION
|
||||
ARG CGO=1
|
||||
|
||||
ENV CGO_ENABLED=${CGO}
|
||||
ENV GOOS=linux
|
||||
ENV GO111MODULE=on
|
||||
|
||||
RUN apk update && \
|
||||
apk add --no-cache gcc musl-dev g++ git
|
||||
RUN go install -tags extended github.com/gohugoio/hugo@${HUGO_VERSION}
|
||||
@@ -2,7 +2,7 @@
|
||||
{{ $disableImageOptimization := .Site.Params.disableImageOptimization | default false }}
|
||||
<article class="flex flex-col items-center justify-center text-center">
|
||||
<header class="flex flex-col items-center mb-3">
|
||||
{{ with .Site.Author.image }}
|
||||
{{ with .Site.Params.Author.image }}
|
||||
{{ $authorImage := resources.Get . }}
|
||||
{{ if $authorImage }}
|
||||
{{ if not $disableImageOptimization }}
|
||||
@@ -12,13 +12,13 @@
|
||||
class="mb-2 rounded-full h-36 w-36"
|
||||
width="144"
|
||||
height="144"
|
||||
alt="{{ $.Site.Author.name | default "Author" }}"
|
||||
alt="{{ $.Site.Params.Author.name | default "Author" }}"
|
||||
src="{{ $authorImage.RelPermalink }}"
|
||||
/>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<h1 class="text-4xl font-extrabold">
|
||||
{{ .Site.Author.name | default .Site.Title }}
|
||||
{{ .Site.Params.Author.name | default .Site.Title }}
|
||||
</h1>
|
||||
<div class="mt-1 text-2xl">
|
||||
{{ partialCached "author-links.html" . }}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{{ $disableImageOptimization := .Site.Params.disableImageOptimization | default false }}
|
||||
<article class="flex flex-col items-center justify-center text-center">
|
||||
<header class="flex flex-col items-center mb-3">
|
||||
{{ with .Site.Author.image }}
|
||||
{{ with .Site.Params.Author.image }}
|
||||
{{ $authorImage := resources.Get . }}
|
||||
{{ if $authorImage }}
|
||||
{{ if not $disableImageOptimization }}
|
||||
@@ -11,15 +11,15 @@
|
||||
class="mb-2 rounded-full h-36 w-36"
|
||||
width="144"
|
||||
height="144"
|
||||
alt="{{ $.Site.Author.name | default "Author" }}"
|
||||
alt="{{ $.Site.Params.Author.name | default "Author" }}"
|
||||
src="{{ $authorImage.RelPermalink }}"
|
||||
/>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<h1 class="text-4xl font-extrabold">
|
||||
{{ .Site.Author.name | default .Site.Title }}
|
||||
{{ .Site.Params.Author.name | default .Site.Title }}
|
||||
</h1>
|
||||
{{ with .Site.Author.headline }}
|
||||
{{ with .Site.Params.Author.headline }}
|
||||
<h2 class="text-xl text-neutral-500 dark:text-neutral-400">
|
||||
{{ . | markdownify | emojify }}
|
||||
</h2>
|
||||
|
||||
Submodule themes/blowfish updated: 984320d0ef...9f2045746e
Reference in New Issue
Block a user