Schemes
This are classes to use for the communication between all functions
Allergie
Hint
This is an Enum
- class schemes.Allergies(value)[source]
Filter for Allergies
- LACTOSE
Defaults to Laktoseintoleranz
- Type
str
- WHEAT
Defaults to Glutenunvertraeglichkeit
- Type
str
Pydantic Class
Warning
Pydantic class for ORM convertion
Class for the Allergies
Classes:
|
Needed class for revonvert orm models |
- class schemes.scheme_allergie.PydanticAllergies(*, name: str)[source]
Needed class for revonvert orm models
- name
Only Schemes in the schemes.Allergies Enum are valid
- Type
str
Methods:
allergie_values
(value)Check if the Allergie is in schemes.Allergies Enum
Cuisine
- class schemes.Cuisine(value)[source]
Only this Cuisine can be searched
- ITALIAN
- GERMAN
- ASIAN
- DOENER
- TURKEY
- GREEK
- KOREAN
- THAILAND
- INDIAN
- COFFE
- BAKERY
- BUTCHER
- VEGAN
- VEGETARIAN
- FASTFOOD
- AMERICAN
- RESTAURANT
Pydantic Class
Warning
Pydantic class for ORM convertion
Class for the Cuisine
Classes:
|
Needed class for revonvert orm models |
- class schemes.scheme_cuisine.PydanticCuisine(*, name: str)[source]
Needed class for revonvert orm models
- name
Only schemes.Cuisine Enum valid
- Type
str
Methods:
cuisine_values
(value)Check if the cuisine is in schemes.cuisines Enum
Filter
Contains all Filter for the searches
Classes:
|
Base Filter for recepes and restaurant |
|
Extended Model for Recipe-Filter |
|
Use this scheme to Search for a Restaurant in the Backend |
|
Use this scheme if you internact with the Filter that are saved in the DB |
- class schemes.scheme_filter.FilterBase(*, cuisines: List[schemes.scheme_cuisine.PydanticCuisine], rating: int, allergies: List[schemes.scheme_allergie.PydanticAllergies] = None)[source]
Base Filter for recepes and restaurant
- cuisines
All cuisines to search
- Type
- rating
Minimum rating
- Type
int
- allergies
All allergies to take care of
- Type
Optional[List[scheme_allergie.PydanticAllergies]]
Methods:
rating_range
(value)Check if rating >= 1 and <= 5
- class schemes.scheme_filter.FilterRecipe(*, keyword: str, total_time: datetime.timedelta)[source]
Extended Model for Recipe-Filter
- keyword
Keyword to search
- Type
str
- total_time
Max cook time
- Type
datetime.timedelta
- class schemes.scheme_filter.FilterRest(*, cuisines: List[schemes.scheme_cuisine.PydanticCuisine], rating: int, allergies: List[schemes.scheme_allergie.PydanticAllergies] = None, costs: int, radius: int, location: schemes.scheme_rest.LocationBase)[source]
Use this scheme to Search for a Restaurant in the Backend
- costs
Maximum pricing
- Type
int
- radius
Radius of the search
- Type
int
- location
Position for the search
Methods:
costs_range
(value)Check if costs >= 0 and <= 4
- class schemes.scheme_filter.FilterRestDatabase(*, cuisines: List[schemes.scheme_cuisine.PydanticCuisine], rating: int, allergies: List[schemes.scheme_allergie.PydanticAllergies] = None, costs: int, radius: int, manuell_location: str)[source]
Use this scheme if you internact with the Filter that are saved in the DB
- costs
Maximum pricing
- Type
int
- radius
Radius of the search
- Type
int
- manuell_location
To save the location
- Type
str
Methods:
costs_range
(value)Check if costs >= 0 and <= 4
Recipe
Contains the Class for Recipe
Classes:
|
Class that you get from the backend to handle the recipe |
|
Base class for the Recipes |
|
BaseClass for the Bewertung |
|
Class to create a new Bewertung in the DB |
|
Class to return to the frontend |
- class schemes.scheme_recipe.Recipe(*, id: str, name: str, ingredients: str, url: str, image: str = None, cookTime: datetime.timedelta = None, prepTime: datetime.timedelta = None)[source]
Class that you get from the backend to handle the recipe
- id
id of the recipe
- Type
str
- name
name of the recipe
- Type
str
- ingredients
ingredients of the recipe
- Type
str
- url
url to the original page of the recipe
- Type
str
- image
url to an image if db contain one
- Type
Optional[str]
- cookTime
cooktime of the recipe if specified
- Type
Optional[timedelta]
- prepTime
preperation time of the recipe if specified
- Type
Optional[timedelta]
- class schemes.scheme_recipe.RecipeBase(*, id: str)[source]
Base class for the Recipes
- id
id of the recipe
- Type
str
- class schemes.scheme_recipe.RecipeBewertungBase(*, name: str, comment: str = '', rating: float = 0)[source]
BaseClass for the Bewertung
- name
Name of the restaurant
- Type
str
- comment
comment from the user. Defaults to “”.
- Type
Optional[str]
- rating
Rating of the user. Defaults to 0.
- Type
Optional[float]
- class schemes.scheme_recipe.RecipeBewertungCreate(*, name: str, comment: str = '', rating: float = 0, person: schemes.scheme_user.UserBase, recipe: schemes.scheme_recipe.RecipeBase)[source]
Class to create a new Bewertung in the DB
- person
Owner of the assessment.
- Type
- recipe
The recipe.
- class schemes.scheme_recipe.RecipeBewertungReturn(*, name: str, comment: str = '', rating: float = 0, email: str, id: str, timestamp: datetime.datetime)[source]
Class to return to the frontend
- email
Email of the User
- Type
str
- id
PlaceID of the recipe
- Type
str
- timestamp
Last Update of the assessment
- Type
datetime.datetime
Restaurant
Contains all classes for the restaurant search
Classes:
|
Needed for better automation converting from the google api |
|
contain only coordinates |
|
Store further information about the location of the restaurant |
|
BaseClass for the Bewertung |
|
Class to create a new Bewertung in the DB |
|
Class to return to the frontend |
|
Class that got return to the website |
|
Scheme that is only needed for the DB |
|
Scheme that is only needed for the DB |
- class schemes.scheme_rest.Geometry(*, location: schemes.scheme_rest.LocationRest)[source]
Needed for better automation converting from the google api
- location
- class schemes.scheme_rest.LocationBase(*, lat: str, lng: str)[source]
contain only coordinates
- lat
Latitude
- Type
str
- lng
Longitude
- Type
str
- class schemes.scheme_rest.LocationRest(*, lat: str, lng: str, adr: str = None)[source]
Store further information about the location of the restaurant
- adr
Address of the Restaurant. Defaults to None
- Type
str
- class schemes.scheme_rest.RestBewertungBase(*, name: str, comment: str = '', rating: float = 0)[source]
BaseClass for the Bewertung
- name
Name of the restaurant
- Type
str
- comment
comment from the user. Defaults to “”.
- Type
Optional[str]
- rating
Rating of the user. Defaults to 0.
- Type
Optional[float]
- class schemes.scheme_rest.RestBewertungCreate(*, name: str, comment: str = '', rating: float = 0, person: schemes.scheme_user.UserBase, restaurant: schemes.scheme_rest.RestaurantBase)[source]
Class to create a new Bewertung in the DB
- person
Owner of the assessment.
- Type
- restaurant
The restaurant.
- Type
- class schemes.scheme_rest.RestBewertungReturn(*, name: str, comment: str = '', rating: float = 0, email: str, place_id: str, timestamp: datetime.datetime)[source]
Class to return to the frontend
- email
Email of the User
- Type
str
- place_id
PlaceID of the Restaurant
- Type
str
- timestamp
Last Update of the assessment
- Type
datetime.datetime
- class schemes.scheme_rest.Restaurant(*, place_id: str, name: str, geometry: schemes.scheme_rest.Geometry, maps_url: str = None, rating: float = None, own_rating: float = None, phone_number: str = None, homepage: str = None)[source]
Class that got return to the website
- name
Name of the Restaurant
- Type
str
- maps_url
google maps url of the restaurant. Defaults to None.
- Type
str
- rating
google rating. Defaults. to None
- Type
float
- own_rating
User rating. Defgaults to None.
- Type
float
- phone_number
Phonenumber of the restaurant. Defgaults to None.
- Type
str
- homepage
Url of the homepage. Defgaults to None.
- Type
str
User
Contains all classes for the user
Classes:
|
User with mail an last_login |
|
Base Class for all User |
|
Class to create an User. |
|
User if he try to login |
- class schemes.scheme_user.User(*, email: str, last_login: datetime.datetime)[source]
User with mail an last_login
- last_login
Timestamp of last login
- Type
datetime.datetime
- class schemes.scheme_user.UserBase(*, email: str)[source]
Base Class for all User
- email
Email of the User
- Type
str