Skip to main content

A few bits which are potentially useful to developers of Lektor plugins

Project description

Lektorlib

PyPI version PyPI Supported Python Versions GitHub license GitHub Actions (Tests)

A few bits which may possibly be useful to developers of Lektor plugins.

Bits Included

lektorlib.query.PrecomputedQuery

A subclass of lektor.db.Query which yields a pre-computed sequence of children.

This is useful in (at least) two circumstances:

First, when the children to be queried are virtual source objects, the standard lektor.db.Query will not work. This version will.

Second, when we would like to generate a query of a pre-computed subset of a resource's children, this prevents intruducing unnecessary build dependencies. If we used a standard query with a filter applied, still iterates of all of the parent nodes children, registering dependencies on all of them.

lektorlib.context.disable_dependency_recording

A python context manager which (temporarily) disables lektor’s dependency recording system.

lektorlib.recordcache.get_or_create_virtual

This function is a helper to streamline the caching of virtual source objects in the lektor record cache.

Lektor.db.Pad.get() handles caching for regular records, at present, however, it does not appear that it ever caches virtual source objects, even though its record cache is perfectly capable of doing so.

lektorlib.testing.assert_no_dependencies(match=None)

This context manager is a testing helper which can be used to check that no dependencies are recorded with lektor’s dependency tracking system.

Author

Jeff Dairiki dairiki@dairiki.org

Changelog

Release 0.1 (2021-02-05)

No code changes.

Release is now classified as "production/stable".

Release 0.1a1 (2020-05-05)

Initial release.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lektorlib-0.1.tar.gz (12.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lektorlib-0.1-py2.py3-none-any.whl (6.8 kB view details)

Uploaded Python 2Python 3

File details

Details for the file lektorlib-0.1.tar.gz.

File metadata

  • Download URL: lektorlib-0.1.tar.gz
  • Upload date:
  • Size: 12.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5

File hashes

Hashes for lektorlib-0.1.tar.gz
Algorithm Hash digest
SHA256 93f1a484ba7c6695fdc888c8c907c46f6526a2f463edc87d6c459bc19bf57547
MD5 aa0c50cd1565a677fe0b47ac49b407d7
BLAKE2b-256 89f99f82677ba7e838b4c288e941dcc03cac8666090495638b6ad24db0261c0f

See more details on using hashes here.

File details

Details for the file lektorlib-0.1-py2.py3-none-any.whl.

File metadata

  • Download URL: lektorlib-0.1-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5

File hashes

Hashes for lektorlib-0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 14d189f26ef7f44e18f26ef744e5c35b45ea8f8945d695e239b3bf2e9aace496
MD5 096670f9267ab47b8d768b4fadefa5d9
BLAKE2b-256 8d0ed526835d7bade7147070aad2e2c74a4a415bd13cd157d577100091b71d3a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page