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.0b7.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.0b7.post1-cp313-cp313-win_amd64.whl (957.2 kB view details)

Uploaded CPython 3.13Windows x86-64

neutraltemplate-1.3.0b7.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.0b7.post1-cp313-cp313-manylinux_2_28_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

neutraltemplate-1.3.0b7.post1-cp313-cp313-macosx_11_0_arm64.whl (966.0 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

neutraltemplate-1.3.0b7.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.0b7.post1-cp312-cp312-win_amd64.whl (957.4 kB view details)

Uploaded CPython 3.12Windows x86-64

neutraltemplate-1.3.0b7.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.0b7.post1-cp312-cp312-manylinux_2_28_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

neutraltemplate-1.3.0b7.post1-cp312-cp312-macosx_11_0_arm64.whl (966.2 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

neutraltemplate-1.3.0b7.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.0b7.post1-cp311-cp311-win_amd64.whl (956.7 kB view details)

Uploaded CPython 3.11Windows x86-64

neutraltemplate-1.3.0b7.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.0b7.post1-cp311-cp311-manylinux_2_28_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

neutraltemplate-1.3.0b7.post1-cp311-cp311-macosx_11_0_arm64.whl (968.4 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

neutraltemplate-1.3.0b7.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.0b7.post1-cp310-cp310-win_amd64.whl (956.9 kB view details)

Uploaded CPython 3.10Windows x86-64

neutraltemplate-1.3.0b7.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.0b7.post1-cp310-cp310-manylinux_2_28_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

neutraltemplate-1.3.0b7.post1-cp310-cp310-macosx_11_0_arm64.whl (969.2 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

neutraltemplate-1.3.0b7.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.0b7.post1.tar.gz.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b7.post1.tar.gz
Algorithm Hash digest
SHA256 83a2209e31d25acac0250b3cc689dadff495752cc29da415212c8128537dda72
MD5 b2775c5eaa89dceb71e602a2bf18b01f
BLAKE2b-256 988722e6fab52e8adfcfe74b0f5b2a64155ce862f7d9b08d3b2c5e2361f1324d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b7.post1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 f20a4fdf5573d80db924b170f1c069ed7e3563e1ad29f7fc95045e175fb5d3bb
MD5 45905ca757b7c6dfe0516865a8605449
BLAKE2b-256 15b4ecf63bae29f5a96ecbe24c4941aaff2d156d09d5719fce4c67aaa48fa4c5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b7.post1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9aedd9262106b087791efa35b7af2c8f34e00f7a9c447e556f97edb6c5f83ad7
MD5 ecf0fabb085458ec276a34d79229f5d8
BLAKE2b-256 bf381cbaeab4be3ff22f7928757b62ac9c26700523e649e04969b9abed629a3e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b7.post1-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 48d0f1caba59e92247a7998b4ad91d4482faeef2855030141b635bcec3067ddf
MD5 2e13362bdb25453fd5019fcf441cad3f
BLAKE2b-256 1e05a34dec36714edd5fe50474bd7b5e236120fa8a3f1fc677d6af6059452fb1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b7.post1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f89b82d29e9e2a627506c3bb033f6fa890c3551d9e2e4496284e8b2d52937497
MD5 0379cf937a708c363c05078f1843d3c2
BLAKE2b-256 f2f2662f2b430abefc64874acb2d59f57ed71122a558ea148299d26d56cc688c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b7.post1-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ebeafd8433c3974f3c3c981f9e7dcda311332dd6bd512c736f9adaa4247c531a
MD5 de70551353b3f256e76ad37ca1acd9b3
BLAKE2b-256 98eca49c30ec5635d2577a8f3ddcf5d3adf9e3f2540d7541681375b3cc719d07

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b7.post1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 be74132e1171705a860f83a2f62eb1131bda86387e53b7a3c28e9f4c005e981c
MD5 fb0b25cc68aa5c2dd834c5ea4abf4848
BLAKE2b-256 0964da8b6383df726697421bfd6a7f9794940334f2d9d1af5379733966e69bbe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b7.post1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cd4f915613705ba5a881e1bf327582fc894aef6e40a52c01dd0c66541fe81071
MD5 7e47de41c9935fe8919bb31b27973098
BLAKE2b-256 12ec8ea4b2219e1cac6aed70a611d2e413f88ae5a381863a8985018ea737560f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b7.post1-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 91e8b66990456a5bd4a55dd4d9c4c1e72a70c9abe77278ff25278c5f09dc9dcb
MD5 5ca7994237d3ebf9b1047798bf8f1466
BLAKE2b-256 9ef52ff4c7925197be840922e7e340f5d5e5f4630902967f6b647593db28ae53

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b7.post1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 22b3f863b037245565e639a81b12a660929c5133074e4bf33c6d2dea379e5b5e
MD5 070fa2639938793120cac4c5f3d8a971
BLAKE2b-256 bab2383c992473d08fe1b55a66a0e976952fe68e7b04edc51889edba3d8f4848

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b7.post1-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 1ebefd036bab7a64bca58eeeb589fb29dfe9709f90cd38610bd98074402e77c6
MD5 c68b4e945420a132ae64ee37dae83d45
BLAKE2b-256 e99b76f891a14c73388aba7b4b0379ba705be24b177dc0173857d35d48d4d6ce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b7.post1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 041da7c632f5036b3135b2e0cee9615c8b15486982d6a5162d7c66927af0cf16
MD5 4d9e636c72cee49c6c8d8e160bb7786e
BLAKE2b-256 7a8d3470e440ccb3ece2df4dd61eb104ac42bea0d71a2252192b3aeaecf651ec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b7.post1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6085e9cbd36692ef87625063be6e3fe320ebd061ea5e3ad90474b92367d037e3
MD5 2ed17cbd4666f9190bb21a5ec6f63adc
BLAKE2b-256 f1d61e5029ab46eacb93290832fdaaa34f3963cbfbcaa0767f6a9d657b7a380a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b7.post1-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 58ace519636339952ee40d9ceeabdbba22ae88b210949f9d2802a5e951cc21e1
MD5 0dcc3f1a9fdd77c5a117d199f212ff1c
BLAKE2b-256 890d8eacd12b3da816a8dc74c824362640694bcb57950ef6d92f025c1486ab18

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b7.post1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b78d8a76056ecab9206f1288a1304c5103878e2bed4bc0ce41e57bdbbc8626f3
MD5 90f9a4df03117e506b7fcc9c5bd9521c
BLAKE2b-256 85adbc729f918ee638cfa07f8f47f3f8c50fb722f8caf285192a5c36ff0a7b64

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b7.post1-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 57251b753d58a1e67fdb1aad73abd8390be02835eeef487014c33c5d86984918
MD5 0e4d1b5c8d8a20ae240bf52f198932bb
BLAKE2b-256 b5590b6d0029e7fc6adc8702ba79d6b46957cbfd9f240c864106e0b84866bd83

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b7.post1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 0278c1efbef2788d0107a61dbff3f501217c2e4d16cadd27fd47e1506c422536
MD5 d84c44b30a8d324d7cc4b0fc93b8e277
BLAKE2b-256 3c6b31cb4f8c9d61c6008641b2db2f01dc1dcbeb60ea7b5612927578458c633e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b7.post1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 505be6b1341eef229f8b1be925d1462076fe4cbfb2dff3df2c29d1f068a38f1a
MD5 807dbdc27389c9d3d5c92a864591b6f4
BLAKE2b-256 a33d133d2e5d59a334a9f1e0da519585109a9bea968c1682f0b96a52cbda6965

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b7.post1-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 4184636bc01c6185cc818cea9249b31a7fdd4235a2064d7d861639490da4f3f7
MD5 af6a9300f47825e3b3688c9d4d33571d
BLAKE2b-256 d9ec01c92d4d533c73d64fb807bfd00c5a2bfd2eb1af145091c0bd66b3949d06

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b7.post1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 abb34c0665dd7953f27d2c6a2a70a0a3162e68b44052c98379c57dd3a8715f0a
MD5 469ae6a757430e3f7fdda469618b9c24
BLAKE2b-256 e13edea05fd2668585163624107616e35fceb1536d7068c1bc1a632cb95c8296

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b7.post1-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 ff82af4d1da587f12f202a8dc6ced4d4c91a94475ccd08ba4b11b15fb0cf7f86
MD5 76b96d03f18a82cccf8000b4de0a8d89
BLAKE2b-256 8e405e2a5a79fe1b99f6fe3c3b82360d97e437603c8b8ae8b1913ca872f0d245

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