Skip to main content

🐳 Ocean Provider.

Project description

provider-py

REST API for provider of data services

This is part of the Ocean Protocol V3 tools.

This is feature complete and is a BETA version.

Starting the server locally

Quick start

Uses the rinkeby network with a remote metadatastore instance running at https://aquarius.marketplace.dev-ocean.com

git clone git@github.com:oceanprotocol/provider-py.git
cd provider-py/

virtualenv venv -p python3.6
source venv/bin/activate 

pip install -r requirements_dev.txt
export FLASK_APP=ocean_provider/run.py
export CONFIG_FILE=config.ini
export PROVIDER_ADDRESS="068ed00cf0441e4829d9784fcbe7b9e26d4bd8d0"
export PROVIDER_PASSWORD="secret"
export PROVIDER_KEYFILE="tests/resources/provider_key_file.json"
export AQUARIUS_URL="https://aquarius.marketplace.dev-ocean.com"

export PARITY_ADDRESS1="0x00bd138abd70e2f00903268f3db08f2d25677c9e"
export PARITY_PASSWORD1="node0"
export PARITY_KEYFILE1="tests/resources/consumer_key_file.json"

flask run --port=8030

Detailed steps

1. Clone the repo

git clone git@github.com:oceanprotocol/provider-py.git
cd provider-py/

2. Virtual env (optional)

Before running it locally we recommend to set up virtual environment:

virtualenv venv -p python3.6
# OR: python -m venv venv
source venv/bin/activate 

3. Requirements

Install all the requirements:

pip install -r requirements_dev.txt

4. Dependencies

Metadata store (Aquarius). Do one of the following:

  • Run Aquarius locally, see https://github.com/oceanprotocol/aquarius
  • Point to a remote instance such as https://aquarius.marketplace.dev-ocean.com. In this case replace the aquarius.url option in the config.ini file with the appropriate URL.

Ethereum network. Do one of the following:

  • Run ganache-cli
  • Point to rinkeby testnet or any other ethereum network

Make sure that ocean contracts (https://github.com/oceanprotocol/contracts) are deployed to the your network of choice. Update the network option in the config.ini file with the proper network URL. For now it must be a URL, a simple network name (e.g. mainnet) will be supported in the future.

5. Start the provider server

export FLASK_APP=ocean_provider/run.py
export CONFIG_FILE=config.ini
export PROVIDER_ADDRESS="your ethereum address goes here"
# Set one of the following
export PROVIDER_KEY="the private key"
export PROVIDER_ENCRYPTED_KEY="The encrypted key json from the keyfile"
export PROVIDER_KEYFILE="path to the keyfile which has the encrypted key"
# and set the password if using either PROVIDER_KEYFILE or PROVIDER_ENCRYPTED_KEY
export PROVIDER_PASSWORD="password to allow decrypting the encrypted key"

flask run --port=8030

Refer to the API.md file for endpoints and payloads.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

ocean_provider-0.4.0-py3.8.egg (49.4 kB view details)

Uploaded Source

ocean_provider-0.4.0-py2.py3-none-any.whl (26.0 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file ocean_provider-0.4.0-py3.8.egg.

File metadata

  • Download URL: ocean_provider-0.4.0-py3.8.egg
  • Upload date:
  • Size: 49.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.0

File hashes

Hashes for ocean_provider-0.4.0-py3.8.egg
Algorithm Hash digest
SHA256 8705e644b5983517ee28b2dfa758a991caf80a1ee001c34ae74fe93edafb7d94
MD5 331d25a3c86f52fca99c148e93c4a8bb
BLAKE2b-256 11cd7c4076e18884331fe3ca094f14f2e01ba80e225798d37121167a28e46dca

See more details on using hashes here.

File details

Details for the file ocean_provider-0.4.0-py2.py3-none-any.whl.

File metadata

  • Download URL: ocean_provider-0.4.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 26.0 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.0

File hashes

Hashes for ocean_provider-0.4.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 48b1cd2f9ffdbdfdd7aa4fb96089bd947efaf3b64a4d33ca73484c00776b5bbd
MD5 4393b5a631ed4ca5f9a3fe856dc67bcd
BLAKE2b-256 50f57877a88036b2875606233626b3dfd507537b7b75b2b1e6e6b3fbf357935c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page