Contents

Standard Library

The Koji Standard Library provides a collection of built-in modules to help you handle common tasks. Click on a section to jump directly to its documentation.

Modules

  • time
    Delay execution and measure elapsed time.

  • file
    Read from, write to and remove files, and list and create directories.

  • path
    Join paths and get their parts: parent directory, name and extension.

  • datetime
    Get the current date and time, format and parse date strings.

  • math
    Perform basic mathematical operations and access constants like pi.

  • cli
    Read the options and arguments of a program of the command line, with its help.

  • task
    Run functions at the same time: groups of tasks, channels and shared values.

  • http
    Send HTTP requests such as GET, POST, PUT, and DELETE, and serve them.

  • hash
    Compute the SHA-256 and SHA-512 digests of texts.

  • json
    Parse JSON strings and convert data to JSON format.

  • regex
    Work with regular expressions to search, match, and replace patterns in strings.

  • system
    Read the command-line arguments and the environment, end the program with an exit code, run other programs, and know the operating system.

Edit this page on GitHub