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.3.tar.gz (17.3 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.3-cp313-cp313-win_amd64.whl (974.8 kB view details)

Uploaded CPython 3.13Windows x86-64

neutraltemplate-1.3.3-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.3-cp313-cp313-manylinux_2_28_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

neutraltemplate-1.3.3-cp313-cp313-macosx_11_0_arm64.whl (978.1 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

neutraltemplate-1.3.3-cp313-cp313-macosx_10_12_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

neutraltemplate-1.3.3-cp312-cp312-win_amd64.whl (975.2 kB view details)

Uploaded CPython 3.12Windows x86-64

neutraltemplate-1.3.3-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.3-cp312-cp312-manylinux_2_28_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

neutraltemplate-1.3.3-cp312-cp312-macosx_11_0_arm64.whl (978.2 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

neutraltemplate-1.3.3-cp312-cp312-macosx_10_12_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

neutraltemplate-1.3.3-cp311-cp311-win_amd64.whl (976.6 kB view details)

Uploaded CPython 3.11Windows x86-64

neutraltemplate-1.3.3-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.3-cp311-cp311-manylinux_2_28_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

neutraltemplate-1.3.3-cp311-cp311-macosx_11_0_arm64.whl (978.7 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

neutraltemplate-1.3.3-cp311-cp311-macosx_10_12_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

neutraltemplate-1.3.3-cp310-cp310-win_amd64.whl (977.1 kB view details)

Uploaded CPython 3.10Windows x86-64

neutraltemplate-1.3.3-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.3-cp310-cp310-manylinux_2_28_aarch64.whl (1.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

neutraltemplate-1.3.3-cp310-cp310-macosx_11_0_arm64.whl (979.1 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

neutraltemplate-1.3.3-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.3.tar.gz.

File metadata

  • Download URL: neutraltemplate-1.3.3.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.11.5

File hashes

Hashes for neutraltemplate-1.3.3.tar.gz
Algorithm Hash digest
SHA256 71989204decd8ff53eb598d44887d705536326a9e9f2755101653ec57b57094a
MD5 90aba0da3656bc1d0fe4a7e1209a8467
BLAKE2b-256 9d6c5f66521efd889a0fc8fa7dd63b99a3e903eec23c950d20f1d5c1c14fac79

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.3-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.3-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 c4be029f05cbc2792ac3b2d2c7527207ca20f9617563f97fd676c76630a28c19
MD5 78ca95198fb76e55683a677a72fd6b45
BLAKE2b-256 4df6fd06a1851b90c1a3114e9811137e37867cae1e7c43e2f6e1889a81ab3931

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.3-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.3-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 859845dfddba19d50630c3ecaa7380e5234a2d5e6d9b62d58b35c2003292e81d
MD5 d5cbe89deaacd3f539a6319c31b0ba6e
BLAKE2b-256 ec129acd581732f952468b7c1b365d547eda67481e5205594f98109faa4c27bf

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.3-cp313-cp313-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.3-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2b4e09a8c1a200bcb2aee5add5ce584de4ad767d34aca722c7bc6791b5c17531
MD5 56c37d15e6fd64187fbce6127962166a
BLAKE2b-256 4c0f34c386c2b1bcf5d328b81bd3cc0861cfc71bf9fdd43fa89fa8d965a7fca8

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.3-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.3-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dea92cf4db659088a0ca572bc6ef18b347fdb1ec6392fe0118695bc4b6f847e7
MD5 8fe53307845cf1794e7474c6441913bb
BLAKE2b-256 eaf596614cfc10c1bd3b097d9124c0a746188d456251d517269db387c452dacb

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.3-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.3-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 d1748a374b964ec2c4d711e77533cf14b9b32b7f032827a4b81d4cc861b61feb
MD5 af2bfc6a15bedbfec2981a82482f1687
BLAKE2b-256 a5e6c8fc5478abfa51881e69afe0c6c55ddd55b3d7654a119ad14bc842cd6f35

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.3-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 d6b9a38f0fcc6a3550a0fae28deb31e99a437de2e633556e97a034fa69729953
MD5 082b6c4c1b3e91c77c27002885d5d73e
BLAKE2b-256 96b8d3d5c0fc734beb437405386ac09173d878ec21df0f5c41bd6185c471f0df

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.3-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.3-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2a91f190a1e9a06cf6d03c129f1fd14de75bf1f93c93f47e9e0c2e386c9723c6
MD5 330866dbb0523f035760bbe4837e2e11
BLAKE2b-256 85fcfb1691dd5fc15dd5dcad0120e81670881fdd2e5c521b9d0703140cfec8c9

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.3-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.3-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b114b370002a29d431965f6dad498d509cd81e2429cdf9e90f8f3b0e7bec0467
MD5 15f4c17bb8d14629302f34b2bd697d8e
BLAKE2b-256 6f3c4df2c1b14916b48383e2870e98e102f64f24cbe2f201b273f59c6729b447

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.3-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.3-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b02bc99eb33c9afcae666c674e2fb7434f7f0d373c39fc1b7b800d0b6df23d0f
MD5 858b51db38e48a182c0cec662ba86a59
BLAKE2b-256 43cb24a251b578d7071099be55e9e3c681fbfbc5526667ba14fbe7e64426d62d

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.3-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.3-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 aea7318ae9220db2a1272f696100670ec1e0e31aed6d3fa55ddd125c922363ad
MD5 f1d99b8e406ace959cf5f534844effa3
BLAKE2b-256 a043952a8f5e15f396cc9a8c9a8fcaf26b1d02d195dcaa8973d41d97e80e0754

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.3-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 e6859a268f3a9bfb3b35c90f8e8aca6951fb4105019bc9e0e4a66bc9f5b4dae6
MD5 b2bedaff5e9d4ac54877daa7cbfb233a
BLAKE2b-256 8e01c853f275878ecbc86ca49f15f40821b2b237ebc0073dfe6dbc54bfa34430

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.3-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.3-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3cb71f300b7ef8f2597a1ea6d987bfa36d57ad6e92c3692cc7e4891f9445abe2
MD5 786b79dc97ef85de93225ffda1339f14
BLAKE2b-256 0e9efa0aec26e02db2f1e1a715b5f3753d6ea9ed64f8eb8a81c532a7ce59b7e0

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.3-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.3-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 5b962ea1ee34fe3ae6793f9b2a4ca93e201c3f6e2b01e4b1d18cb0de250dc848
MD5 8d39b95670fab0c88c1d942cc2debdbe
BLAKE2b-256 bc6d6c9341cb6a4244b938fd108fee2eeeba12df4e767a3df5f54277d4c7190f

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.3-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.3-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 667347a384c88f8edd144014afc66130772607d91a4b5b7cdafb0e6119307a97
MD5 289af5d1257ed30a9ae834b59267e809
BLAKE2b-256 dfdc5923e4ccdde2b3b809adf74f011429cdf230ec03787135d777a3fad8b8a3

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.3-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.3-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 581e06dd2d2df0ce2a921db77611a8fbda705a17ea77988c421cbdcb61b66280
MD5 5bd84e9312983d98242aff36e5af781d
BLAKE2b-256 b2029a92c068b513b854c2e055b600d97d4621999f23993c1335e9eabbc8ebff

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.3-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1a61d1305a41e97da176a5b4cf779777cc3cea66d8465953318bbdd104f5a1d6
MD5 ee83d55b8bce057f1a3e8fe5d2d790be
BLAKE2b-256 111f2f6a81a5cb8692b69a8e4484ce1190d2f9cb94058f558f8590222f6fe8cb

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.3-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.3-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b7faef47a6a3eb63fddd552a09e4cf2004f3faca8da4307f2c3d6755336b7400
MD5 cd4aec1874887899a36e19c0a604dc25
BLAKE2b-256 8b3300381bb8c594efb6e3bf130fb78769881aa40870b95256a59f48aa345666

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.3-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.3-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 f21d799360712742234d2924652ef0a16245585628a2108a2f628e80e3cfe03e
MD5 ff5faa7925b1ae42e6d6ed108e7e6304
BLAKE2b-256 b13b86bae8470570e8684e9616e37e2b415163f64749fc05e6bf4f206f61a2ac

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.3-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.3-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 29b9938ef6f8c163833c33d632797a73b50a6cbba9ef34f981071e3d765cf18d
MD5 516bffc085644fd18874e7e228b4b555
BLAKE2b-256 85dca92b7235c4046ba2e48b999e47a956e76e1b4df4365850f2d74bb47d2097

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.3-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.3-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f0bbb5424fabd1ab4d7f348f2451ed02c9650e114dda7d8add3b7788533bc767
MD5 7e7104363c60096120af4093b467ec7e
BLAKE2b-256 cf33a039ef2f52d784abea8afb458d379fc50e6189db5d2e113679e348dcc219

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