Skip to content

Releases: adamghill/dj-toml-settings

0.6.0

26 Feb 11:41

Choose a tag to compare

What's Changed

  • Support integer access for lists using numeric sub-keys (e.g. [tool.django.TEMPLATES.0]).
  • Add URL parsing support for database and cache settings.
    • New $type values: database and cache.
  • Improved deep dictionary parsing to handle nested settings and special operators like $insert at any depth.
  • Support for "path" casting for $type.

Full Changelog: 0.5.0...0.6.0

0.5.0

09 Sep 14:02

Choose a tag to compare

  • Move from toml to tomli for TOML parsing to allow using tomllib in standard library for Python > 3.11.

Breaking changes

  • Remove custom prefix or suffixes for special operators. Everything should start with "$" to reduce code and unnecessary complications.

0.4.0

09 Sep 12:25

Choose a tag to compare

  • Add $value operator.
  • Add $type operator with support for bool, int, str, float, decimal, datetime, date, time, timedelta, url.

0.3.1

31 Aug 22:47

Choose a tag to compare

  • Fix $index.

0.3.0

31 Aug 22:33

Choose a tag to compare

  • Handle datetime, int, float, list, dict, datetime, and Callable as variables.
  • Handle appending to a variable for Path.

Breaking changes

  • Start special operations with "$" to reduce key conflicts. Can be configured as "" to replicate 0.2.0.

0.2.0

28 Aug 02:17

Choose a tag to compare

  • Better support for using variables which are a Path.

Full Changelog: 0.1.0...0.2.0

0.1.0

27 Aug 10:54

Choose a tag to compare

  • Load pyproject.toml and django.toml files and parse them.
  • Load settings from tool.django.apps.* sections.
  • Load settings from tool.django.envs.* sections if it matches ENVIRONMENT environment variable.
  • Retrieve value from environment variable, e.g. { env = "ENVIRONMENT_VARIABLE_NAME" }.
  • Retrieve value from previous settings, e.g. VARIABLE_NAME = ${PREVIOUS_VARIABLE_NAME}.
  • Parse strings into a Path object, e.g. { path = "." }.
  • Insert value into arrays, e.g. ALLOWED_HOSTS = { insert = "127.0.0.1" }.
  • Integrations for Django, nanodjango, coltrane.