Skip to content

py api docs

Ccode-lang edited this page Aug 31, 2021 · 5 revisions

This is the Python API docs

The docs are made to make file operations easier. Currently, the api is not developed enough to make many docs.

drumver()

The drumver function is used to get the drum API version installed on the system.

import api
print(api.drumver())

Output (may vary):

drum bash py api 0.0.1

file.create()

The createfile() function is used to create files in the current directory.
It returns an integer error code.

error = api.file.create("test")
print(str(error))

Output:

0

file.check()

The filecheck() function is used to see if a file exists. It returns a bool value.

exists = api.file.check("test")
if exists:
    print("file test exists")
else:
    print("file test does not exist")

Output if it exists:

file test exists

Output if it does not exist:

file test does not exist
Clone this wiki locally