Skip to content

Commit

Permalink
doc: add api docs and docstrings for install_package
Browse files Browse the repository at this point in the history
  • Loading branch information
iamdefinitelyahuman committed Apr 7, 2020
1 parent fa68c27 commit cadd053
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
13 changes: 13 additions & 0 deletions brownie/project/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,19 @@ def _install_dependencies(path: Path) -> None:


def install_package(package_id: str) -> str:
"""
Install a package.
Arguments
---------
package_id : str
Package ID or ethPM URI.
Returns
-------
str
ID of the installed package.
"""
if urlparse(package_id).scheme in ("erc1319", "ethpm"):
return _install_from_ethpm(package_id)
else:
Expand Down
8 changes: 8 additions & 0 deletions docs/api-project.rst
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,14 @@ Module Methods
>>> container.SimpleTest
<ContractContainer object 'SimpleTest'>
.. py:method:: main.install_package(package_id)
Install a package.
See the :ref:`Brownie Package Manager <package-manager>` documentation for more information on packages.
* ``package_id``: Package identifier or ethPM URI
``brownie.project.build``
=========================
Expand Down

0 comments on commit cadd053

Please sign in to comment.