diff --git a/latest/.buildinfo b/latest/.buildinfo index c8f75fe431..da83ac7368 100644 --- a/latest/.buildinfo +++ b/latest/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: a6979b6fe4120fff952b9ba8b89c1f7e +config: 7b0b3357b99c4528766b97b0574e191e tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/latest/.doctrees/commands/networks.doctree b/latest/.doctrees/commands/networks.doctree index d6cd50fa2e..d9af7a22e3 100644 Binary files a/latest/.doctrees/commands/networks.doctree and b/latest/.doctrees/commands/networks.doctree differ diff --git a/latest/.doctrees/environment.pickle b/latest/.doctrees/environment.pickle index 49db22303c..8604843149 100644 Binary files a/latest/.doctrees/environment.pickle and b/latest/.doctrees/environment.pickle differ diff --git a/latest/.doctrees/methoddocs/ape.doctree b/latest/.doctrees/methoddocs/ape.doctree index 0751804567..44ef507089 100644 Binary files a/latest/.doctrees/methoddocs/ape.doctree and b/latest/.doctrees/methoddocs/ape.doctree differ diff --git a/latest/.doctrees/methoddocs/ape_accounts.doctree b/latest/.doctrees/methoddocs/ape_accounts.doctree index 9387fb8f73..59d8fc6132 100644 Binary files a/latest/.doctrees/methoddocs/ape_accounts.doctree and b/latest/.doctrees/methoddocs/ape_accounts.doctree differ diff --git a/latest/.doctrees/methoddocs/ape_compile.doctree b/latest/.doctrees/methoddocs/ape_compile.doctree index 969315d9ff..d529ed415f 100644 Binary files a/latest/.doctrees/methoddocs/ape_compile.doctree and b/latest/.doctrees/methoddocs/ape_compile.doctree differ diff --git a/latest/.doctrees/methoddocs/ape_ethereum.doctree b/latest/.doctrees/methoddocs/ape_ethereum.doctree index 307d1b016d..e6f6dc30a1 100644 Binary files a/latest/.doctrees/methoddocs/ape_ethereum.doctree and b/latest/.doctrees/methoddocs/ape_ethereum.doctree differ diff --git a/latest/.doctrees/methoddocs/ape_node.doctree b/latest/.doctrees/methoddocs/ape_node.doctree index 1b162150ca..45fbe7784c 100644 Binary files a/latest/.doctrees/methoddocs/ape_node.doctree and b/latest/.doctrees/methoddocs/ape_node.doctree differ diff --git a/latest/.doctrees/methoddocs/ape_pm.doctree b/latest/.doctrees/methoddocs/ape_pm.doctree index ad1ae0feff..17c807a606 100644 Binary files a/latest/.doctrees/methoddocs/ape_pm.doctree and b/latest/.doctrees/methoddocs/ape_pm.doctree differ diff --git a/latest/.doctrees/methoddocs/ape_test.doctree b/latest/.doctrees/methoddocs/ape_test.doctree index 12b046bcbf..6f462c41bc 100644 Binary files a/latest/.doctrees/methoddocs/ape_test.doctree and b/latest/.doctrees/methoddocs/ape_test.doctree differ diff --git a/latest/.doctrees/methoddocs/api.doctree b/latest/.doctrees/methoddocs/api.doctree index 891feb5ac2..fa446f3785 100644 Binary files a/latest/.doctrees/methoddocs/api.doctree and b/latest/.doctrees/methoddocs/api.doctree differ diff --git a/latest/.doctrees/methoddocs/cli.doctree b/latest/.doctrees/methoddocs/cli.doctree index 15db8700b4..2eefa55c3c 100644 Binary files a/latest/.doctrees/methoddocs/cli.doctree and b/latest/.doctrees/methoddocs/cli.doctree differ diff --git a/latest/.doctrees/methoddocs/contracts.doctree b/latest/.doctrees/methoddocs/contracts.doctree index cd8e231f36..9e89511a3b 100644 Binary files a/latest/.doctrees/methoddocs/contracts.doctree and b/latest/.doctrees/methoddocs/contracts.doctree differ diff --git a/latest/.doctrees/methoddocs/exceptions.doctree b/latest/.doctrees/methoddocs/exceptions.doctree index a2ad25b001..acd6aaa509 100644 Binary files a/latest/.doctrees/methoddocs/exceptions.doctree and b/latest/.doctrees/methoddocs/exceptions.doctree differ diff --git a/latest/.doctrees/methoddocs/managers.doctree b/latest/.doctrees/methoddocs/managers.doctree index 613271abeb..d1cec1de99 100644 Binary files a/latest/.doctrees/methoddocs/managers.doctree and b/latest/.doctrees/methoddocs/managers.doctree differ diff --git a/latest/.doctrees/methoddocs/plugins.doctree b/latest/.doctrees/methoddocs/plugins.doctree index 76ea1e7cf0..446242824d 100644 Binary files a/latest/.doctrees/methoddocs/plugins.doctree and b/latest/.doctrees/methoddocs/plugins.doctree differ diff --git a/latest/.doctrees/methoddocs/types.doctree b/latest/.doctrees/methoddocs/types.doctree index e478bc8ca0..314be70e5f 100644 Binary files a/latest/.doctrees/methoddocs/types.doctree and b/latest/.doctrees/methoddocs/types.doctree differ diff --git a/latest/.doctrees/methoddocs/utils.doctree b/latest/.doctrees/methoddocs/utils.doctree index 51e3e90821..0883e2fcee 100644 Binary files a/latest/.doctrees/methoddocs/utils.doctree and b/latest/.doctrees/methoddocs/utils.doctree differ diff --git a/latest/.doctrees/userguides/dependencies.doctree b/latest/.doctrees/userguides/dependencies.doctree index ec5aae16fc..6676ce531a 100644 Binary files a/latest/.doctrees/userguides/dependencies.doctree and b/latest/.doctrees/userguides/dependencies.doctree differ diff --git a/latest/_sources/userguides/dependencies.md.txt b/latest/_sources/userguides/dependencies.md.txt index 9509d59c07..406eace59a 100644 --- a/latest/_sources/userguides/dependencies.md.txt +++ b/latest/_sources/userguides/dependencies.md.txt @@ -59,9 +59,20 @@ Bypass the original failing attempt by including a `v` in your dependency config **By knowing if the release is from the version API or only available via tag, and whether the version is v-prefixed or not, you save Ape some time and complexity when installing dependencies.** -### Python +### PyPI -You can use dependencies to PyPI by using the `python:` keyed dependency type. +You can use dependencies from [PyPI](https://pypi.org/) by using the `pypi:` key. + +```yaml +dependencies: + - pypi: snekmate + config_override: + contracts_folder: src +``` + +When using the `pypi:` key, dependencies are downloaded and extracted from PyPI using an HTTP requests library. + +You can also specify the `python:` key for already-installed dependencies: ```yaml dependencies: @@ -70,6 +81,14 @@ dependencies: contracts_folder: . ``` +Using `python:` requires the package to be installed in your `sys.path` (site-packages) folder, generally via `pip` or some other tool. +The `contracts_folder` override, in this case, is often needed because the site-package does not have the root source-folder included. +Additionally, `python:` specified dependencies may also be lacking project-configuration files, such as the `ape-config.yaml`. +Compilers such as `vyper` encourage users to use `pip` to publish and install smart-contract dependencies (other vyper files), but some features in Ape may be limited if the dependency is not also specified in your config somewhere. + +If wanting to use a dependency from `PyPI`, we recommend using the `pypi:` key instead of the `python:` key. +However, the `python:` key works great if you already used `pip` to install the dependency, especially if the dependency is not available on `PyPI`. + ### Local You can use already-downloaded projects as dependencies by referencing them as local dependencies. diff --git a/latest/commands/networks.html b/latest/commands/networks.html index 6f1bd16376..7a65780f9d 100644 --- a/latest/commands/networks.html +++ b/latest/commands/networks.html @@ -297,7 +297,7 @@
holesky-fork | local | mainnet | mainnet-fork | sepolia-fork | sepolia | holesky
+local | sepolia-fork | holesky | mainnet-fork | sepolia | holesky-fork | mainnet
test | node
+node | test
Configure your node:
in Ape, the default provider
plugin for live-network nodes. Also, ape node
can
start-up a local development node for testing purposes.
PythonDependency
PythonDependency.fetch()
PythonDependency.package_id
PythonDependency.pypi
PythonDependency.python
PythonDependency.uri
PythonDependency.version
A dependency installed from Python, such as files published to PyPI.
+class ape_pm.PythonDependency(*, name: str, config_override: dict = None, python: str | None = None, pypi: str | None = None, version: str | None = None) +A dependency installed from Python tooling, such as pip.
OpenZeppelin/openzepplin-contracts
.
The pypi
reference, such as "snekmate"
. Cannot use with
+python:
. When set, downloads the dependency from pypi
+using HTTP directly (not pip
).
The Python site-package name.
+python: str | None +The Python site-package name, such as "snekmate"
. Cannot use
+with pypi:
. Requires the dependency to have been installed
+either via pip
or something alike.
The core schema of the model.
The pydantic-core SchemaSerializer used to dump instances of the model.
The pydantic-core SchemaValidator used to validate instances of the model.
The core schema of the model.
The pydantic-core SchemaSerializer used to dump instances of the model.
The pydantic-core SchemaValidator used to validate instances of the model.
The core schema of the model.
The pydantic-core SchemaSerializer used to dump instances of the model.
The pydantic-core SchemaValidator used to validate instances of the model.
The core schema of the model.
The pydantic-core SchemaSerializer used to dump instances of the model.
The pydantic-core SchemaValidator used to validate instances of the model.
The core schema of the model.
The pydantic-core SchemaSerializer used to dump instances of the model.
The pydantic-core SchemaValidator used to validate instances of the model.
The core schema of the model.
Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
The pydantic-core SchemaSerializer used to dump instances of the model.
The pydantic-core SchemaValidator used to validate instances of the model.
The core schema of the model.
The pydantic-core SchemaSerializer used to dump instances of the model.
The pydantic-core SchemaValidator used to validate instances of the model.
The core schema of the model.
The pydantic-core SchemaSerializer used to dump instances of the model.
The pydantic-core SchemaValidator used to validate instances of the model.
The core schema of the model.
The pydantic-core SchemaSerializer used to dump instances of the model.
The pydantic-core SchemaValidator used to validate instances of the model.
The core schema of the model.
Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
The pydantic-core SchemaSerializer used to dump instances of the model.
The pydantic-core SchemaValidator used to validate instances of the model.
The core schema of the model.
The pydantic-core SchemaSerializer used to dump instances of the model.
The pydantic-core SchemaValidator used to validate instances of the model.
The core schema of the model.
The pydantic-core SchemaSerializer used to dump instances of the model.
The pydantic-core SchemaValidator used to validate instances of the model.
The core schema of the model.
The pydantic-core SchemaSerializer used to dump instances of the model.
The pydantic-core SchemaValidator used to validate instances of the model.
The core schema of the model.
Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
The pydantic-core SchemaSerializer used to dump instances of the model.
The pydantic-core SchemaValidator used to validate instances of the model.
The core schema of the model.
Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
The pydantic-core SchemaSerializer used to dump instances of the model.
The pydantic-core SchemaValidator used to validate instances of the model.
The core schema of the model.
The pydantic-core SchemaSerializer used to dump instances of the model.
The pydantic-core SchemaValidator used to validate instances of the model.
The core schema of the model.
The pydantic-core SchemaSerializer used to dump instances of the model.
The pydantic-core SchemaValidator used to validate instances of the model.
The core schema of the model.
The pydantic-core SchemaSerializer used to dump instances of the model.
The pydantic-core SchemaValidator used to validate instances of the model.
The core schema of the model.
Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
The pydantic-core SchemaSerializer used to dump instances of the model.
The pydantic-core SchemaValidator used to validate instances of the model.
The core schema of the model.
Metadata containing the decorators defined on the model. This replaces Model.__validators__ and Model.__root_validators__ from Pydantic V1.
The pydantic-core SchemaSerializer used to dump instances of the model.
The pydantic-core SchemaValidator used to validate instances of the model.
The core schema of the model.
The pydantic-core SchemaSerializer used to dump instances of the model.
The pydantic-core SchemaValidator used to validate instances of the model.
The core schema of the model.
The pydantic-core SchemaSerializer used to dump instances of the model.
The pydantic-core SchemaValidator used to validate instances of the model.
clean_path()
create_tempdir()
expand_environment_variables()
extract_archive()
extract_nested_value()
gas_estimation_error_message()
generate_dev_accounts()
Extract an archive file. Supports .zip
or .tar.gz
.
By knowing if the release is from the version API or only available via tag, and whether the version is v-prefixed or not, you save Ape some time and complexity when installing dependencies.
-You can use dependencies to PyPI by using the python:
keyed dependency type.
You can use dependencies from PyPI by using the pypi:
key.
dependencies:
+ - pypi: snekmate
+ config_override:
+ contracts_folder: src
+
When using the pypi:
key, dependencies are downloaded and extracted from PyPI using an HTTP requests library.
You can also specify the python:
key for already-installed dependencies:
dependencies:
- python: snekmate
config_override:
contracts_folder: .
Using python:
requires the package to be installed in your sys.path
(site-packages) folder, generally via pip
or some other tool.
+The contracts_folder
override, in this case, is often needed because the site-package does not have the root source-folder included.
+Additionally, python:
specified dependencies may also be lacking project-configuration files, such as the ape-config.yaml
.
+Compilers such as vyper
encourage users to use pip
to publish and install smart-contract dependencies (other vyper files), but some features in Ape may be limited if the dependency is not also specified in your config somewhere.
If wanting to use a dependency from PyPI
, we recommend using the pypi:
key instead of the python:
key.
+However, the python:
key works great if you already used pip
to install the dependency, especially if the dependency is not available on PyPI
.