The BitCCL scripting language compiler package
Project description
BitCCL is a BitcartCC scripting language used for automating checkout flow and more.
It is currently in alpha stage, being separated from the main BitcartCC repository.
Architechture
BitCCL is basically Python, but:
- Safe, with disabled import system
- Robust, with many built-in functions
- Optimized for running in BitcartCC environment
Language file extension is .bitccl
.
Running
pip install -r requirements.txt
./compiler example.bitccl
Built-in functions
Current built-in functions list can be always seen in functions.py
file.
Table of built-in functions:
Signature | Description | Return value | Imports allowed |
---|---|---|---|
add_event_listener(event, func) |
Adds event listener func to be called when event is dispatched |
None | :x: |
@on(event) |
A decorator used for registering functions to be called when event is dispatched. Example: @on(ProductBought(1)) def func(): pass |
Wrapper function | :x: |
dispatch_event(event, *args, **kwargs) |
Dispatch event , optionally passing positional or named arguments to event handlers |
None | :x: |
template(name, data={}) |
Render template name , optionally passing data to it |
Template text on success, empty string("") otherwise | :heavy_check_mark: |
send_email(to, subject, text) |
Sends email to email address to , with subject and text . Uses email server configuration from config.json |
True on success, False otherwise | :heavy_check_mark: |
password(length=SECURE_PASSWORD_LENGTH) |
Generate cryptographically unique password of length if provided, otherwise uses safe enough length. |
Generated password | :x: |
Built-in events
In progress of adding
Contributing
You can contribute to BitCCL language by suggesting new built-in functions and events to be added, as well as any ideas for improving it. Open an issue to suggest new features
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
bitccl-0.0.1.tar.gz
(6.2 kB
view hashes)
Built Distribution
bitccl-0.0.1-py3-none-any.whl
(8.4 kB
view hashes)