Skip to content

Commit f713b1e

Browse files
authored
Added 2 more python examples (#1800)
* Added python image processing and updated docs.json * Edits to crawl4ai * Updated commands * Added pdf form extractor
1 parent ec1cec5 commit f713b1e

File tree

4 files changed

+761
-10
lines changed

4 files changed

+761
-10
lines changed

docs/docs.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,15 +299,22 @@
299299
}
300300
]
301301
},
302+
{
303+
"group": "Python guides",
304+
"pages": [
305+
"guides/python/python-image-processing",
306+
"guides/python/python-crawl4ai",
307+
"guides/python/python-pdf-form-extractor"
308+
]
309+
},
302310
{
303311
"group": "Example projects",
304312
"pages": [
305313
"guides/example-projects/batch-llm-evaluator",
306314
"guides/example-projects/claude-thinking-chatbot",
307315
"guides/example-projects/realtime-fal-ai",
308316
"guides/example-projects/realtime-csv-importer",
309-
"guides/example-projects/vercel-ai-sdk-image-generator",
310-
"guides/python/python-crawl4ai"
317+
"guides/example-projects/vercel-ai-sdk-image-generator"
311318
]
312319
},
313320
{

docs/guides/python/python-crawl4ai.mdx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ description: "Learn how to use Python, Crawl4AI and Playwright to create a headl
77
import ScrapingWarning from "/snippets/web-scraping-warning.mdx";
88
import PythonLearnMore from "/snippets/python-learn-more.mdx";
99

10+
## Overview
11+
12+
This demo showcases how to use Trigger.dev with Python to build a web crawler that uses a headless browser to navigate websites and extract content.
13+
1014
## Prerequisites
1115

1216
- A project with [Trigger.dev initialized](/quick-start)
1317
- [Python](https://www.python.org/) installed on your local machine
1418

15-
## Overview
16-
17-
This demo showcases how to use Trigger.dev with Python to build a web crawler that uses a headless browser to navigate websites and extract content.
18-
1919
## Features
2020

2121
- [Trigger.dev](https://trigger.dev) for background task orchestration
@@ -113,7 +113,10 @@ export function installPlaywrightChromium(): BuildExtension {
113113
}
114114
```
115115

116-
Learn more about the [trigger.config.ts](/config/config-file) file including setting default retry settings, customizing the build environment, and more.
116+
<Info>
117+
Learn more about executing scripts in your Trigger.dev project using our Python build extension
118+
[here](/config/extensions/pythonExtension).
119+
</Info>
117120

118121
### Task code
119122

@@ -212,14 +215,14 @@ if __name__ == "__main__":
212215
1. Create a virtual environment `python -m venv venv`
213216
2. Activate the virtual environment, depending on your OS: On Mac/Linux: `source venv/bin/activate`, on Windows: `venv\Scripts\activate`
214217
3. Install the Python dependencies `pip install -r requirements.txt`
215-
4. If you haven't already, copy your project ref from your [Trigger.dev dashboard](https://cloud.trigger.dev) and and add it to the `trigger.config.ts` file.
216-
5. Run the Trigger.dev dev CLI command with with `npx trigger dev@latest dev` (it may ask you to authorize the CLI if you haven't already).
218+
4. If you haven't already, copy your project ref from your [Trigger.dev dashboard](https://cloud.trigger.dev) and add it to the `trigger.config.ts` file.
219+
5. Run the Trigger.dev CLI `dev` command (it may ask you to authorize the CLI if you haven't already).
217220
6. Test the task in the dashboard, using a URL of your choice.
218221

219222
<ScrapingWarning />
220223

221224
## Deploying your task
222225

223-
Deploy the task to production using the CLI command `npx trigger.dev@latest deploy`
226+
Deploy the task to production using the Trigger.dev CLI `deploy` command.
224227

225228
<PythonLearnMore />

0 commit comments

Comments
 (0)