Skip to main content

Cross platform string syntax for reliably extracting object data

Usage examples

import Populater

Person = {
    "age": 17,
    "name": {
        "first": "Marty",
        "last": "Mcfly",
        "full": "Marty Mcfly"
    }
}
ctx                               =  Populater( Person )

assert ctx('{{ age }}')                   == '17'
assert ctx('< age')                       == 17
assert ctx('= {{ age }}')                 == 17
assert ctx("< name.first")                == "Marty"
assert ctx("= {{ age }} > 18")            is True
assert ctx("{{ name.none }}")             == ""
assert ctx("= {{ name.none }}")           is None
assert ctx(":= {{ name.full }}")          == "= Marty Mcfly"
assert ctx("= '= {{ name.full }}'")       == "= Marty Mcfly"
assert ctx(":: {{ name.full }}")          == ": Marty Mcfly"
assert ctx("= self['name']['full']")      == "Marty Mcfly"

Release files for populater 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for populater 0.1.5
File Size Uploaded
populater-0.1.5.tar.gz 3.6 kB Details

Release files / populater-0.1.5.tar.gz

Download URL populater-0.1.5.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
53f776d31c9bd6c04b3722a0e4b7063bf2b034acae94de72147109dd398e8a50
BLAKE2b-256 checksum
How to use checksums
32f48dd101df2410bff4fcd4893f298a87a56c6eff068f5ca32a497da3a7c1fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1.5 This release

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page