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.4.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.4-py3-none-any.whl (15.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: diamondfire_py-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 a2e154e178547ad033106c341a5937e3e906cef4e8c9ed4ad9306d2bef553c2c
MD5 09f7092937886d243bea1da0a8d91e09
BLAKE2b-256 9698459d2e2b5d8fab229850800913f2c30e81837d83e9dcf48b81de1433f0e3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: DiamondFire.py-0.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 eb88745b4440206b2c4c40059a344c8e6e818c89a282a2a842bf0575cafabc80
MD5 6b630f2a19616b3cb1b401d925bf44b5
BLAKE2b-256 e28a35613eb174af4598fe823ba274f7b7d3a7a67c7bb09eb4101f81ded046c7

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