Skip to content

Backend

This guide is working in progress...

Python

A FastAPI backend template for Vitify Admin is under construction.

Name convention conflict

While in frontend we name variables and keys of objects with camel case, snake case should be used for them in Python according to PEP 8. axios-case-converter is an Axios transformer/interceptor which can convert snake_case/camelCase, avoiding mixing two name conventions in your source code.

Apply this transformer to axios instance:

ts
// @/utils/request.ts
import applyCaseMiddleware from "axios-case-converter";

const service = applyCaseMiddleware(
  axios.create({
    /* axios config */
  })
);
// @/utils/request.ts
import applyCaseMiddleware from "axios-case-converter";

const service = applyCaseMiddleware(
  axios.create({
    /* axios config */
  })
);

Released under the MIT License.