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": {
        "snippets": {},
        "declare": {},
        "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

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.0b2.post2.tar.gz (172.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.0b2.post2-cp313-cp313-win_amd64.whl (950.9 kB view details)

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13manylinux: glibc 2.28+ ARM64

neutraltemplate-1.3.0b2.post2-cp313-cp313-macosx_11_0_arm64.whl (963.3 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

neutraltemplate-1.3.0b2.post2-cp313-cp313-macosx_10_12_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

neutraltemplate-1.3.0b2.post2-cp312-cp312-win_amd64.whl (951.3 kB view details)

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12manylinux: glibc 2.28+ ARM64

neutraltemplate-1.3.0b2.post2-cp312-cp312-macosx_11_0_arm64.whl (963.4 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

neutraltemplate-1.3.0b2.post2-cp312-cp312-macosx_10_12_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

neutraltemplate-1.3.0b2.post2-cp311-cp311-win_amd64.whl (950.7 kB view details)

Uploaded CPython 3.11Windows x86-64

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

Uploaded CPython 3.11manylinux: glibc 2.28+ ARM64

neutraltemplate-1.3.0b2.post2-cp311-cp311-macosx_11_0_arm64.whl (964.6 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

neutraltemplate-1.3.0b2.post2-cp311-cp311-macosx_10_12_x86_64.whl (1.0 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

neutraltemplate-1.3.0b2.post2-cp310-cp310-win_amd64.whl (950.9 kB view details)

Uploaded CPython 3.10Windows x86-64

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

Uploaded CPython 3.10manylinux: glibc 2.28+ ARM64

neutraltemplate-1.3.0b2.post2-cp310-cp310-macosx_11_0_arm64.whl (964.9 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

neutraltemplate-1.3.0b2.post2-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.0b2.post2.tar.gz.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b2.post2.tar.gz
Algorithm Hash digest
SHA256 f075c395631f001bd7351bba5bcb75d6b318a7a30ac7e57a9e24e0da8fca2788
MD5 5b21f2532b03aa91d5f97b8cc252fc27
BLAKE2b-256 c1132df743258a55b524cbcb0f0781b6e3366da0f59a9e05fda1ede6a31ee93c

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b2.post2-cp313-cp313-win_amd64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b2.post2-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 494ffeca97805306fc362f7f429867ad3cd7ccc3418d6dc7115e297c3fcdce8c
MD5 e3367f753b103df51625f2ec3be0d18a
BLAKE2b-256 4e05bacc9a06e6a1732b72e3819b618be364eb8073f93528bed5c8cbb2527fac

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b2.post2-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b2.post2-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 28a7875cb3db9407471f34a629adeff279c473961468460028271bb0b5ad50ab
MD5 ae6d6871e5ca7db5071da9fff37659b3
BLAKE2b-256 2e99e02115024dd601b78f5f009d3b6f0e220cb206d4e2ee1aa32f08bb7f84bb

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b2.post2-cp313-cp313-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b2.post2-cp313-cp313-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 b9be6cfcd4387a57334a3e3932910d5883136539e7740efb60c4508fb69fe387
MD5 7f80268315f6d886b468422876463dfa
BLAKE2b-256 e1917b39c489cb975e19c646b5875604e84a545dc13f0cf98e315deef67befc3

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b2.post2-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b2.post2-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 674cbe48d50d8119c674efc64f6924170764bf54a5d234fb64b946e9220cbea7
MD5 fb6241b90dada5448ac8013415e78021
BLAKE2b-256 0cc560cdcb830b3eda87d3d5d8b12e2c23410dc34232d9ac35e9eff6a80c8827

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b2.post2-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b2.post2-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 5e112ad30a9ec56f756c5d9538ade8d3e07b9401ae3920c795498bcdc8d4af89
MD5 f7f765467377558c56ec30c964a27dd0
BLAKE2b-256 64fcf3ae0805711989da817276796b0e5a428c4d73ee58fec3bbd30028da738c

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b2.post2-cp312-cp312-win_amd64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b2.post2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 afe34dd0aa67f2c2931a4062a8c6b69a5aab2bbfe6a1d8086685dfc6d4b4ac43
MD5 417e023eab29ed27d94591d3f939f848
BLAKE2b-256 068696269d4a2305a8aa0602f28cbe0619165e9c932b544fb08e509072fdcb1a

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b2.post2-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b2.post2-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 581e604038c75e8b27c3cacb1f5f8e0968cfe6ce03b5c195cf4155beda80c478
MD5 08afad1268aac777033d6806e1a1f4af
BLAKE2b-256 31c9cf04441c580dce6a8f269d7a52075ee84dfed007708fc36a93a7b9468d93

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b2.post2-cp312-cp312-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b2.post2-cp312-cp312-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 3c9372ae3a1f79b1537741bbc39957e430eba871894e20fddcf5d0b348918854
MD5 da51f04bbe4b227175afd8131dcaec41
BLAKE2b-256 26bd877a253e765a7c990139e41988dbcab5197c4282aba0361851a85a683bc6

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b2.post2-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b2.post2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 74587d59946078f944e8c54c12c218e5e2d53e8f496fcb9b64763d928204f67b
MD5 8ac09c3831d4e6cdef61f24f2864820b
BLAKE2b-256 02c06b63719d50ab3afd68edaaeff971a77e409cc93c82f6ba1512cfcb3f1930

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b2.post2-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b2.post2-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 576d06c782b5be270664b7a4f95837d837c4b40939ecdf0a7b984071cf26d56d
MD5 fdf065980bc7f3a3840325fd95891a85
BLAKE2b-256 0eede24ff02e5d922fa7c76206a4cbc6ebcd1e7907a41a7a8cc32a0f406c89f9

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b2.post2-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b2.post2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 ef153386f4a9ebf39148caa2633aa7359e27e062b30c41546d299ac093e77bf0
MD5 b6d056f8527ad3f5b1a87eb16bec63be
BLAKE2b-256 4a50e8433f4eada4fdfcd4ad9c0999058ad178bc89d9afc86f9e6c5ceb8c06af

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b2.post2-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b2.post2-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e9fce92399df4e5c7ee77860ed923e91521925a09f50a63c37e1979d55aeda16
MD5 d82f9dbd47ccc390601712e496d36184
BLAKE2b-256 4ca16d8b8da02c553c503a2b07b6f48a055eb4a0f3f80ea1be1a32df2929b513

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b2.post2-cp311-cp311-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b2.post2-cp311-cp311-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 36dc8475b04b6269a00e13838181bff4575c7ba1a42103ff43ee4f8a2f16808e
MD5 93a7688e1e72a6d8d8eefdf8d4654048
BLAKE2b-256 f5d17165ad973b8bd824c76b73dda66e13ba3343219e88b179aa54092ba6945f

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b2.post2-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b2.post2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 193a4ecdd45296c77fb09df3ca97721bbcb73f72842f09430f8c25d6f1b5132e
MD5 d433a34ab00c0a1439ea28afdcdc001d
BLAKE2b-256 ad610eb6ad229c882b1f0fcabb4ac0e9f242915a3262dc8ea3582f21bb8fa321

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b2.post2-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b2.post2-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 034f29a6e4d1cc2d1be32ccf12985713e64af0028cd53b84a0b555728938e046
MD5 ec06c84a4c250269a5dda2f6cb959989
BLAKE2b-256 a427eadc0849b63ebd3e22e67af3922be2265b7bc573b65593cad0744eb02326

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b2.post2-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b2.post2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 183a149cec67b6f8476beab1a725e23ab6857dbd28b7d78acd54d12ef76c08ce
MD5 ae1f0225686b4b261b551c5cb16c6ae5
BLAKE2b-256 caea652887aba95645cd59541d7b5ca1e6aa963b29f473ee244221f9b3176c8d

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b2.post2-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b2.post2-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 61d625286f28e655616167a9422c665ea460e509fb154d5b87c2564c14767bac
MD5 f0d47d8ee333a7d8b354b36ae755d4bd
BLAKE2b-256 c08316786953dccae98abcf6a3ef0c76039c2d9e4773d8e6c789c072e4ae9b3c

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b2.post2-cp310-cp310-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b2.post2-cp310-cp310-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 e0ca7b3f15737cebe9d654788b087db5e447a5fa3807e7728701ba4259202352
MD5 3752c751ea257d4bd373ac8569117223
BLAKE2b-256 042a4399d1479056fcd861054353620018fe1c51bf69b4920c15de9bf55dfbbd

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b2.post2-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b2.post2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 c2149af16430f58577f743be026824e55275293bddfcddce0889971f8e9731c1
MD5 472409e9dd6d0ea8e10654c98051499d
BLAKE2b-256 ff6c9ea77c120b1e9ad0707e337e95aa259babf712cb65dfc708bc22a30b5de0

See more details on using hashes here.

File details

Details for the file neutraltemplate-1.3.0b2.post2-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for neutraltemplate-1.3.0b2.post2-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 d4d11d66bd410bf998745fe2de206d63b9a0b30c6311ad5cf9011e17f3438dfd
MD5 2583488ad3ea5839e6b292ae51e4a6dd
BLAKE2b-256 355d3ff854b6b4f09282d6b08db0d2555e7432f8dbd5172f471f0ad7e249bddb

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