Skip to content
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

docs: Added new getting started page #232

Merged
merged 6 commits into from
May 30, 2024
Merged

Conversation

jbartadev
Copy link
Member

I tried to do the same thing as we did for the JS client here but for Python.

The goal is to improve onboarding (adaptation) for using our API (in Python in this case)

Snímek obrazovky 2024-05-29 v 17 17 17

* master:
  chore: update dev deps (#227)
  chore: update dev deps and gh actions pipelines (#226)
  chore: Add Python Client examples [docs] (#191)
  Configure Renovate (#76)
  chore: bump version to 1.7.1 (#193)
  fix: aborting of last Actor/task run (#192)
  chore: Automatic docs theme update [skip ci]

# Conflicts:
#	website/sidebars.js
@jbartadev jbartadev requested a review from TC-MO as a code owner May 29, 2024 15:23
Copy link
Contributor

@vdusek vdusek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

I have a few code style suggestions to share.

On top of that, one more thing... It's not a requirement, more a personal preference. In many places I'd prefer not to chain so many calls into one command. Breaking it down to more separate commands can make it more understandable for users. Also when you want to transform such long-chained command into async command, you will end up with multiple awaits in one command. Which is not goood.

For example, instead of writing:

from apify_client import ApifyClient

apify_client = ApifyClient('MY-APIFY-TOKEN')

# Lists items from the Actor's dataset
dataset_items = apify_client.dataset('daset-id').list_items().items

I'd rather use something like:

from apify_client import ApifyClient

apify_client = ApifyClient('MY-APIFY-TOKEN')

# Get a dataset client
dataset_client = apify_client.dataset('daset-id')

# Lists items from the Actor's dataset
dataset_items = dataset_client.list_items().items

docs/index.md Outdated Show resolved Hide resolved
docs/index.md Outdated Show resolved Hide resolved
docs/index.md Outdated Show resolved Hide resolved
docs/index.md Outdated Show resolved Hide resolved
Co-authored-by: Vlada Dusek <v.dusek96@gmail.com>
@github-actions github-actions bot added this to the 90th sprint - Web team milestone May 30, 2024
@github-actions github-actions bot added the t-web Issues with this label are in the ownership of the web team. label May 30, 2024
@jbartadev
Copy link
Member Author

@vdusek Thanks Vláďo for the suggested improvements! I added a couple of simplifications for the code examples (removed unnecessary chaining). Please let me know if it's ok now

@jbartadev jbartadev requested a review from vdusek May 30, 2024 07:51
* master:
  chore: fix pytest deps (no module named pkg_resources) (#233)
Copy link
Contributor

@vdusek vdusek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just one nitpick, otherwise LGTM, thanks 🙂

docs/index.md Outdated Show resolved Hide resolved
Co-authored-by: Vlada Dusek <v.dusek96@gmail.com>
Copy link
Contributor

@TC-MO TC-MO left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jbartadev jbartadev merged commit 457a779 into master May 30, 2024
23 checks passed
@jbartadev jbartadev deleted the feat/improve-getting-started branch May 30, 2024 11:44
jbartadev added a commit to apify/apify-docs that referenced this pull request May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t-web Issues with this label are in the ownership of the web team.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants