Skip to content


Variable: URLs

Type: str

Required: True

  • URLs should point to your root urls with dotted address (path.module.url_dict)
  • The target of URLs should be dict.
  • The key in url_routing is the path & value is the endpoint or another dict

  • Path Variables are handled like below:#

    • <variable_name>
    • Example: user/<user_id>/blog/<title>/
    • The endpoint should have parameters with those names too
    • Example Function-Base: async def profile_api(user_id: int, title: str):
    • Example Class-Base: async def get(self, user_id: int, title: str):


  • configs
    URLs = 'core.urls.url_routing
  • core/
    from app.urls import app_urls
    url_routing = {
        'user/': app_urls,
  • app/

    from app.apis import *
    urls = {
        'login/': login_api,
        'logout/': logout_api,
        'profile/<user_id>/': profile_api,

  • app/

    async def profile_api(user_id: int):
        return User.find_one(id=user_id)