Skip to main content

Neutralts template engine for the Web, python package

Project description

Python package for Neutral TS

Neutral is a templating engine for the web written in Rust, designed to work with any programming language (language-agnostic) via IPC/Package and natively as library/crate in Rust.

Install Package

pip install neutraltemplate

Usage

See: examples

from neutraltemplate import NeutralTemplate

schema = """
{
    "config": {
        "cache_prefix": "neutral-cache",
        "cache_dir": "",
        "cache_on_post": false,
        "cache_on_get": true,
        "cache_on_cookies": true,
        "cache_disable": false,
        "disable_js": false,
        "filter_all": false
    },
    "inherit": {
        "locale": {
            "current": "en",
            "trans": {
                "en": {
                    "Hello nts": "Hello",
                    "ref:greeting-nts": "Hello"
                },
                "es": {
                    "Hello nts": "Hola",
                    "ref:greeting-nts": "Hola"
                },
                "el": {
                    "Hello nts": "Γεια σας",
                    "ref:greeting-nts": "Γεια σας"
                }
            }
        }
    },
    "data": {
        "CONTEXT": {
            "ROUTE": "",
            "HOST": "",
            "GET": {},
            "POST": {},
            "HEADERS": {},
            "FILES": {},
            "COOKIES": {},
            "SESSION": {},
            "ENV": {}
        },
        "hello": "Hello",
        "arr": {
            "hello": "Hello"
        }
    }
}
"""

template = NeutralTemplate("file.ntpl", schema)
contents = template.render()

# e.g.: 200
status_code = template.get_status_code()

# e.g.: OK
status_text = template.get_status_text()

# empty if no error
status_param = template.get_status_param()

# act accordingly at this point according to your framework

Links

Neutral TS template engine Python Package.

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

neutraltemplate-1.3.0b4.post1.tar.gz (17.7 kB view details)

Uploaded Source

Built Distributions

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

neutraltemplate-1.3.0b4.post1-cp313-cp313-win_amd64.whl (951.1 kB view details)

Uploaded CPython 3.13Windows x86-64

neutraltemplate-1.3.0b4.post1-cp313-cp313-manylinux_2_28_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

neutraltemplate-1.3.0b4.post1-cp313-cp313-manylinux_2_28_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

neutraltemplate-1.3.0b4.post1-cp313-cp313-macosx_11_0_arm64.whl (963.4 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

neutraltemplate-1.3.0b4.post1-cp313-cp313-macosx_10_12_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

neutraltemplate-1.3.0b4.post1-cp312-cp312-win_amd64.whl (951.4 kB view details)

Uploaded CPython 3.12Windows x86-64

neutraltemplate-1.3.0b4.post1-cp312-cp312-manylinux_2_28_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

neutraltemplate-1.3.0b4.post1-cp312-cp312-manylinux_2_28_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

neutraltemplate-1.3.0b4.post1-cp312-cp312-macosx_11_0_arm64.whl (963.6 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

neutraltemplate-1.3.0b4.post1-cp312-cp312-macosx_10_12_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

neutraltemplate-1.3.0b4.post1-cp311-cp311-win_amd64.whl (950.8 kB view details)

Uploaded CPython 3.11Windows x86-64

neutraltemplate-1.3.0b4.post1-cp311-cp311-manylinux_2_28_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

neutraltemplate-1.3.0b4.post1-cp311-cp311-manylinux_2_28_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

neutraltemplate-1.3.0b4.post1-cp311-cp311-macosx_11_0_arm64.whl (964.7 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

neutraltemplate-1.3.0b4.post1-cp311-cp311-macosx_10_12_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

neutraltemplate-1.3.0b4.post1-cp310-cp310-win_amd64.whl (951.1 kB view details)

Uploaded CPython 3.10Windows x86-64

neutraltemplate-1.3.0b4.post1-cp310-cp310-manylinux_2_28_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

neutraltemplate-1.3.0b4.post1-cp310-cp310-manylinux_2_28_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

neutraltemplate-1.3.0b4.post1-cp310-cp310-macosx_11_0_arm64.whl (965.0 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

neutraltemplate-1.3.0b4.post1-cp310-cp310-macosx_10_12_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

Details for the file neutraltemplate-1.3.0b4.post1.tar.gz.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b4.post1.tar.gz
Algorithm Hash digest
SHA256 0bad375fe2b6551654e5bbf65b95736ad3ad177dc52388484d868e17e57e085a
MD5 c630de3593b46c994f31caee4ed4b1ed
BLAKE2b-256 0148e379cc5062583292cceb18924d41e28c37cdcde2a32c5df8231cf80de298

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b4.post1-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b4.post1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 c04afe316b8c304e4cbee75200be2eb484b4713b9701fd25cd3909a45e3e23de
MD5 dc4d7a89acf25a3a1e94e73f3edc8b4a
BLAKE2b-256 4f52f6a66c9888b005fb73cac5905a0916866d418d4610a6a9e29d0340a6e184

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b4.post1-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b4.post1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a4d9535c1ccd671402ea73ba79eef261f48798b8f647d61aaf0bc7a8aaaeee2d
MD5 8df9ac33adffa7c7d0bd231c5bc9966d
BLAKE2b-256 295d85fedcf2dd1cd8f6ef9441c98c0ebe771411cd06b8b3b3e4a13758c54a59

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b4.post1-cp313-cp313-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b4.post1-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e031a580d072e34e72218d61ea84428459b37963355469f3d4d4e3f71ea1dd58
MD5 3be9458ffae8cfab6d0c71255b7b473c
BLAKE2b-256 b4c0edca211e0f8a3e8a5103ed7d66c947945be7d0dffa2b4c59a42296be9192

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b4.post1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b4.post1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 799cbe819411331fd2d4a6d288113e07135185c6235052f3a9053ccca9504408
MD5 c6dddc94780da4cedd9418cb4b454a64
BLAKE2b-256 32023eb49171c1c5028c1d0d998fc7d0932d4a59846ae8ba273c28e35dddd29c

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b4.post1-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b4.post1-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 83c5be6df1c2ea558d68a7578de731604cd33281e8c94030f7b8dad48be67d7e
MD5 620b35641a42122f128ffb4765cee1c7
BLAKE2b-256 6bf0d4270fab098844dbf49366c68138fe8cde4b35c528fe433bd5a5b8c1108c

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b4.post1-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b4.post1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 6135c449c9e07cf809172bb53bc1fb741090a60e46738b16783a9db7e9036f07
MD5 253544c3eea817d0e1d888a0cf80d5c6
BLAKE2b-256 26d5262f0f0f83373bed0c2b1dbbc517023cb2c79fc014da59671e07a5d91440

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b4.post1-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b4.post1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 93f6fbd086e03fb13efb234d631ea0ffd01b389c5b886dc0e472cc18ff04eeab
MD5 00b29f070c87a2bab3daa6fa50602fb3
BLAKE2b-256 f1098c09e03d7aed275c3cb4e1223a4ed11246228b841e30af5fa3a538fdbda4

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b4.post1-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b4.post1-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 dd2370429c67d6ad3486b0d8ca7a1b74438de41895f174c45dbd2fe31e70e94e
MD5 34e0b5737357fdc6fb6705948cd277b4
BLAKE2b-256 c7ebc7af3160a387d52f93d70f009ec7ad9c22a1ed57a7c7e4db10a0e9b397a2

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b4.post1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b4.post1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 2c06cb195b055cff79abe6a47e057e5990515d97d3cfca7d54acbd7ae3e6f651
MD5 49f328d915bdc0e9c07908237b5776e6
BLAKE2b-256 fe28c79b7e1dfa5c489dc7ef8592075c997448144b6501eec710e23b91a93448

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b4.post1-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b4.post1-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 671adf6532953ed51cb7297dfa8597c1472646bf64e37c07ec2996ea737a0823
MD5 a1512ddd0e861d4b20d7206ef2ff2242
BLAKE2b-256 1e62a27af6f8460f0ff7c9b0d4a3b8d3fec6577efc6251343f32c5cd0998529f

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b4.post1-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b4.post1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 67b9e6f857c8167201f983a7f489ea6511557f71d5722712977c41a42f02d5f8
MD5 26820e5f7ff190e95f145b70b2e8dbcb
BLAKE2b-256 a0814d243a536e30eef709989385a179734ab0650eda054bcc3aff7cc70508a4

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b4.post1-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b4.post1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 400dc5951c734fe016bc3b627753d71d3d9a8443b45b6beebefa9d5aa8cc35e3
MD5 fab866d8f70de91ee5d0b4503bfd74af
BLAKE2b-256 0fc113a2875958db745a48e969d5320f7dc7e823421df81caa72ef66a7c9c440

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b4.post1-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b4.post1-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 c480eb1198b1b476c3893530ea4fa6f49294535cb7b7789dff29ba857a3dde33
MD5 fda38c52e184927af20b44eaddc0ef5e
BLAKE2b-256 c7fed7e8232751f18351ffbb7e4512d1806ba822a441b24ab24ef3e943cf63a2

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b4.post1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b4.post1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 770be30270473da66082b4680b315c15255f84e0e866c774ef26eea113ef6b28
MD5 eff563eebc8bea98cc0e885216ad9c3e
BLAKE2b-256 7e8a4d1d119a6d226d0be82258869307dae6d37cbaad3264e152dda1cdaf034b

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b4.post1-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b4.post1-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 25df9a891a83de07228bc9bc01ca0f7cc25e88ffcb785a444156e9baf453c60e
MD5 8909410a4a30451e572d9afc2946dcc6
BLAKE2b-256 d49fd956f95cfb6777f3db3cb54a5ce4617ef98488a1139b9c597d79df526a9a

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b4.post1-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b4.post1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 b226dc79f965deb85334c2bed9c2569cfa3346752484c88f58e45cf4ff7fac9e
MD5 178d5c3cb2d2ca29e4260ae1e7a39611
BLAKE2b-256 f46ba8d015806942e33e89b9867073e1bb3abcb3e2c5ee9d749b8bac8927318f

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b4.post1-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b4.post1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2d8681aad321a601b52f209f7bcf3da713af11c97d765049a944f596e98bb71a
MD5 98ccba41de6c611d7b693b580da10382
BLAKE2b-256 f5a4ffa105b6f26593a1032dcb1a0c65ef999a4ba9ea458cfadd7cad8bf75bb3

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b4.post1-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b4.post1-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 8dbfb3e8b4b0cd7065d9927899bc949c14fc33c2148d15f2b12df879f5202193
MD5 6681a779f3ff7f625ebd22eec54a1e91
BLAKE2b-256 dd41bc3a8e9c49cb72c775ac44e663fc27a131e112370613903e85d1000df7e2

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b4.post1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b4.post1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a87ae27ce565361c5fd1a094e6f37de9199266b68326698a004f1545496ce5c4
MD5 87b06d04e9572bd5096c7e947708a79d
BLAKE2b-256 a21e7a36070ec52b1a742b2770b94fb7b1e19f13d3da1af494176bbe3fedaf3a

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b4.post1-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b4.post1-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a225c4ce20b027775dfb11657a536b189d68866f22c6a9af7d12a867fe033c0a
MD5 8d832758bd4af5581627fa9ea9d86191
BLAKE2b-256 7fe93785e014ee6f80d7717dcec74e9e5637f8bb0b07932637ca5127f375fd6d

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