-
Notifications
You must be signed in to change notification settings - Fork 21
docs: merge overview pages #732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
fix capitalization of Actor changes to formatting streamlining prose
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #732 +/- ##
==========================================
- Coverage 81.98% 81.90% -0.08%
==========================================
Files 46 46
Lines 2681 2681
==========================================
- Hits 2198 2196 -2
- Misses 483 485 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| @@ -0,0 +1,163 @@ | |||
| --- | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I was afraid that might happen. I think if we rename it to index.md it should not be separate openable section
| <Tabs> | ||
| <TabItem value="main.py" label="main.py" default> | ||
| <CodeBlock language="python">{ | ||
| `from apify import Actor | ||
| ${''} | ||
| async def main(): | ||
| async with Actor: | ||
| Actor.log.info('Actor input:', await Actor.get_input()) | ||
| await Actor.set_value('OUTPUT', 'Hello, world!')` | ||
| }</CodeBlock> | ||
| </TabItem> | ||
| <TabItem value="__main__.py" label="__main.py__"> | ||
| <CodeBlock language="python">{ | ||
| `import asyncio | ||
| import logging | ||
| ${''} | ||
| from apify.log import ActorLogFormatter | ||
| ${''} | ||
| from .main import main | ||
| ${''} | ||
| handler = logging.StreamHandler() | ||
| handler.setFormatter(ActorLogFormatter()) | ||
| ${''} | ||
| apify_logger = logging.getLogger('apify') | ||
| apify_logger.setLevel(logging.DEBUG) | ||
| apify_logger.addHandler(handler) | ||
| ${''} | ||
| asyncio.run(main())` | ||
| }</CodeBlock> | ||
| </TabItem> | ||
| </Tabs> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider adding some code comments?
|
|
||
| ### Creating Actors | ||
|
|
||
| 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). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"through Apify Console"
Is through used in this context? I'd rather just use "in".
| 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). | |
| To create and run Actors in Apify Console, refer to the [Console documentation](https://docs.apify.com/academy/getting-started/creating-actors#choose-your-template). |
|
|
||
| ## Requirements | ||
|
|
||
| The Apify SDK requires Python version 3.8 or above to run Python Actors locally. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs previously said that the required version is 3.10 or above. Is this updated version correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, I'll reach out and confirm the required version as client & sdk diverge here
|
|
||
| ## Adding dependencies | ||
|
|
||
| First, add them in the [`requirements.txt`](https://pip.pypa.io/en/stable/reference/requirements-file-format/) file in the Actor source folder. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| First, add them in the [`requirements.txt`](https://pip.pypa.io/en/stable/reference/requirements-file-format/) file in the Actor source folder. | |
| First, add the dependencies in the [`requirements.txt`](https://pip.pypa.io/en/stable/reference/requirements-file-format/) file in the Actor source folder. |
| </TabItem> | ||
| </Tabs> | ||
|
|
||
| Then install the dependencies: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Then install the dependencies: | |
| Finally, install the dependencies: |
vdusek
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When running it locally, clicking "Docs" or "Get Started" redirects to
http://localhost:3000/sdk/python/docs/overview/introduction, which results in a 404.

No description provided.