Feature: Erstellung des Projektes

This commit is contained in:
2025-10-27 16:26:42 +01:00
parent 74d3626495
commit 3c147149ab
6 changed files with 67 additions and 2 deletions
+17
View File
@@ -0,0 +1,17 @@
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = false
max_line_length = 120
tab_width = 4
ij_continuation_indent_size = 8
ij_formatter_off_tag = @formatter:off
ij_formatter_on_tag = @formatter:on
ij_formatter_tags_enabled = true
ij_smart_tabs = false
ij_visual_guides =
ij_wrap_on_typing = false
+2
View File
@@ -0,0 +1,2 @@
.venv
/.idea/
+2 -2
View File
@@ -1,3 +1,3 @@
# PythonAppFuelTable
# Python-App-FuelTable
Ausnahme und Anzeige vom Sprit-Verbrauch
Aufnahme und Anzeige vom Sprit-Verbrauch einzelner Fahrzeuge.
+20
View File
@@ -0,0 +1,20 @@
import datetime
from fastapi import FastAPI
from api.models import Car, FuelItem
app = FastAPI()
car = Car(id_string="Auto 1")
fill_item = FuelItem(
car=car,
date=datetime.date.today(),
odometer_reading=101005,
fuel_fill=52.26
)
@app.get("/")
async def root():
return fill_item
+14
View File
@@ -0,0 +1,14 @@
import datetime
from pydantic import BaseModel, EmailStr
class Car(BaseModel):
id_string: str
class FuelItem(BaseModel):
car: Car
date: datetime.date
odometer_reading: float
fuel_fill: float
+12
View File
@@ -0,0 +1,12 @@
annotated-doc==0.0.*
annotated-types==0.7.*
anyio==4.11.*
fastapi==0.120.*
uvicorn==0.38.0
idna==3.11
pydantic==2.12.*
pydantic_core==2.41.*
sniffio==1.3.*
starlette==0.48.*
typing-inspection==0.4.*
typing_extensions==4.15.*