diff --git a/pyproject.toml b/pyproject.toml index 322c5b9..c647d92 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ description = "Add your description here" readme = "README.md" authors = [ {name = "Denis Magel", email = "denis.magel@netapp.com"}, - {name = "Alexey Mik", email = "alexey.mikhaylov@netapp.com"}, + {name = "Alexey Mikhaylov", email = "alexey.mikhaylov@netapp.com"}, {name = "Pascal Scheiben", email = "pascal.scheiben@netapp.com"} ] requires-python = ">=3.13" diff --git a/src/example/__init__.py b/src/example/__init__.py new file mode 100644 index 0000000..1f780dd --- /dev/null +++ b/src/example/__init__.py @@ -0,0 +1,3 @@ +from .router import router as example_router + +__all__ = ["example_router"] diff --git a/src/example/constants.py b/src/example/constants.py new file mode 100644 index 0000000..e948fb8 --- /dev/null +++ b/src/example/constants.py @@ -0,0 +1,2 @@ +# contains a constant definition +FOO: int = 42 \ No newline at end of file diff --git a/src/example/router.py b/src/example/router.py new file mode 100644 index 0000000..3480774 --- /dev/null +++ b/src/example/router.py @@ -0,0 +1,9 @@ +# contains the router for the example endpoint +from fastapi import APIRouter +from .schema import ExampleSchema + +router = APIRouter(tags=["example"]) + +@router.get("/example") +async def example_endpoint() -> ExampleSchema: + return ExampleSchema(example_field="foo", another_field=42) \ No newline at end of file diff --git a/src/example/schema.py b/src/example/schema.py new file mode 100644 index 0000000..f9c7684 --- /dev/null +++ b/src/example/schema.py @@ -0,0 +1,6 @@ +# contains the schema definitions for the example service +from pydantic import BaseModel + +class ExampleSchema(BaseModel): + example_field: str + another_field: int diff --git a/src/example/service.py b/src/example/service.py new file mode 100644 index 0000000..6adc910 --- /dev/null +++ b/src/example/service.py @@ -0,0 +1,3 @@ +# contains the business logic for the example service +async def example_service() -> str: + return "This is an example service" \ No newline at end of file