# 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).
没有合适的资源?快使用搜索试试~ 我知道了~
资源详情
资源评论
资源推荐
收起资源包目录
PyPI 官网下载 | eth-ape-0.1.0a30.tar.gz (171个子文件)
setup.cfg 148B
custom.css 57B
Dockerfile 338B
.dockerignore 25B
TestContract.foobar 0B
.gitignore 2KB
.gitkeep 0B
layout.html 9KB
custom.js 565B
wallet-with-send.json 9KB
escrow.json 9KB
wallet.json 7KB
standard-token.json 6KB
piper-coin.json 5KB
safe-math-lib.json 3KB
transferable.json 573B
owned.json 503B
Interface.json 73B
LICENSE 11KB
README.md 3KB
README.md 3KB
CONTRIBUTING.md 2KB
work-item.md 1KB
bug.md 704B
feature.md 670B
PULL_REQUEST_TEMPLATE.md 380B
CHANGELOG.md 317B
not-zip-safe 1B
PKG-INFO 5KB
PKG-INFO 5KB
providers.py 11KB
networks.py 11KB
providers.py 10KB
contracts.py 10KB
project.py 9KB
contract.py 8KB
ecosystem.py 8KB
accounts.py 8KB
networks.py 7KB
utils.py 7KB
_cli.py 7KB
test_accounts.py 6KB
choices.py 5KB
logging.py 5KB
__init__.py 5KB
setup.py 5KB
accounts.py 4KB
options.py 4KB
exceptions.py 4KB
accounts.py 4KB
conftest.py 4KB
test_accounts.py 4KB
build_docs.py 4KB
_cli.py 3KB
utils.py 3KB
manifest.py 3KB
runners.py 3KB
_cli.py 3KB
test_providers.py 3KB
converters.py 3KB
_cli.py 3KB
__init__.py 3KB
_cli.py 3KB
providers.py 3KB
test_compile.py 3KB
conf.py 3KB
abstract.py 3KB
compilers.py 2KB
config.py 2KB
test_logging.py 2KB
plugin.py 2KB
accounts.py 2KB
address.py 2KB
test_networks.py 2KB
_cli.py 2KB
test_utils.py 2KB
arguments.py 1KB
_cli.py 1KB
contextmanagers.py 1KB
network.py 1KB
conftest.py 1KB
config.py 1KB
__init__.py 1KB
utils.py 1KB
compiler.py 1KB
test_run.py 1KB
__init__.py 1KB
test_ether.py 1KB
fixtures.py 976B
converters.py 905B
convert.py 904B
test_ecosystem.py 892B
conftest.py 887B
signatures.py 848B
compiler.py 839B
__init__.py 836B
paramtype.py 787B
test_manifest.py 776B
__init__.py 713B
__init__.py 585B
共 171 条
- 1
- 2
挣扎的蓝藻
- 粉丝: 14w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- NOI 全国青少年信息学奥林匹克竞赛(官网)-2024.11.05.pdf
- 【Unity抢劫和犯罪题材的低多边形3D资源包】POLYGON Heist - Low Poly 3D Art
- 网络安全是一个广泛的领域,涉及的知识和技能非常多样.docx
- 用Python实现,PySide构建GUI界面的“井字棋”游戏 具备学习功能(源码)
- 系统测试报告模板 测试目的、测试依据、测试准备、测试内容、测试结果及分析、总结
- 雷柏2.4G无线鼠标键盘对码软件V3.1
- Python基础入门-待办事项列表.pdf
- 240301031刘炳炎咖啡网站导航.psd
- 数据集【YOLO目标检测】道路油污检测数据集 170 张,YOLO/VOC格式标注!
- 基于Robot FrameWork框架的自动化测试
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论0