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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

neutraltemplate-1.3.0b5.post1-cp313-cp313-macosx_11_0_arm64.whl (965.5 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

neutraltemplate-1.3.0b5.post1-cp312-cp312-macosx_11_0_arm64.whl (965.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

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

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.11macOS 11.0+ ARM64

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

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

neutraltemplate-1.3.0b5.post1-cp310-cp310-macosx_11_0_arm64.whl (968.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b5.post1.tar.gz
Algorithm Hash digest
SHA256 96e0e055b56c7db08525924b06652a9da6972ad216b8e95fa79eb4795d637f33
MD5 5be94a875b5070adba49db471b085de8
BLAKE2b-256 117f0d624462385953028b15e70e0755f3f040484fe7c0575288743223c77104

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b5.post1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 a9c6f99f2a11d371d23d591d93bcf1642cf4fa3a7516d00d7aac5e6e9e523223
MD5 e1515ff382710744feed7b24522ddcb3
BLAKE2b-256 f7b761f9e3c999c2bf34f49612d1da493e3e53a924bd91909b22909b144b10ee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b5.post1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0298140099c6948e40f0c100a338dadf74e87698f635b32f4ac82fdf725a831f
MD5 b6bb8f8c389eafdc6d65856b0adfe2ac
BLAKE2b-256 3c66a3a3d940be7d3d1a78f367cdd9afa66d16524be2349b4d1918c02152a8d7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b5.post1-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 d751e0268ebcde469b6a388781c13daf74c7bea9d01786cb499c468a4e044c77
MD5 25221acea725e11a0d8f1e8cb3a2696b
BLAKE2b-256 8f9e164408c68e73857be1b6441f295e6ad7e2bbbadfeb30f4e66b4cb7c015f0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b5.post1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 92962f829b895b88b40f88a5550ddb3e396acd9c236ec65d9c81c0dde27d840c
MD5 a8d028e61d1c612eec216f3edf053649
BLAKE2b-256 c2d1d5d0b2b8c21da3d5beedfa35489e2bc46f58659f6adf766fa6b678772e62

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b5.post1-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 1047d3b4198eeb7395ea66eb2bb3c9c18285dc2970bbb842fa90ddefe7edf620
MD5 229100be9e086c57780390206905c794
BLAKE2b-256 0b62de516a60acefc6ac3dc060e87cee438f0f3dfac34567ce42aa7cfd5ac43c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b5.post1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 683545088fd9f679e3ed9adcd445cc6e91acd1a6beb2b1b76db17fa442eb2ae9
MD5 21c5d2807c3545a1e578f6acb7b9aec3
BLAKE2b-256 45fca2a90ee78bc7b75fb106d872ab6ad6686b6b869932a3298f4c56cc574918

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b5.post1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a26b09682dc1f2447142bdc5b0d63dae0b04519dfe714ffa03a5b9e9570c41a3
MD5 85904791939a7b5d334d5952bd5ff417
BLAKE2b-256 c954723f3df6d7215d378c59798ac4ba3191e2efa5ad7daa1a59fa96867c78dc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b5.post1-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 f930d79182bc3d0066484dabb4b5bd19805abccde37cd5162d3031608511fe6a
MD5 1b81cd8f3c1ee16157eebf8857d6ae68
BLAKE2b-256 83fc0ff5624ec922f4a45ad8c7f92247d9606dc1fda28092b9db596c8bab0118

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b5.post1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 24bb35df67f7cc0e77cf1efb1656f14fe4fb4dcd72b816f63677d1dc760c08ae
MD5 c76d4a5822e794540c5f558f911fb873
BLAKE2b-256 9afcd4c89bf642471e8faf631bf18a65a3889af45a21c46abce2d637be005e24

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b5.post1-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 2b9c4a6a42d0145d95ad394198023fd0aac032047e3b729105b91f72685f2e25
MD5 02b31582c0809b8f6de36aa68c5185a0
BLAKE2b-256 ef4f1e3fef0462e17d4d80d673e927798760548c70a134d4a4554a73ecb3d120

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b5.post1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8b5223f5ef85f793aaa76ea1238adae4316be2658d5478c03dc9f778e41ef3ab
MD5 bd4d0b507618f060c13a2bf354368e78
BLAKE2b-256 4cacc360e6fecba1bf9589906e9a54dc04e54e80a5e6d76fd641a1211be7b0b5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b5.post1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b2c27631c729dbf5f721653fc7e418207204b36edd79b3a7d10ce82969071f41
MD5 0cc995ac9bb93360244df51ed827209f
BLAKE2b-256 c87ec81314e98a4790747e25cc69ce4795dbed3b4e791f1d08527f8e571d1ba6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b5.post1-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 417fa2606e6b8fe5fcdcbd800939220626e161feb6e5681edc7dc14378a64bd0
MD5 e67a4a517c6343634c7a345a33a7374e
BLAKE2b-256 4f2451e1138630dc1f74357e7627ecf64187925a381fadc1ccf9f512c915c223

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b5.post1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 ce12dbb41b514b28cfb6dbce30f7fade8604071688130fe0c237d0793355c2d3
MD5 3809d31e147e35cfc3d4a498bc49be61
BLAKE2b-256 7541b0896bc552ca00c75f3a17244bb4d981062cd27da43c20c385d44fce1f30

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b5.post1-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 e4b649e2d0ead5a099189a6496562b8792fd0c11eb4786104b8815dbb48eae39
MD5 c0ad71bb9001dbde720327ce27547a2c
BLAKE2b-256 363712d82cc2d990c11ce0dd50d91d34c9ae9b19b53f5d6f294e47dd82942b9a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b5.post1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 6d8ab7351b5b8008e3a67650d52defa5961b54ed81050adfd00b391ad4147ce1
MD5 a6dc43fbc50896e3f14d0a9e8773ad39
BLAKE2b-256 de75d7a3a9662b7bbb2013084f90b00c5f66331630c871a90007c04f3a1d8703

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b5.post1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3b60eda954f43433572682a29324bd10631d3ae04e0d0699c71a5f54dcb8f53a
MD5 a5ab4b0250d2da6e539254e1656ce46d
BLAKE2b-256 8e7ebe4edaf9dfebf6f85f0100c110c4cd55c6cdae0227c37c5fa5b88948ad8a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b5.post1-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 8cc1b8b92f21fe7651c8ffd7c01eed58d394b534072689ee2c3cf13b7b6e88f4
MD5 802ed24595513ebcf232b1f0be4323eb
BLAKE2b-256 2ed9cadd3475f74a6d6101777dfb9016b98a3d1b407ab0cb355ca035f4dd4adc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b5.post1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d34606ca5a62380be60ae0ca955f4554ca5bf7770276304bc8b6bb00bce01787
MD5 53003478868224c139d0873245e03a54
BLAKE2b-256 b53d5b1ab358a337a315834a489bf547e6d8f553c66d4eefa4691007dae23d2a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b5.post1-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 9f0a8e52e7b74cd43b2111b551afe32d9b87ec0d07a7ef129a54b5f325c2c466
MD5 9270a6d18131f383a1cc67eac57a5f81
BLAKE2b-256 988a15d36db90e6551122ce8998ca74ac0f1336c26da660689351256889e2d30

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