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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb0e40363fa04827f74c8a59401ea1d85f38c6ac0051bc34f13122125047be06
|
|
| MD5 |
dbb5f07b7af41f92deed963ab4f4ca47
|
|
| BLAKE2b-256 |
79a0a1ace60991edd708ea9447522ae8c7c0cb2b3977b3e4ae9daf453869a129
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
faf281c831377e85450a1db382dd08cecf98a3526749a101fbf8d4b0a44784f5
|
|
| MD5 |
dd798d6e2cb5579fc11be979ce105af8
|
|
| BLAKE2b-256 |
78165d4267402f547f46a60997178191e7e6292b23abcec7bc9b1a42bf532f44
|