Skip to main content

The BitCCL scripting language compiler package

Project description

BitCCL


GitHub Workflow Status Codecov PyPI PyPI - Downloads


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 .bccl.

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


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.3.tar.gz (9.1 kB view hashes)

Uploaded Source

Built Distribution

bitccl-0.0.3-py3-none-any.whl (11.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page