Skip to content

Instantly share code, notes, and snippets.

@LinuxIsCool
Created March 19, 2023 18:45
Show Gist options
  • Select an option

  • Save LinuxIsCool/20eded71045e3d2d58fbb5c6955189c6 to your computer and use it in GitHub Desktop.

Select an option

Save LinuxIsCool/20eded71045e3d2d58fbb5c6955189c6 to your computer and use it in GitHub Desktop.
Learning Vyper and ApeworkX Together. Packaging with Poetry.

Initializing an Ape Vyper Python Package with Poetry

Setup a Vyper working directory and an example directory for our package

mkdir Vyper
cd Vyper
mkdir example
cd example

Initialize Git for repository hosting and version control

git init

Initialize Poetry Packaging and Dependency Management

poetry init

Install eth-ape and vyper python packages

poetry add eth-ape
poetry add vyper

Enter Poetry Shell to Access Package Dependencies

poetry shell

Initialize Apeworkx for blockchain development suite

ape init

Install the vyper plugin for Ape

ape plugins install vyper

Start Developing:

contracts/OpenAuction.vy
tests/test_open_auction.py

Create a GitHub Repository called vyper-example and add the repository as your remote

git remote add origin [email protected]:longtailfinancial/vyper-example.git

Commit and Push your work.

git add .
git commit -m "Initialized repository!"
git pull origin main --allow-unrelated-histories
git push origin main

See results here:

https://github.com/longtailfinancial/vyper-example

Continue Reading:

https://docs.vyperlang.org/en/stable/vyper-by-example.html

Additional Resources

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment