diff --git a/.gitbook/assets/200.webp b/.gitbook/assets/200.webp new file mode 100644 index 00000000..b978dd0a Binary files /dev/null and b/.gitbook/assets/200.webp differ diff --git a/SUMMARY.md b/SUMMARY.md index 8c8e65a6..b047cde7 100644 --- a/SUMMARY.md +++ b/SUMMARY.md @@ -53,6 +53,7 @@ * [Get veOCEAN stats](developers/subgraph/get-veocean-stats.md) * [Ocean.py](developers/ocean.py/README.md) * [Install](developers/ocean.py/install.md) + * [Publish flow](developers/ocean.py/publish-flow.md) * [Ocean Libraries](developers/ocean-libraries/README.md) * [Configuration](developers/using-ocean-libraries/configuration.md) * [Creating a data NFT](developers/using-ocean-libraries/creating-datanft.md) diff --git a/developers/ocean.py/publish-flow.md b/developers/ocean.py/publish-flow.md new file mode 100644 index 00000000..5ba54d96 --- /dev/null +++ b/developers/ocean.py/publish-flow.md @@ -0,0 +1,40 @@ +--- +description: >- + This page shows how you can publish a data NFT, a datatoken & a data asset all + in once in different scenarios. +--- + +# Publish flow + +[**ocean.py**](https://github.com/oceanprotocol/ocean.py) is a [Python library](https://pypi.org/project/ocean-lib/) to privately & securely publish, exchange, and consume data, using [Ocean Protocol](https://www.oceanprotocol.com/). + +In this page, we provide some tips & tricks for publishing an asset on Ocean Market using ocean.py. + +We assume you've already (a) [installed Ocean](https://github.com/oceanprotocol/ocean.py/blob/main/READMEs/install.md), and (b) done [local setup](https://github.com/oceanprotocol/ocean.py/blob/main/READMEs/setup-local.md) or [remote setup](https://github.com/oceanprotocol/ocean.py/blob/main/READMEs/setup-remote.md). This flow works for either one, without any changes between them. + +In the Python console: + +```python +#data info +name = "Branin dataset" +url = "https://raw.githubusercontent.com/trentmc/branin/main/branin.arff" + +#create data asset +(data_nft, datatoken, ddo) = ocean.assets.create_url_asset(name, url, {"from": alice}) + +#print +print("Just published asset:") +print(f" data_nft: symbol={data_nft.symbol}, address={data_nft.address}") +print(f" datatoken: symbol={datatoken.symbol}, address={datatoken.address}") +print(f" did={ddo.did}") +``` + +You've now published an Ocean asset! + +* `data_nft` is the base (base IP) +* `datatoken` for access by others (licensing) +* `ddo` holding metadata + +
+ +For more info, see [Appendix: Publish Details](https://github.com/oceanprotocol/ocean.py/blob/main/READMEs/main-flow.md#appendix-publish-details).