Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
4b20cff
Update post-create.sh
Ganainmtech Apr 30, 2024
1c5e87c
Rename post-create.sh to algorand_setup.sh
Ganainmtech May 3, 2024
906e3e4
Update README.md
Ganainmtech Jun 5, 2024
fd28b84
Update README.md
Ganainmtech Jun 5, 2024
197a105
Update README.md
Ganainmtech Jun 5, 2024
6173447
Update README.md
Ganainmtech Jun 5, 2024
f87eec9
Update README.md
Ganainmtech Jun 5, 2024
73a5642
Update README.md
Ganainmtech Jun 5, 2024
f703687
Update README.md
Ganainmtech Jun 5, 2024
f5e2543
Update README.md
Ganainmtech Jun 14, 2024
c979561
Update README.md
Ganainmtech Jul 24, 2024
fa3e580
Update README.md
Ganainmtech Jul 24, 2024
d9d0b6b
Adding frontend to algorand scripts
Ganainmtech Aug 13, 2024
fe8204a
Delete .sesskey
Ganainmtech Aug 13, 2024
6f11c08
Delete data directory
Ganainmtech Aug 13, 2024
e068737
Delete pyproject.toml
Ganainmtech Aug 13, 2024
56f444a
Delete __pycache__ directory
Ganainmtech Aug 13, 2024
8857297
Update setup.sh
Ganainmtech Aug 13, 2024
aefeee9
Update README.md
Ganainmtech Aug 13, 2024
81a3dae
Empty main.py
Ganainmtech Aug 13, 2024
b2af025
Update README.md
Ganainmtech Aug 13, 2024
0bb5ec0
videos to be added
Ganainmtech Aug 16, 2024
3bb67a4
added draft videos
Ganainmtech Aug 16, 2024
ccf919c
update
Ganainmtech Aug 16, 2024
99fd680
Update README.md
Ganainmtech Aug 16, 2024
c30f48a
Update README.md
Ganainmtech Aug 16, 2024
5596947
tidy up
Ganainmtech Aug 21, 2024
2501af2
Update .devcontainer.json
Ganainmtech Oct 17, 2024
1ddcb0d
Update .devcontainer.json
Ganainmtech Dec 10, 2024
11fe216
Delete algorand_setup.sh
Ganainmtech Dec 10, 2024
8c6b704
Update README.md
Ganainmtech Dec 10, 2024
deec398
Update README.md
Ganainmtech Dec 10, 2024
0245328
Update README.md
Ganainmtech Dec 10, 2024
3c1f8d7
Update main.py
Ganainmtech Dec 10, 2024
eab46c9
Update README.md
Ganainmtech Dec 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 17 additions & 19 deletions .devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
{
"forwardPorts": [4001, 4002, 8980, 5173],
"portsAttributes": {
"4001": {
"label": "algod"
},
"4002": {
"label": "kmd"
},
"8980": {
"label": "indexer"
},
"5173": {
"label": "vite"
}
"forwardPorts": [4001, 4002, 8980, 5173],
"portsAttributes": {
"4001": {
"label": "algod"
},

"postCreateCommand": "pipx install algokit",
"postStartCommand": "algokit localnet start"

}
"4002": {
"label": "kmd"
},
"8980": {
"label": "indexer"
},
"5173": {
"label": "vite"
}
},
"postCreateCommand": "pip3 install py-algorand-sdk python-dotenv && pipx install algokit && pip install algokit-utils",
"postStartCommand": "algokit localnet start"
}

87 changes: 86 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,86 @@
# codespace_algorand
# The All-in-One Algorand Codespace

Welcome to the all-in-one Algorand Codespace! This repository is designed to provide you with everything you need to start developing on the Algorand blockchain, whether you're attending a workshop, completing a challenge, or just exploring on your own.

## 🌟 Quick Start Guide

### **Fork the Repo:**

To create your own copy of this repository:

a. **Go to the GitHub Repository:**
- Navigate to the main page which is the current one your on.

b. **Click the "Fork" Button:**
- In the top-right corner of the page, click the **Fork** button. This will create a copy of the repository under your GitHub account.

c. **Wait for the Forking Process to Complete:**
- GitHub will take a few moments to create the fork. Once complete, you’ll be redirected to your newly created fork.

## 🚀 Start with Codespaces
This is the fastest way to get up and running!

1. **Create a Codespace:**

https://github.com/user-attachments/assets/42b0f758-b05b-4d81-9950-b316c4330907


- Click the green "Code" button at the top right of your forked repo.
- Select "Create codespace on main".
- Once your Codespace is fully loaded, you are ready to go!

2. **Start Coding:**
- Open the `main.py` file to start coding and interact with the Algorand blockchain (no smart contracts needed).
- If you notice your codespace loaded with a similar error to the screenshot below, no worries! Just run ``` algokit localnet start ```

<img width="570" alt="Screenshot 2024-12-10 at 14 58 16" src="https://github.com/user-attachments/assets/f079d90d-3fa7-45c5-b339-170b7fec772d">

- Lastly the ```main.py``` file is pre-populated with a simple script to quickly set up a local dispenser on the Algorand blockchain. This helps you get started immediately by connecting to the localnet and printing the dispenser address. Run it! ```python main.py``` like any other Python file :)

3. **Workshop Follow-Along:**
- If you're participating in a workshop, the code we’ll be using is available [here](https://github.com/Ganainmtech/python_algokit_demo). Feel free to use this as your experiemntation starting point too, we create an asset!

4. **Explore on Your Own:**
- Use this environment to write your own scripts or modify existing ones.

5. **Smart Contracts and Apps on-chain:**
- To start a smart contract or full stack App project, run:
- Note: If you are at this point, I recommend you get AlgoKit locally - codespaces are a premium feture of github and can get deleted!
```bash
algokit init
```

## 💻 Advanced Setup for Local Development

Prefer a local environment? Follow these steps:

#### 🧰 Prerequisites

- Install Python 3.12 or higher.
- Install [AlgoKit](https://developer.algorand.org/algokit/?utm_source=af_employee&utm_medium=social&utm_campaign=algokit_sarajane&utm_content=download&utm_term=EME).
- Install Docker (for running a local Algorand network).

## 🎓 Workshop Challenges

If you’re taking part in a workshop challenge you can choose to fork and enter codespace or fork and work locally:

1. **Live coding follow along:**
- Complete the task provided during the workshop.

2. **Submit Your Answer:**
- Push your changes to your forked GitHub repository.
- Create a Pull Request (PR) to the original repository.
- In your PR, include:
- What your script achieves. (Optional)

## 📚 Additional Resources

- **Level Up:** Move to a local development environment when you're ready! Check out the [AlgoKit Landing Page](https://developer.algorand.org/algokit/?utm_source=af_employee&utm_medium=social&utm_campaign=algokit_sarajane&utm_content=download&utm_term=EME) for a quick setup guide.
- **Join the Community:**
- [![Join Algorand Discord](https://img.shields.io/discord/discord_channel_id?logo=discord)](https://discord.com/invite/algorand)
- [![Follow Algodevs on Twitter](https://img.shields.io/twitter/follow/algodevs?style=social)](https://x.com/algodevs)

## 🏁 Conclusion

This repository serves as both a playground for exploration and a platform for structured learning through workshops and challenges. Whether you're a beginner or an experienced developer, I hope you find this environment useful and engaging. Happy coding!

7 changes: 7 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
from algokit_utils.beta.algorand_client import (AlgorandClient, ) # Import what you need here

# Client to connect to localnet
algorand = AlgorandClient.default_local_net()

# Import dispenser from KMD
dispenser = algorand.account.dispenser()
print("Dispenser Address: ", dispenser.address)
13 changes: 0 additions & 13 deletions post-create.sh

This file was deleted.