1/5
## Installing Libraries and using imports One of the things we can do in Python is install packages and libraries. To install the Python package called "Titanoboa" (a Python tool for interacting with Vyper), we can visit the Titanoboa Github repository: ```bash github.com/vyperlang/titanoboa ``` On the repository page, if we scroll down to the Installation section, we can see how to install the Python package directly into our environment. The command we will use is: ```bash pip install titanoboa ``` We can then run a command using the package in our Python. To install the Titanoboa package into our global Python environment, we will type: ```bash python3.11 -m pip install titanoboa ``` After installing Titanoboa, we can view a list of all the different packages that we have installed in our Python environment. To view this list, we can type: ```bash python3.11 -m pip freeze ``` We can use the Titanoboa package to evaluate Vyper. To evaluate some Vyper code, we can type "import boa". For example, if we want to evaluate the Vyper code to create an empty uint256 object (AKA 0), we can type: ```python import boa print(boa.eval('"empty(uint256)"')) ```
A comprehensive guide to installing Python libraries and using imports - This lesson provides an in-depth look at how to install Python libraries and use them effectively in your code. The video covers installing libraries using pip, as well as the importance of importing them correctly in your Python scripts.
Previous lesson
Previous
Next lesson
Next
Give us feedback
Course Overview
About the course
Python basics
Introduction to Web3.py
Introduction to Titanoboa
Introduction to Moccasin
How to create an ERC-20
How to test Python code and Vyper smart contract
How to deploy Vyper smart contracts on ZKsync using Moccasin
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
On-chain Data Analyst
$59,000 - $139,000 (avg. salary)
DeFi Developer
$75,000 - $200,000 (avg. salary)
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Last updated on January 14, 2025
Duration: 2h 20min
Duration: 1h 51min
Duration: 58min
Duration: 2h 23min
Duration: 53min
Duration: 2h 24min
Duration: 28min
Duration: 1h 54min
Duration: 11min
Course Overview
About the course
Python basics
Introduction to Web3.py
Introduction to Titanoboa
Introduction to Moccasin
How to create an ERC-20
How to test Python code and Vyper smart contract
How to deploy Vyper smart contracts on ZKsync using Moccasin
Smart Contract Auditor
$100,000 - $200,000 (avg. salary)
On-chain Data Analyst
$59,000 - $139,000 (avg. salary)
DeFi Developer
$75,000 - $200,000 (avg. salary)
Smart Contract Engineer
$100,000 - $150,000 (avg. salary)
Web3 developer
$60,000 - $150,000 (avg. salary)
Web3 Developer Relations
$85,000 - $125,000 (avg. salary)
Last updated on January 14, 2025
Testimonials
Read what our students have to say about this course.
Chainlink
Chainlink
Gustavo Gonzalez
Solutions Engineer at OpenZeppelin
Francesco Andreoli
Lead Devrel at Metamask
Albert Hu
DeForm Founding Engineer
Radek
Senior Developer Advocate at Ceramic
Boidushya
WalletConnect
Idris
Developer Relations Engineer at Axelar