-
Notifications
You must be signed in to change notification settings - Fork 0
Lib creation
TheAssassin edited this page Dec 10, 2020
·
14 revisions
First thing to know, your lib has to be coded in Python.
If you use any external Python library, tell me, make sure that the library will be installed by the user once he downloads the lib.
First, you need to create a Python file. This Python file follows the following conventions :
- It has to be a python file (extension
.py
) - The name has to be in lower case, without symbols or numbers except the underline character (
_
).
Your lib has a few elements to respect, in order for it to work. If you don't respect those rules, your lib won't work properly, or maybe won't work at all !
- You have to import everything from
recurrent_classes
, by doingfrom recurrent_classes import *
.- You need it for the ibs to work.
- It gives you access to a lot of functions :
-
error(line_number:int, error_type:str, message=None, *args)
- This function allows you to throw an error when something goes wrong, and this error will stop the program automatically.
-
line_number
can be accessed with the variableline_numbers
if you request it (see later) -
error_type
can be whatever you want, but I recommend a CamelCase name, easily recognizable. -
message
and*args
are the message you want to send to the user, with a clear explanation of the error. You can also not add this message, and in that case, it will simply say that Aerror_type
has been raised on lineline_number
.
-
First, join the ACPL official Discord server (link here).
Then, go in the channel #lib-submitting and do as following :
- Introduce yourself
- Present your lib
- Upload the lib file And wait for my answer !
In most of the cases, the lib will be accepted and will be downloadable by anyone.