Projects & Modules

How to organise your scripts

Let's imagine you create a few scripts. A natural problem that will emerge is "I have loads of scripts and I can't find them". Or if like some of us, you have hundreds of files on your desktop, you won't be able to find anything.

We encountered this problem early, and so we invented the ability to specify script name, module name and project name.

Basically, projects are a bunch of modules where scripts live.

Code example

Let's say we want to build a synthetic audio podcast for the "Daily Arrow" that has a finance website and a general news website.

The script for this would look like below.

script = audiostack.Content.Script.create(
  scriptText=text, 
  scriptName="news",
  projectName="daily parrot",
  moduleName="finance"
)

To retrieve all the scripts with projectName of "daily parrot", just call the list endpoint with projectName param:

scripts = audiostack.Content.Script.list(projectName="daily parrot")
for s in scripts:
  print(s)