Happyx

Latest version: v4.7.4

Safety actively analyzes 723177 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 10 of 13

0.23.0

Routing syntax sugar are here 🎈

SSG
nim
"/route/with<arg>" -> any:
...
"/route" -> get:
...

serve(...):
...


SPA
nim
"/route" -> page:
...

appRoutes(...):
...

0.22.0

Since v0.22.0 you can use powerful mounting with powerful routing 🥳

Mount declaration 🎈
nim
mount Settings:
"/":
....

mount Profile:
"/":
...

mount "/settings" -> Settings


Mount usage 🔥
nim
serve(...): You can use appRoutes for SPA also 🙂
mount "/profile" -> Profile

"/":
...


Mounts is REALLY powerful ⚡

You can use path params in mounting:
nim
serve(...): or appRoutes
mount "/<arg>/$id" -> SomeMount


Changelog
- Add mounting 🔥
- Add return statement for SSG apps ✨
nim
serve(...):
"/json":
return {"response": "..."}
"/html":
return buildHtml:
....
"/text":
return "Hello, world!"

0.20.0

Now you can use request models ✨

Model declaring 🛠
nim
model MyModel:
param1: string
param2: int = 100 you can use default values 🍍


Model usage 🎈
nim
"/[m:MyModel]": you can not use model as arg name because model is macro
echo m.param1
echo m.param2
req.answer { "response": {
"one": m.param1,
"two": m.param2
}}

0.19.0

Now you can use component slots! ✨

component:
nim
component Comp:
`template`:
tDiv:
slot

Usage:
nim
"/":
component Comp:
"you can use HTML here"
tDiv:
"hi!"

0.17.0

Now you can use path params assignment! (28)

Just use
nim
pathParams:
myArg:
type int
mutable
optional
default = 10


And use it in any route:
nim
"/user<myArg>"
"/page<myArg>"

0.16.0

Components has life cycle now ✨

Simple syntax:
nim
component MyComponent:
`template`:
"hello world"
created:
echo "created"


Available cycles:
- `created`
- `exited`
- `updated`
- `beforeUpdated`

Page 10 of 13

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.