Generator#
- class fitrequest.generator.Generator[source]#
Bases:
object- static format_params(method_config: MethodConfig, **kwargs) dict[source]#
Format and check params of generated method, raise on unrecognized arguments.
- classmethod generate_method(method_config: MethodConfig) Callable[source]#
Generate method from configuration with correct signature.
- static get_url_params(method_config: MethodConfig, **kwargs) dict[source]#
Return the keyword arguments from
kwargsthat correspond to URL parameters.This involves merging the parameters found in the
paramskeyword argument with those inferred directly from the method’s signature.Parameters from the method signature have priority over any parameters specified in the
paramsfield ofkwargs.Additionally, replace any arguments with specified aliases using their corresponding replacements.
- static unknown_params(method_config: MethodConfig, request_method_base: dict, **kwargs) set[str][source]#
Returns the collection of unexpected parameters found in the method arguments (kwargs). The only expected parameters are those reserved for
fit_request,httpx.Request, the keywordself, and URL parameters.