Skip to content

Commit

Permalink
Merge pull request #3450 from dfinity/jmongeon-patch
Browse files Browse the repository at this point in the history
fix: typos and Python code block format
  • Loading branch information
jessiemongeon1 authored Sep 11, 2024
2 parents 92f176b + e02248c commit 52cb2af
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 132 deletions.
9 changes: 7 additions & 2 deletions docs/developer-docs/backend/python/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ keywords: [beginner, python, overview, kybra]
---

import { MarkdownChipRow } from "/src/components/Chip/MarkdownChipRow";
import { AdornedTabs } from "/src/components/Tabs/AdornedTabs";

# Python

Expand Down Expand Up @@ -34,18 +35,21 @@ To use Kybra:

To set up a Python virtual environment and install Kybra, use the following commands:

<Tabs>
<AdornedTabs>
<TabItem value={"linux"} label="Linux">

```
curl https://pyenv.run | bash
~/.pyenv/bin/pyenv install 3.10.7
~/.pyenv/versions/3.10.7/bin/python -m venv venv
source venv/bin/activate
pip install kybra
```

</TabItem>

<TabItem value={"macos"} label="macOS">

```
brew install pyenv
export PYENV_ROOT="$HOME/.pyenv"
Expand All @@ -57,14 +61,15 @@ pyenv install 3.10.7
source venv/bin/activate
pip install kybra
```

</TabItem>

<TabItem value={"windows"} label="Windows">

Kybra is not currently supported on Windows.

</TabItem>
</Tabs>
</AdornedTabs>

## Documentation

Expand Down
35 changes: 2 additions & 33 deletions docs/developer-docs/getting-started/hello-world.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -231,41 +231,10 @@ export default class {

<AdornedTab value={"python"} label="Python" endAdornment={<BetaChip />}>

Python canisters can be written using the Kybra canister development kit.
Python canisters can be written using the Kybra canister development kit.

To set up a Python virtual environment, use the following commands:
To set up a Python virtual environment, follow the [Python installation instructions](/docs/current/developer-docs/backend/python/)

<Tabs>
<TabItem value={"linux"} label="Linux">
```
curl https://pyenv.run | bash
~/.pyenv/bin/pyenv install 3.10.7
~/.pyenv/versions/3.10.7/bin/python -m venv venv
source venv/bin/activate
pip install kybra
```
</TabItem>

<TabItem value={"macos"} label="macOS">
```
brew install pyenv
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init -)"
source ~/.zprofile
pyenv install 3.10.7
~/.pyenv/versions/3.10.7/bin/python -m venv venv
source venv/bin/activate
pip install kybra
```
</TabItem>

<TabItem value={"windows"} label="Windows">

Kybra is not currently supported on Windows.

</TabItem>
</Tabs>

The default canister code for Kybra projects contains the following:

Expand Down
Loading

0 comments on commit 52cb2af

Please sign in to comment.