In this lesson we streamline our ability to work with other contracts by importing external interfaces directly.
https://vyper.readthedocs.io/en/stable/interfaces.html
In Vyper, you can directly import an interface stored within a file. Import a Vyper contract and automatically extract the interface for you.
Absolute imports must include an alias for the package or the compiler will raise an error.
import <file> as <alias>
You can also use the "from" syntax for relative or absolute imports
from <path> import <file>
from <path> import <file> as <alias>
Vyper includes common built-in interfaces for common token standards. For example, you can import an ERC20 token with a simple command:
from vyper.interfaces import ERC20