Prism projects can be created using the prism init command. To create your first Prism project, navigate to your folder of choice and run the following:
$ prism init --project-name my_first_project
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Running with Prism v0.3.0...
Creating template project at ./my_first_project...
______
____ __ \_____(_)________ _______
_____ /_/ / ___/ / ___/ __ `__ \ ____
____ / ____/ / / (__ ) / / / / / _____
___/_/ /_/ /_/____/_/ /_/ /_/ ___
Welcome to Prism, the easiest way to create clean, modular data pipelines
using Python!
To get started, navigate to your newly created project "testsd" and try
running the following commands:
> python main.py
> prism run
> prism graph
Consult the documentation here for more information on how to get started.
docs.runprism.com
Happy building!
Done!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
$
Again, the CLI section gives a much more comprehensive overview of how to use the command line to manipulate projects. But, if you're itching to get started and you want to execute this project right away, then navigate to that directory and use prism run:
$ cd my_first_project
$ prism run
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
[HH:MM:SS] INFO | Running with Prism v0.3.0...
[HH:MM:SS] INFO | Creating run magnetic-pony-BBDYfwdDzH for client my_first_project-1.0...
[HH:MM:SS] INFO | Found 2 task(s) in 2 module(s) in job magnetic-pony-BBDYfwdDzH...
[HH:MM:SS] INFO | Parsing task dependencies............................................... [RUN]
[HH:MM:SS] INFO | FINISHED parsing task dependencies...................................... [DONE in 0.01s]
────────────────────────────────────────────── Tasks ──────────────────────────────────────────────
[HH:MM:SS] INFO | 1 of 2 RUNNING TASK example-decorated-task.............................. [RUN]
[HH:MM:SS] INFO | 1 of 2 FINISHED TASK example-decorated-task............................. [DONE in 0.02s]
[HH:MM:SS] INFO | 2 of 2 RUNNING TASK example-class-task.................................. [RUN]
[HH:MM:SS] INFO | 2 of 2 FINISHED TASK example-class-task................................. [DONE in 0.02s]
Done!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🎉 Congratulations! You just ran your first Prism project!
The project itself doesn't do much. It only has one task, and this task simply creates a .txt file in the output folder containing the string Hello, World!.
Here's what the Prism graph looks like:
In the next section, we'll add some complexity and learn about tasks and targets.