Skip to main content

DiamondFire templating library in Python.

Project description

DiamondFire.py

DiamondFire templating library in Python

Installation

The package can be found on PYPI at DiamondFire.py. To install, open terminal and type in:

python3 -m pip --upgrade DiamondFire.py

This will install the package.

Quick Start

The package can be used under the namespace df. Here's an example program that generate code that counts to 10:

import df

index_variable = df.Variable(df.VariableScope.LINE, "index")

template = df.Template([
    df.CodeBlock(df.CodeBlockCategory.PLAYER_EVENT, "Join"),
    df.CodeBlock(df.CodeBlockCategory.REPEAT, "Multiple", [index_variable, 10]),
    df.Bracket(open=True, repeat=True),
        df.CodeBlock(df.CodeBlockCategory.PLAYER_ACTION, "SendMessage", [index_variable]),
    df.Bracket(open=False, repeat=True)
])

print(template.compress())
template.send_to_codeclient()

Features

  • Templates
  • Code Blocks
  • Brackets
  • CodeClient API

Documentation

I'm too lazy to figure out how to generate doc HTML so the docstring is shown by your IDE.

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

diamondfire_py-0.0.3.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

DiamondFire.py-0.0.3-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file diamondfire_py-0.0.3.tar.gz.

File metadata

  • Download URL: diamondfire_py-0.0.3.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/44.1.1 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.14

File hashes

Hashes for diamondfire_py-0.0.3.tar.gz
Algorithm Hash digest
SHA256 515fcbdc8e35814514cc55d18f3eda5de8bd60ce44f562788b7c1493f39deacb
MD5 f0487e1946dfe92bd3cb2f7af5219ba8
BLAKE2b-256 33443903a380711494ab2b5286500a7ac583e7ad12438694e22c4168593ff993

See more details on using hashes here.

File details

Details for the file DiamondFire.py-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: DiamondFire.py-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.8.3 requests/2.27.1 setuptools/44.1.1 requests-toolbelt/1.0.0 tqdm/4.64.1 CPython/2.7.14

File hashes

Hashes for DiamondFire.py-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 691fcc533dff27fadc7d89bde58b3c5c622e8b874451a6cf007c4194ab6d9b1e
MD5 4cb3e97206111ecc9c537ccb20d1b2eb
BLAKE2b-256 ef374cf6f6108c5a073caad47820a5f14f23a455c1f684410918afabeb1e114b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page