Skip to content

Releases: volfpeter/htmy

v0.11.0 - AnyIO & Trio

21 Apr 11:19
5c9549a

Choose a tag to compare

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

23 Feb 14:38
d91e64e

Choose a tag to compare

What's Changed

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

v0.10.2

18 Jan 15:51
4694fb8

Choose a tag to compare

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

19 Dec 15:36
9894c9f

Choose a tag to compare

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

17 Dec 21:14
ce6e0bb

Choose a tag to compare

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

11 Nov 08:07
1dbe936

Choose a tag to compare

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

28 Aug 15:04
0d65890

Choose a tag to compare

What's Changed

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

v0.8.1

12 Aug 14:06
01cc535

Choose a tag to compare

What's Changed

Full Changelog: v0.8.0...v0.8.1

v0.8.0

12 Aug 12:45
255ddf1

Choose a tag to compare

What's Changed

  • Add minimal pyright config to get language features working in recent Zed versions by @volfpeter in #70
  • Use lxml.etree if available instead of xml.etree by @volfpeter in #74
  • Add lxml as optional dependency by @volfpeter in #74
  • Upgrade dev dependencies by @volfpeter in #74

Full Changelog: v0.7.4...v0.8.0

v0.7.4

24 Apr 19:24
5e88f3e

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v0.7.3...v0.7.4