Skip to main content

Diamond.PY (python addon)

Diamond is a work-in-progress programming language add-on/mod made with (and for) Python3. It changes some of the syntax of Python and adds more bulitins and fun features. Here's the basics about it:

display()

a renamed print() function

prompt()

a renamed input() function

stop()

a renamed exit() function

dialog() [NEW]

like in games and stuffs, you can display text in a dialog-like way (delayed/slowly printed for character by character) using the dialog function

dialog("Hello, World!")

nor() [NEW]

the nor gate (negated or) gives an output of 1, if both inputs are 0, it gives 1 otherwise

nor(a, b)

getObjectByENV [NEW]

you can set a environment variable (sneaky sneaky!) with this new little thingy. basically equal to os.getenv.

the function syntax

starting simple enough, every function you make, add this little decorator:

@function('')

be sure to note that you can add a custom name to it

then continue on the next line and add the def statement for your function like you would do normally

a basic function may look like this:

@function('myfunction')
def something():
  display("hello world!")

display colors

there is a special color system in diamond called dcolors, which stands for diamond colors or display colors.

here is the list of them thus far:

HEADER
OKBLUE
OKCYAN
OKGREEN
WARNING
FAIL
ENDC
BOLD
UNDERLINE

to use them, add one of your choice in the start of a f""/f'' string like so:

lets use the HEADER color, which is like a purple color, as an example

display(f"{dcolors.HEADER}Hello World!{dcolors.ENDC}")

be sure to add {dcolors.ENDC} at the end, otherwise you may encounter an error or unwanted results

logic.[enter logic var here]...

an optional way of using the local logic variables (display, prompt, stop, dime/true, nodime/false) is adding logic. at the start of them. here's an example:

logic.display("Hello, World!")
# This will print out 'Hello, World'!

not sure why i added this but lets just go with it lol

final note

some features will be secret, find them out for yourself ;)

thanks!

this was made by ethan b :) (founder of a epic website)

bugs? errors?

there's a reason this is a really small version of the project, of course at the moment, we'll sadly have bugs in the code. later, we will try to fix any funky stuff. sorry about that. :/

Metadata

Release files for diamondpy 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for diamondpy 0.0.2
File Size Uploaded Provenance Actions
diamondpy-0.0.2.tar.gz 2.6 kB Without provenance Details for diamondpy-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for diamondpy 0.0.2
File Interpreter ABI Platform Actions
diamondpy-0.0.2-py3-none-any.whl Python 3 none any Details for diamondpy-0.0.2-py3-none-any.whl

Total release size: 8.2 kB

Release files / diamondpy-0.0.2.tar.gz

Download URL diamondpy-0.0.2.tar.gz
Size 2.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c9c18869c068647980e1c07872a36f7ae9e699b20bc70554fd2c48eea3b16a47
BLAKE2b-256 checksum
How to use checksums
0ee27896884d7cecde3110ab1ab46d0b5b0c3fe837fd61d048bb539dbd7b62c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/3.10.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.12

Release files / diamondpy-0.0.2-py3-none-any.whl

Download URL diamondpy-0.0.2-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c61ef5c39230ca6d06a0dee18c616a20d9102de86d3168ba85f8f070fc864a58
BLAKE2b-256 checksum
How to use checksums
ece830f304cab94f1630d514a54c417c780aafe362b8e28f09757695f6821e36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.1 importlib_metadata/3.10.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.12

Security for diamondpy 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page