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.5.tar.gz (12.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

DiamondFire.py-0.0.5-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: diamondfire_py-0.0.5.tar.gz
  • Upload date:
  • Size: 12.8 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.5.tar.gz
Algorithm Hash digest
SHA256 cb0e40363fa04827f74c8a59401ea1d85f38c6ac0051bc34f13122125047be06
MD5 dbb5f07b7af41f92deed963ab4f4ca47
BLAKE2b-256 79a0a1ace60991edd708ea9447522ae8c7c0cb2b3977b3e4ae9daf453869a129

See more details on using hashes here.

File details

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

File metadata

  • Download URL: DiamondFire.py-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 15.8 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 faf281c831377e85450a1db382dd08cecf98a3526749a101fbf8d4b0a44784f5
MD5 dd798d6e2cb5579fc11be979ce105af8
BLAKE2b-256 78165d4267402f547f46a60997178191e7e6292b23abcec7bc9b1a42bf532f44

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