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: Web APP example

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.0b3.post1.tar.gz (172.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.0b3.post1-cp313-cp313-win_amd64.whl (951.2 kB view details)

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

neutraltemplate-1.3.0b3.post1-cp312-cp312-macosx_11_0_arm64.whl (963.5 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

neutraltemplate-1.3.0b3.post1-cp310-cp310-macosx_11_0_arm64.whl (964.8 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b3.post1.tar.gz
Algorithm Hash digest
SHA256 f8d2e4bd1a90f66b3864659322123b448880875bbb61920a3469fb47af8e01b4
MD5 c0a2d8e9764d26a6cf5bfd41c4db6156
BLAKE2b-256 a3cf9daeb8c8c5df60f5b8d3b240f7bdde981a2eb0b93c14cfdd903569f3cd05

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b3.post1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 47534a9ec4491e9a7c8c1256c11a2b43a78c8be3589c5e7cbf648dea63a363b1
MD5 f4c0bd9f27e4a50a1213bdfae48e974a
BLAKE2b-256 79da0a572d52770665fc1f23a86bf00f7a57d6a49a7932c3cc6d19d17fe5da48

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b3.post1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e8bb36cdeb8367905e8b92816c37db4905cd19492cf89864b6d634ea70b902db
MD5 aec7b1c47f1a7759cfa652f0385b9f8b
BLAKE2b-256 e65848df124a05a114145d8b4ebe9ffdc884e02bc00d199c1708748ffcca52cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b3.post1-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 303db2b318002c3364ca4b6c94fa5407ea0281319e58e29a24b357719e43a377
MD5 21b08b5eda1f4cb729c25b76a367caf5
BLAKE2b-256 3b1c0f6e599e3044abdd9a6dda3297bc04a8d5c9eb2548a538f96ba8db8fc09b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b3.post1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f2e33e31dd7946d405945c5b478bfa77da0f635716f5ea2c3e61c8216fe10b5f
MD5 430f2ec8f76ff81947b46463b3b6983a
BLAKE2b-256 7aab09263b92901a6f05ff3efd4fa456e8d23937fa91e2516e9b74bb9bafe231

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b3.post1-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 6782eb286931e2371d5f3d35a869357a767eba10ba5af5e370f0a881f5eb258b
MD5 09109229b1abb2036028a7669454f387
BLAKE2b-256 deac7ea9cdc21000024eef6ae22a5329bcacb8edbdd8e36262779a8c2f9a1552

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b3.post1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c8f11bb3c26cb601faa3ed78ded15174739692a8220c80c7794ac4212bd44512
MD5 95b7dfd4068a74f392b01362b8f35957
BLAKE2b-256 49a6114ee50152558e6c31e846dda845e2f0e5d94bf2a1ab397f3545359a0059

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b3.post1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5a97ea41dc161a47cb76dabc0a92077b71cec8b9cf056c96a2cd762cbda919cc
MD5 c8ce66ac0838b1ddc8a27441fca6b464
BLAKE2b-256 6191625d152a3837a7f40fa4906c759816b92f1cf02cdb2805a3389f5922ea6a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b3.post1-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ce0858eedd697e12f6dd01a82f7e3346447db12a596163a462b5c49237ad1a36
MD5 547d994540435352a2549a915e551f7e
BLAKE2b-256 79341de15617a9339840b1ede232cc33f1615b0bb52fc90e236522194052836a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b3.post1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 1c2224d1409cf684187ef61455534ca1ec232cf7ac54c3dd89b0148240a02139
MD5 f5617d205bdf543ebb1b10bea0de8a6b
BLAKE2b-256 f4110c7ff1bfbcfd63eb2b88925366ce9212b072413c1c250878ddd47792f4c4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b3.post1-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 beb5786cb9b18bbfc3e27bd3497fdde2bdc31928b442bd6f0b8f27140d4313c0
MD5 ed1640b87df8d24671462d2e04018e2b
BLAKE2b-256 ef77d971698dc4e52b8efafcbcd1d9b2ac745781731b094930423ba92764b520

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b3.post1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 17459ab858c2adf99c38dedd9e65421b0d1de524a24e3f71343fb22838a7954a
MD5 50225cc467c83943939a1564a39edff3
BLAKE2b-256 516bd609b8aa5eed014be2fc113dd3f99ffd0a9c9281fab4b51c82eacbf0081f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b3.post1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 16aa23fe322a3c9eccd01f52c39bd9d13c461276ca773f0f37539f9719363871
MD5 b8351f863e2ac38a54c5c28b3f967beb
BLAKE2b-256 1c1115fad8c33f8914e1f7e8a2e264b921202865b99fcf6be26f304979c48431

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b3.post1-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 0271c547a3160c05b65f8c0756982064358273cd7b6c4975caed0d766fab58ed
MD5 e9701aa665f6d54eb5893b55a2dab406
BLAKE2b-256 c2d2e1588d0189b70eea95b1cdfa7a68b3c7ae08d5ebcf5ba892ed650375d352

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b3.post1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 96404063f14fc92e336f3796bc7b43a4d71cb7050b23fdc7d0c829e3c3b9a229
MD5 314f19204d0306dca30aa239ae773f72
BLAKE2b-256 5b58445c28fc43caba010151d40ee1cedc62cfca0c157ea2675a717aacadec5f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b3.post1-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 676b2cb7a036831bcbfa703bf91460cef8adcce33c39d690247e29c42a99ca3f
MD5 00e57fd96ee71cb270009ab9231d4124
BLAKE2b-256 905478283ca57f55fc6f8190ecdb4f2a6a65a3eed079d012c1e5a3bda0b86fbe

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b3.post1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 38a024647f3ba7f69988bb4d73c62a1b0d702bddca2a2ef11466d6d7d3b411e1
MD5 590594081f9cf72a6cd23d2e57a825e3
BLAKE2b-256 0b7547fe56ba0a24acf88cf75b0eaafa2eff0ba1f8e2655fc71d0bb42140b91c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b3.post1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2db7562006fa350527926fe25b820b33e4bb6f835fdf405d3fb3c770c50f4243
MD5 48b06efd97790d6db1f591aacc412d50
BLAKE2b-256 8695041e04a4bf1545be82958b202b848329fafdbea88081f610c600bf2145e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b3.post1-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5d95673d1651bbf7950727fa37bbc6382250fc8f74916d25c36f783372c137c0
MD5 fa2b373223b7f7d776ea097bb07af49d
BLAKE2b-256 a334c84dfa5c71c2f54c2ab35ad673996c3a89ce1480dbefbd43d22cf3bb8141

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b3.post1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c4456f9f459847fc98fb1076deb84350c0941225074fd11f07993db1d7833742
MD5 bea0f9bddd0e2afb71f8b27a95b263c3
BLAKE2b-256 25509a4cddcc4d9e5fcd259a4685fef8f5598df85cc5154fe937badf4dc1bb6b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b3.post1-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b9008a4269038d3cc52b7bbe6297a607f8374be77c05aa0369553539edf5f513
MD5 86ab6f2396966645ec1adb5c117e2716
BLAKE2b-256 d457b2e49d593894f23de6c7238406b88f5e946ee9d825c8a0e596ecf9871ae8

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