Skip to content

Releases: volfpeter/htmy

v0.13.0

Choose a tag to compare

@volfpeter volfpeter released this 16 Jul 07:01
3dfa111

What's Changed

  • Make jinja default slot rendering opt-in and customizable by @volfpeter in #115

Full Changelog: v0.12.1...v0.13.0

v0.12.1

Choose a tag to compare

@volfpeter volfpeter released this 06 Jul 11:05
08d6ca7

What's Changed

  • Add make_context Jinja context customization option to JinjaTemplate by @volfpeter in #112

Full Changelog: v0.12.0...v0.12.1

v0.12.0

Choose a tag to compare

@volfpeter volfpeter released this 06 Jul 07:42
6ddc432

What's Changed

  • Built-in Jinja support throught the htmy.jinja module by @volfpeter in #109
  • Added documentation and example for the htmy.jinja module by @volfpeter in #109
  • Removed deprecated HTMY alias of Renderer by @volfpeter in #109
  • Improved ContextAware.from_context() typing by @volfpeter in #109

Full Changelog: v0.11.0...v0.12.0

v0.11.0 - AnyIO & Trio

Choose a tag to compare

@volfpeter volfpeter released this 21 Apr 11:19
5c9549a

What's Changed

Breaking Changes

  • Python 3.10 support was dropped as part of the AnyIO migration
  • Renderers can now raise exception groups

Full Changelog: v0.10.3...v0.11.0

v0.10.3

Choose a tag to compare

@volfpeter volfpeter released this 23 Feb 14:38
d91e64e

What's Changed

Full Changelog: v0.10.2...v0.10.3

v0.10.2

Choose a tag to compare

@volfpeter volfpeter released this 18 Jan 15:51
4694fb8

What's Changed

  • Add is_component_type() and is_htmy_component_type() utilities by @volfpeter in #104

Full Changelog: v0.10.1...v0.10.2

v0.10.1

Choose a tag to compare

@volfpeter volfpeter released this 19 Dec 15:36
9894c9f

What's Changed

  • Fix: `StreamingRendererType.stream() should be sync by @volfpeter in #99

Full Changelog: v0.10.0...v0.10.1

v0.10.0 - HTML streaming and performance boost

Choose a tag to compare

@volfpeter volfpeter released this 17 Dec 21:14
ce6e0bb

What's Changed

The main feature is that the library now has a StreamingRenderer that lets you optimize TTFB (time to first byte), basically producing instant responses.

Tags (and the entire html module) have been rewritten to improve performance. Tag creation is now ~35% faster.

Rewritten how ErrorBoundary works, which simplified renderers and improved performance by about ~5-10.

Streaming support will soon land in FastHX and holm as well, to give you the best possible web development experience.

Features

  • Introduce the streaming renderer concept. The default streaming renderer can be imported as from htmy import StreamingRenderer. (by @volfpeter in #94)
  • The baseline renderer can now stream the result, reducing time to first byte to around 0.00001s (several orders of magnitude improvement for a typical webpage). As a side-effect, this renderer's performance is now only about 20-25% worse then the default renderer's. (by @volfpeter in #94)
  • The renderer instance can now be loaded from the rendering context using the RendererContext utility. (by @volfpeter in #94)
  • Simplified renderers by moving the ErrorBoundary rendering logic into the component itself. Also slightly improved renderer performance in the process. (by @volfpeter in #94)
  • Rewritten how tags work to improve tag creation performance by ~35%. (by @volfpeter in #94)

Breaking changes

These are likely to affect you:

  • html tags can no longer be used for type hints. You should use ComponentType instead.
  • html tags no longer have class utilities like link.css() or meta.charset() for example. The title-case variants have these utility constructors instead, e.g. Link.css() or Meta.charset().
  • WildcardTag is replace by wildcard_tag.

These likely won't affect you:

  • Tag implementations have been moved to tag.py.
  • Creating tags can no longer be done with subclassing (well, it can, just quite differently to how it was done before).
  • TagConfigDict was removed, configuration is now done directly through the Tag() constructor.

Other changes

  • Moved the project from poetry to uv.
  • Updated dev dependencies.
  • Fixed a number of deprecation warnings (most caused by using asyncio and Awaitable instead of the corresponding inspect functions).
  • Added tests for new features.
  • Migrated from mkdocs-material to zensical

Full Changelog: v0.9.0...v0.10.0

v0.9.0

Choose a tag to compare

@volfpeter volfpeter released this 11 Nov 08:07
1dbe936

What's Changed

Features:

Documentation:

  • Documentation: add notes about XSS prevention when using the MD component by @volfpeter in #84
  • Add some notes on AI assistance, compability with other templating frameworks, and performance by @volfpeter in #85
  • Update framework integrations section in the documentation by @volfpeter in #87
  • Add more notes on XSS prevention by @volfpeter in #90

Full Changelog: v0.8.2...v0.9.0

v0.8.2

Choose a tag to compare

@volfpeter volfpeter released this 28 Aug 15:04
0d65890

What's Changed

Full Changelog: v0.8.1...v0.8.2