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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

neutraltemplate-1.3.0b6.post1-cp313-cp313-macosx_11_0_arm64.whl (965.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

neutraltemplate-1.3.0b6.post1-cp312-cp312-macosx_11_0_arm64.whl (966.1 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

neutraltemplate-1.3.0b6.post1-cp311-cp311-macosx_11_0_arm64.whl (968.1 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

neutraltemplate-1.3.0b6.post1-cp310-cp310-macosx_11_0_arm64.whl (968.8 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

neutraltemplate-1.3.0b6.post1-cp310-cp310-macosx_10_12_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b6.post1.tar.gz
Algorithm Hash digest
SHA256 5cd6da715a657281b1952f458151ad286048b576344042dea56926a2e6744132
MD5 9d1d11fd6a62e2601e1390e82f5a3c9f
BLAKE2b-256 7f123681f0d6ff9e89ed0698b0748e61c21ff13f9fda2438fc2fa18dacd57a26

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b6.post1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 6d264dfe8f19ab5e5eca616160241e7948f75200bfeccdaae55b0bc3284cc25f
MD5 9304af490eacfaec6cd5802745ea8a23
BLAKE2b-256 7cb692418048e2af2c4b6da920c8bcc54fe0f87e05a49b6686b32af7655a3976

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b6.post1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6572ff37bd8a60eaff5667d384742c976df311174b2bd4fbce809928851a149a
MD5 88f42db610b3c17130a6fe106327bae4
BLAKE2b-256 b24ba8520e8149078e2f013f66e19753469b3b5d93a536cdfb627d34eef67468

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b6.post1-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 57261e41974ec4b2ac50838a28c1b8872597a1aabb344be761c45eb477873d2b
MD5 4e5a2bb45ea912f06c2a87e5f84cd01b
BLAKE2b-256 281c962f3296bc8d7731dd012414355a2b993169a0d7723fb8f665dd665f656e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b6.post1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7659bbc9521dbab12523150ce3e44c406bbe527e0f0c6f42990f6008702d6921
MD5 0e12ce41f177784ce6c3baccc9bd7a4b
BLAKE2b-256 23593a55cfe631fc438e34ec6621ce6b3f3b3dc5cdb84305e3ed80700abeff8e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b6.post1-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 b5cd958a5031a8d5279a5d1d1478050fa3e28903991ce50ed2dc210c075e9447
MD5 4057cd8bdd4ca72b072dcae16425edfb
BLAKE2b-256 0bee965625b242dd0cca2db449bb313655afc8be82b99a4cdd1beb0c0eba97ba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b6.post1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9007b245f6551771c43a5024b7bed3fd9baee2c816940f3e94ef66402303c20b
MD5 65d8a3fdc8bab3e4ad6cbf094beb5aeb
BLAKE2b-256 f3af20a7db79672538eec41b991791d7f122d19ebd63b27ed2c822b3cccab94d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b6.post1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a8eca2c2a52ba9a6115658d0f6314827fe114eded961c4ca817fdd8ed3cb4037
MD5 2659484863bab037fc53f9fcb3341fff
BLAKE2b-256 cefee6ce4592741d2728a99adfb2368ae9c2daa4a0d7840acbafa8582840f1fc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b6.post1-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 328716ee977b3b92962f2640beb6a25334b044d7f9fd9582eefe2fe8ee6229c9
MD5 e59e0666df29c8d8748aa4a4c5ce990d
BLAKE2b-256 8ed045512ebad37dcc1e276434361aeeb1825d1347a4132e75790a8160a99f85

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b6.post1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8549c6be6df4daf8dd825c50ed3c7a4d6fb233756d0037388c7c7dc6440d0f01
MD5 5ba417795ee0fbbf6ed6625d9dec0a25
BLAKE2b-256 b3c0d7d2e4677cd33557f29c75f16546a932c23a5cd887f00100465ce596668f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b6.post1-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 342d4e8217b7eecd0a4722117a1291a01809b387245699da6d8c54f0867c98d4
MD5 1d19be687e09fd658af22de024d08bd9
BLAKE2b-256 e56ea2fd20966693ac71ad27b43f575577bcea18d778a5920ef220460fecd68f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b6.post1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 5e52fe0e37dc12c14c4fa6dc8302d48f80e8d0ec9b9e7a5ae0956b092a7fc645
MD5 ac80433eda8ee48897d01419c593eab5
BLAKE2b-256 6360345f086645f3cd63384b888db52d03c82176de4e0368958d9b70b4e66a09

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b6.post1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d46d206b772f45f7a7f1fa3d0a14ec371861ada9934583a6bf565748815ab096
MD5 7a38e55963f80ba9714ce56d95828349
BLAKE2b-256 f2ec3309ec3aad0a5ffbb4595d8767b63ac042035854d474edee4ac07357eb42

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b6.post1-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 302e7c9b512c46ae96c480b3666970e04e3a790f265c47343c37bfc9f3aa6b5a
MD5 d0b65de23b8aa584988b9185dc3191d5
BLAKE2b-256 a5e48cd40a0bba5a71286ffa8544be58bd5f49b3b75a1cdaf329c41d17c1d622

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b6.post1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 fd3a8ffdca5b197eae221cb0ba298af943d9dc779440805a892932af3dc9cb1b
MD5 55d538a94adf61efdccaca3baf69e780
BLAKE2b-256 8e2b8febdc80f9980894e5d79de80b368b4c241f29e7bc7fe84c571cfa5f2d9f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b6.post1-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 a45bbe5b029dfed43632c6851a854f2ef02142facfa08929b29bf271706e584e
MD5 113bbccf50d8ead328c07ba857f45509
BLAKE2b-256 bc4634859838bfb314ac2f2d649e8ae434257e81c73549324db5ef6c2ec29a7a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b6.post1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 c2c9664da5b60e00d04d8cacb04fd634b37c8468ae17c38931732497e0b63dd3
MD5 7761949eaf68ef596790165518f3c9a1
BLAKE2b-256 97ab68583e017ec8677a5c7a63a413f1dc23820da31e9995238cb3a24c9725b2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b6.post1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 918f5283ce9ea5b92c007843a1b3e7c2831b49c3c9dd127ca59012fe2bd28cbc
MD5 2dfe90f500da39ab0cedc301f39e59b5
BLAKE2b-256 eee919dc7def2a53d6b36e5ea5a9d784dfe10ead268deccf8e443bc211f7f76a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b6.post1-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 da2f88ee1fd19167098cf1daafc4f283314a73fe1622c1493759f32d791bb04a
MD5 ea445ebc763ef543552bb290e54c59b5
BLAKE2b-256 42879eb7ebfb03697469ec52d9528de03c570def0d80a3e3ac02bfabdb20a63c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b6.post1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b579b4d9ae3cd7e3a6e2e8eeea7eb4c481dea798710728dab0a73700f9eb8432
MD5 4bdb0c4b8a9648ed860e48f8878d9c44
BLAKE2b-256 c7a23c136cc00cf84eaf4b83a0a65106767e9b10368f0c886f00145f74ad4649

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b6.post1-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 fd8e04d6ec3ddc984ef8f844b46b0cd5fa5ce63bc85802a55d36274d1cb852a5
MD5 a1963b43c3b07fa08f220b374f7b75e6
BLAKE2b-256 ce7293ba044de1835d1353ee008a74183642df6b9f8da2397618a3d973fe5a46

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