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.1.tar.gz (17.6 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.1-cp313-cp313-win_amd64.whl (956.9 kB view details)

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

neutraltemplate-1.3.1-cp313-cp313-macosx_11_0_arm64.whl (965.8 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

neutraltemplate-1.3.1-cp313-cp313-macosx_10_12_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

neutraltemplate-1.3.1-cp312-cp312-win_amd64.whl (957.3 kB view details)

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

neutraltemplate-1.3.1-cp312-cp312-macosx_11_0_arm64.whl (966.2 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

neutraltemplate-1.3.1-cp312-cp312-macosx_10_12_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

neutraltemplate-1.3.1-cp311-cp311-win_amd64.whl (956.6 kB view details)

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

neutraltemplate-1.3.1-cp311-cp311-macosx_11_0_arm64.whl (968.3 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

neutraltemplate-1.3.1-cp311-cp311-macosx_10_12_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

neutraltemplate-1.3.1-cp310-cp310-win_amd64.whl (956.8 kB view details)

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

neutraltemplate-1.3.1-cp310-cp310-macosx_11_0_arm64.whl (968.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

neutraltemplate-1.3.1-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.1.tar.gz.

File metadata

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

File hashes

Hashes for neutraltemplate-1.3.1.tar.gz
Algorithm Hash digest
SHA256 b934052d9e198a1e095451fce283f27920cfc220471593aa6c3da635f933c58b
MD5 16f6d0c6388ee988fa7d8ab8774a4eae
BLAKE2b-256 be493b134a1025afa6905f52f713222f0a6d32855925e9b665984e34d13936e4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 569d3a398aaf9ee7de43e6b8c707e62eeaadd532a4b7fd9620fb6269ba3d7be2
MD5 60adf2f6e8e02a7c5130a4e9869b4f6c
BLAKE2b-256 383e86fda533f5175e5de2941dee3c2a0878eba9b66cad36be023afac822b0ce

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4e5d5d1ea84066d927f892cafda7832e72ca13bb9707a9de91d6bac857d98004
MD5 df0a0bae7431fc53b045c566186ccc43
BLAKE2b-256 f5ef64a3053abe89975b5e00de511cfc4aa7dabe46a7ce5126835fc830e93c31

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.1-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2832e2a1c286052b428a2b406c4036af1f71d5e7bc2b5c90cbec69e744a85ddd
MD5 8e24d62f34d64b636d8eafad8867f04e
BLAKE2b-256 4c8051af57e827d6a460cba42111988b87f0c8beabe62103b899db8c62fabaf5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 93769494eedc9098d37c87241b168d4189690730065b3f0b6223345455dd4cd0
MD5 8f296b258ed0e17ad36a219011f21e7b
BLAKE2b-256 84d4bc43a03c0a44d5764dff9ea1ac5cffa1d3a7094ee06fe408f5b1013c599e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.1-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 c3f20099acf5bff0ee6a2d01579e7684dcf39cf8f3185204779a5ec43e031b9a
MD5 cf42ff88609938fa4705d667f804a4e3
BLAKE2b-256 e3f08194453c0070ab18a4cc4025acc0ca6ba51db12715a3ce1470c45a0e29a4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 52de0300c35c279896801d3cb27125af9fddbdbb41293e2aa27d511f802323d8
MD5 244b41c4b96de2ae771cec3ab5d18c61
BLAKE2b-256 fcfb593717de619541549c46880e882f71da9b44896712e20c2983294b662382

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a4f14bec6c3aec64738ebaef91207f9c45e3eadfd299eda1da0c2786e132401f
MD5 eed29c63b00cc8a78c33095e1472cf8e
BLAKE2b-256 724af0dfbedf31100bd3236a144f80aa06afcd1f33db540be9ab5c647d8a5a51

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.1-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 d633ff48d2c27b37ad0c3decf8cdf5db5694e1b6750698a9968f1b65dc2e80f0
MD5 0e3b0b73fdd01e10fc8a6d37b5caa83b
BLAKE2b-256 483a98e5cf7f81d4764057fd76d2686c8848d814e0b6a18a0fe5aebcd5c29d77

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 db6c84ee9479365a65f97411319e29d1f5f05c686f32a097a0e2c0806e9c6fe4
MD5 4b0ba24044ff94f24e2030a9dd613db8
BLAKE2b-256 634b81677ce73a93f634dc59de426e1da046562cc4132996753a4e997ee1a9c6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.1-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 09147264c68bf4631242a1d66744b39bbca051c6575f2039cc8378a383b3319e
MD5 0049ba3e4f217420269e83db20d33202
BLAKE2b-256 bc134964ce1d1304bc3961813f8c31ff396613a47e3e31708f5cba8c48313b71

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f162bb1b35f23e496dd3c59e271dce99f385055511422b0e5264b3ca0f8e32ec
MD5 c3c47fd41e962ac1ce0a618e4f8b7cf6
BLAKE2b-256 b9315c307080f87ff1c20e0d14ef049b624ba9e7a9c9932b51ae542ed5017a1f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e15aa589dc8e4cd7c892fe9d368dbbafca382292884b2ddc00dd403b67753468
MD5 9ec851e0934c0449aa970e17a60ff1d9
BLAKE2b-256 5569dcb48e05b14893f72bfd9881d8b51ad772f527224e46cfe38142866eec43

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.1-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 ea8869cdd21e2118a018c3fc2b6e0d3c2d29d6e9b8d2ab75dccdddb4a173d4f7
MD5 b0ba2778ae0ae775e62282131a580d86
BLAKE2b-256 c7dbcf9af6dfd1bb05cb3629ae5fe20ad4196fdbc15386c8e4f0959f4eb5f311

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 7778e16001d25dad1daca2062804bd52f6d2d750b644eec7255c028de7a7c8e2
MD5 09bdb1e4943e4e9afc788700691f2a9e
BLAKE2b-256 a6eacb4ccf6df4aebd692bf2baf05589f6518397db7135fa7a0b6964fdcb93df

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.1-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 371a34b59e048c7f6ae84becd6b4bf3d9352d831e40e8191501e4c44409b1c51
MD5 3fa1ac40568b6362504bf7a606b46e69
BLAKE2b-256 e4f4a693ccd6c21ebb4019be42ed5e8a408ee0851363171cca9d075d2fee0d6f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6484d5a13afab2ccdf67eac03ad9a93fb1cb24d7629f10592a189a4118c3b2dc
MD5 4c789f3b35805c89b2fd51ac5a7e1ede
BLAKE2b-256 83db12077e3a23dd2ddf42554684789a439af524e2c6fe5dbe28b9040106dede

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 59364f5e9593f1ebbfe9e107236f98f88c9c1f655c62bd1b42e5e339c8a48d10
MD5 ca3a4674908cbed895e6a3883f955308
BLAKE2b-256 5c5d17bdfa080272101bb864f81cfb697a1d29a11183ddaa9c86e6db15464c7b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.1-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2d315c90f4f3330764068e5958a122e9499ddf7c6b7a2737a3bbe184c481855c
MD5 ec56a148bdb984692b2cb55a51e8c368
BLAKE2b-256 b23a5ec023f67e7ae7d5d5dc060b73c110b78c4364a528a5f7e7f381806c36da

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 bc53087f5858bc4ff577d54d8470c276b6ecfc5f9a2f34766241af981793e028
MD5 433c597fff0e947009006e22a70dd4c5
BLAKE2b-256 004f2fae0099788a652f7cab1546f5a995d00ef3f23d2f3a5716cd0c14a26bcf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.1-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 43f1b8c68ab450bc818c3eaa85727dede5a44d72740ad703ddcf59dc5d736f1f
MD5 32fd0371ac3b15f342f6eb187e1ff57a
BLAKE2b-256 0ef56b57557d7115e10604ee1b8286163f874ad0262ea25c2983b9ff3c8f92eb

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