# Ape Framework
Ape is a framework for Web3 Python applications and smart contracts, with advanced functionality for testing, deployment, and on-chain interactions.
See [website](https://apeworx.io/) and [documentation](https://apeworx.io/ape/).
## Dependencies
* [python3](https://www.python.org/downloads) version 3.7 or greater, python3-dev
## Installation
### via `pip`
You can install the latest release via [`pip`](https://pypi.org/project/pip/):
```bash
pip install eth-ape
```
### via `setuptools`
You can clone the repository and use [`setuptools`](https://github.com/pypa/setuptools) for the most up-to-date version:
```bash
git clone https://github.com/ApeWorX/ape.git
cd ape
python3 setup.py install
```
### via `docker`
Please visit our [Dockerhub](https://hub.docker.com/repository/docker/apeworx/ape) for more details on using Ape with Docker.
example commands:
compiling:
```
docker run \
--volume $HOME/.ape:/root/.ape \
--volume $HOME/.vvm:/root/.vvm \
--volume $HOME/.solcx:/root/.solcx \
--volume $PWD:/root/project \
--workdir /root/project \
apeworx/ape compile
```
running the ape console:
```
docker run -it \
--volume $HOME/.ape:/root/.ape \
--volume $HOME/.vvm:/root/.vvm \
--volume $HOME/.solcx:/root/.solcx \
--volume $PWD:/root/project \
--workdir /root/project \
apeworx/ape console
```
## Quick Usage
Ape is primarily meant to be used as a command line tool. Here are some things you can use ape to do:
```bash
# Work with your accounts
$ ape accounts list
# Compile your project's smart contracts
$ ape compile --size
# Run your tests with pytest
$ ape test -k test_only_one_thing --coverage --gas
# Connect an IPython session through your favorite provider
$ ape console --network ethereum:mainnet:infura
# Add new plugins to ape
$ ape plugins add plugin-name
```
Ape also works as a package. You can use the same networks, accounts, and projects from the ape package as you can in the cli:
```python
# Work with registered networks, providers, and blockchain ecosystems (like Ethereum)
from ape import networks
with networks.ethereum.mainnet.use_provider("infura"):
... # Work with the infura provider here
# Work with test accounts, local accounts, and (WIP) popular hardware wallets
from ape import accounts
a = accounts[0] # Load by index
a = accounts["example.eth"] # or load by ENS/address
a = accounts.load("alias") # or load by alias
# Work with contract types
from ape import project
c = a.deploy(project.MyContract, ...)
c.viewThis() # Make Web3 calls
c.doThat(sender=a) # Make Web3 transactions
assert c.MyEvent[-1].caller == a # Search through Web3 events
```
## Development
This project is in early development and should be considered an alpha.
Things might not work, breaking changes are likely.
Comments, questions, criticisms and pull requests are welcomed.
## Documentation
To build docs:
```bash
python build_docs.py # build docs in docs/_build
python build_docs.py --rsync=/tmp/ape # for serving up docs in development
```
## License
This project is licensed under the [Apache 2.0](LICENSE).
挣扎的蓝藻
- 粉丝: 14w+
- 资源: 15万+
最新资源
- MATLAB代码《基于多智能体系统一致性算法的电力系统分布式经济调度》 软件环境:MATLAB 内容:集中式优化方法难以应对未来电网柔性负荷广泛渗透以及电力元件“即插即用”的技术要求 区别于集中式经
- Listary pro(文件搜索增强工具) v6.1.0.38 PJ版
- 无线电能传输 wpt 磁耦合谐振 过零检测 matlab simulink仿真 pwm MOSFET,过零检测模块 基于二极管整流的无线电能传输设计 基于同步整流的无线电能传输设计(含过零比较
- 混合动力汽车能量管理策略(DP-ECMS-PMP)搭建指导说明
- 全自动铝型材切割机 直切斜切一体机sw18可编辑全套技术资料100%好用.zip
- 电机标幺化、PI标幺化、锁相环PLL标幺化 详解电机模型相关标幺化处理 电流环PI控制器的标幺化处理 观测器中PLL锁相环的标幺化处理 采样时间处理 这是文档,不是代码,文档中的代码均为引用举例子的
- 全自动尼龙拉链超音波切断机(sw10可编辑+工程图+BOM)全套技术资料100%好用.zip
- 初始安全命令,方便网友查询并给予笔者返回
- abaqus轮胎建模仿真 轮胎仿真建模 基于hypermesh和abaqus联合轮胎仿真教学,hypermesh前处理,inp文件属性赋予+工作步设置,abaqus计算,有轮胎的inp文件 1.模
- electron-builder 打包setup安装程序所需包
- COMSOL注浆( 1comsol模拟随机裂隙注浆,浆液在多孔介质和裂隙中扩散,考虑浆液粘度时变性 2浆液在多孔介质和裂隙中流动 裂隙为浆液流动的优势通道,明显快与无裂隙的基质通道 注:
- r vr age.csv
- 精品-基于STM32F103的智能机械臂识别与控制项目(课件PPT+源代码).zip
- aadfhjglfdkgkbssss
- 源代码用 Amazon Bedrock 与 Nova 大模型构建客户之声解决方案
- fluent金属熔凝最强学习资料 1.流动传热传质 2.激光移动热源 3.金属熔化凝固 4.宏观偏析 5.激光熔覆 6.udf代码讲解
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
评论0