Skip to content

Commit aaf5b50

Browse files
committed
further changes
fix capitalization of Actor changes to formatting streamlining prose
1 parent 4737621 commit aaf5b50

File tree

1 file changed

+28
-52
lines changed

1 file changed

+28
-52
lines changed

docs/01_overview/overview.mdx

Lines changed: 28 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -22,54 +22,38 @@ async def main():
2222
await Actor.push_data({ 'url': input['url'], 'title': soup.title.string })
2323
```
2424

25-
## What are Actors
26-
27-
Actors are serverless cloud programs that can do almost anything a human can do in a web browser.
28-
They can do anything from small tasks such as filling in forms or unsubscribing from online services,
29-
all the way up to scraping and processing vast numbers of web pages.
30-
31-
Actors can be run either locally, or on the [Apify platform](https://docs.apify.com/platform/),
32-
where you can run them at scale, monitor them, schedule them, and even publish and monetize them.
33-
34-
If you're new to Apify, learn [what is Apify](https://docs.apify.com/platform/about) in the Apify platform documentation.
35-
3625
## Requirements
3726

38-
The Apify SDK requires Python version 3.8 or above to run Python actors locally.
27+
The Apify SDK requires Python version 3.8 or above to run Python Actors locally.
3928

4029
## Installation
4130

42-
When you create an Actor using the Apify CLI, the Apify SDK for Python is installed for you automatically.
43-
If you want to install it separately, you can install it from its [PyPI listing](https://github.com/apify/apify-sdk-python):
31+
The Apify Python SDK is available as [`apify`](https://pypi.org/project/apify/) package on PyPi. To install it, run:
4432

4533
```bash
4634
pip install apify
4735
```
4836

37+
When you create an Actor using the Apify CLI, the Apify SDK for Python is installed for you automatically.
38+
4939
If you are not developing Apify Actors and you just need to access the Apify API from Python,
5040
consider using the [Apify API client for Python](https://docs.apify.com/api/client/python) directly.
5141

5242
## Quick start
5343

5444
### Creating Actors
5545

56-
To create and run Actors through Apify Console,
57-
see the [Console documentation](https://docs.apify.com/academy/getting-started/creating-actors#choose-your-template).
46+
To create and run Actors through Apify Console, refer to the [Console documentation](https://docs.apify.com/academy/getting-started/creating-actors#choose-your-template).
5847

59-
To create a new Apify Actor on your computer, you can use the [Apify CLI](https://docs.apify.com/cli),
60-
and select one of the [Python Actor templates](https://apify.com/templates?category=python).
48+
To create a new Apify Actor on your computer, you can use the [Apify CLI](https://docs.apify.com/cli), and select one of the [Python Actor templates](https://apify.com/templates?category=python).
6149

62-
For example, to create an Actor from the "[beta] Python SDK" template,
63-
you can use the [`apify create` command](https://docs.apify.com/cli/docs/reference#apify-create-actorname).
50+
For example, to create an Actor from the "[beta] Python SDK" template, you can use the [`apify create` command](https://docs.apify.com/cli/docs/reference#apify-create-actorname).
6451

6552
```bash
6653
apify create my-first-actor --template python-start
6754
```
6855

69-
This will create a new folder called `my-first-actor`,
70-
download and extract the "Getting started with Python" Actor template there,
71-
create a virtual environment in `my-first-actor/.venv`,
72-
and install the Actor dependencies in it.
56+
This will create a new folder called `my-first-actor`, download and extract the "Getting started with Python" Actor template there, create a virtual environment in `my-first-actor/.venv`, and install the Actor dependencies in it.
7357

7458
### Running the Actor
7559

@@ -80,27 +64,22 @@ cd my-first-actor
8064
apify run
8165
```
8266

83-
This will activate the virtual environment in `.venv` (if no other virtual environment is activated yet),
84-
then start the Actor, passing the right environment variables for local running,
85-
and configure it to use local storages from the `storage` folder.
67+
This will activate the virtual environment in `.venv` (if no other virtual environment is activated yet), then start the Actor, passing the right environment variables for local running, and configure it to use local storages from the `storage` folder.
8668

8769
The Actor input, for example, will be in `storage/key_value_stores/default/INPUT.json`.
8870

8971
## Actor structure
9072

9173
All Python Actor templates follow the same structure.
9274

93-
The `.actor` directory contains the [Actor configuration](https://docs.apify.com/platform/actors/development/actor-config),
94-
such as the Actor's definition and input schema, and the Dockerfile necessary to run the Actor on the Apify platform.
75+
The `.actor` directory contains the [Actor configuration](https://docs.apify.com/platform/actors/development/actor-config), such as the Actor's definition and input schema, and the Dockerfile necessary to run the Actor on the Apify platform.
9576

96-
The Actor's runtime dependencies are specified in the `requirements.txt` file,
97-
which follows the [standard requirements file format](https://pip.pypa.io/en/stable/reference/requirements-file-format/).
77+
The Actor's runtime dependencies are specified in the `requirements.txt` file, which follows the [standard requirements file format](https://pip.pypa.io/en/stable/reference/requirements-file-format/).
9878

9979
The Actor's source code is in the `src` folder. This folder contains two important files:
100-
`main.py`, which contains the main function of the Actor,
101-
and `__main__.py`, which is the entrypoint of the Actor package,
102-
setting up the Actor [logger](../concepts/logging)
103-
and executing the Actor's main function via [`asyncio.run()`](https://docs.python.org/3/library/asyncio-runner.html#asyncio.run).
80+
81+
- `main.py` - which contains the main function of the Actor
82+
- `__main__.py` - which is the entrypoint of the Actor package setting up the Actor [logger](../concepts/logging) and executing the Actor's main function via [`asyncio.run()`](https://docs.python.org/3/library/asyncio-runner.html#asyncio.run).
10483

10584
<Tabs>
10685
<TabItem value="main.py" label="main.py" default>
@@ -134,15 +113,11 @@ asyncio.run(main())`
134113
</TabItem>
135114
</Tabs>
136115

137-
If you want to modify the Actor structure,
138-
you need to make sure that your Actor is executable as a module, via `python -m src`,
139-
as that is the command started by `apify run` in the Apify CLI.
116+
If you want to modify the Actor structure, you need to make sure that your Actor is executable as a module, via `python -m src`, as that is the command started by `apify run` in the Apify CLI.
140117
We recommend keeping the entrypoint for the Actor in the `src/__main__.py` file.
141118

142119
## Adding dependencies
143120

144-
Adding dependencies into the Actor is simple.
145-
146121
First, add them in the [`requirements.txt`](https://pip.pypa.io/en/stable/reference/requirements-file-format/) file in the Actor source folder.
147122

148123
Then activate the virtual environment in `.venv`:
@@ -170,18 +145,19 @@ python -m pip install -r requirements.txt
170145

171146
### Guides
172147

173-
To see how you can integrate the Apify SDK with some of the most popular web scraping libraries,
174-
see our guides for working with [Requests or HTTPX](../guides/requests-and-httpx),
175-
[Beautiful Soup](../guides/beautiful-soup),
176-
[Playwright](../guides/playwright),
177-
[Selenium](../guides/selenium),
178-
or [Scrapy](../guides/scrapy).
148+
To see how you can integrate the Apify SDK with some of the most popular web scraping libraries, check out our guides for working with:
149+
150+
- [Requests or HTTPX](../guides/requests-and-httpx)
151+
- [Beautiful Soup](../guides/beautiful-soup)
152+
- [Playwright](../guides/playwright)
153+
- [Selenium](../guides/selenium)
154+
- [Scrapy](../guides/scrapy)
179155

180156
### Usage concepts
181157

182-
To learn more about the features of the Apify SDK and how to use them,
183-
check out the Usage Concepts section in the sidebar,
184-
especially the guides for the [Actor lifecycle](../concepts/actor-lifecycle),
185-
[working with storages](../concepts/storages),
186-
[handling Actor events](../concepts/actor-events),
187-
and [how to use proxies](../concepts/proxy-management).
158+
To learn more about the features of the Apify SDK and how to use them, check out the Usage Concepts section in the sidebar, especially the guides for:
159+
160+
- [Actor lifecycle](../concepts/actor-lifecycle)
161+
- [Working with storages](../concepts/storages)
162+
- [Handling Actor events](../concepts/actor-events)
163+
- [How to use proxies](../concepts/proxy-management)

0 commit comments

Comments
 (0)