Skip to content

Making your own Sam.py scripts

Sam edited this page Mar 29, 2025 · 1 revision

If you want to contribute and add your own scripts to Sampyhub, there are some basic rules you must follow.

  1. No malicious code
  2. No obfuscated code
  3. Test it before submitting - if we encounter lots of errors, we'll simply deny it!
  4. Read the integration guidelines ⬇️

Integration Guidelines

Every Sam.py scripts must have these three functions:

  1. Search
  2. Clear
  3. End

Format it like this:

search(name,author) # Use strings! It's also good to remember that this will pause your code until (and if) the user agrees to run it. DO NOT put code before this!
clear() # Clears screen - looks better in an OS command prompt/terminal but still does its job

# Your code here (please add the newline above so it's easier to read!)

end() # If your code has multiple endings, just add end() each time you want to stop the script.

We will not fix your code for you, and we will not accept any code that does not follow these guidelines. When making your script, you can leave these functions out until you submit, as you'll just get NameErrors.

Clone this wiki locally