{ "info": { "author": "leucothia", "author_email": "devops@oceanprotocol.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "[![banner](https://raw.githubusercontent.com/oceanprotocol/art/master/github/repo-banner%402x.png)](https://oceanprotocol.com)\n\n# provider\n\n> \ud83d\udc0b Provide an off-chain database store for data assets metadata and registration and perform part of access control in collaboration with the keeper-contracts.\n> [oceanprotocol.com](https://oceanprotocol.com)\n\n[![Docker Build Status](https://img.shields.io/docker/build/oceanprotocol/provider.svg)](https://hub.docker.com/r/oceanprotocol/provider/) [![Travis (.com)](https://img.shields.io/travis/com/oceanprotocol/provider.svg)](https://travis-ci.com/oceanprotocol/provider) [![Codacy coverage](https://img.shields.io/codacy/coverage/0fa4c47049434406ad80932712f7ee6f.svg)](https://app.codacy.com/project/ocean-protocol/provider/dashboard) [![PyPI](https://img.shields.io/pypi/v/ocean-provider.svg)](https://pypi.org/project/ocean-provider/) [![GitHub contributors](https://img.shields.io/github/contributors/oceanprotocol/provider.svg)](https://github.com/oceanprotocol/provider/graphs/contributors)\n\n---\n\n**\ud83d\udc32\ud83e\udd91 THERE BE DRAGONS AND SQUIDS. This is in alpha state and you can expect running into problems. If you run into them, please open up [a new issue](https://github.com/oceanprotocol/provider/issues). \ud83e\udd91\ud83d\udc32**\n\n---\n\n## Table of Contents\n\n - [Features](#features)\n - [Prerequisites](#prerequisites)\n - [Quick Start](#quick-start)\n - [API documentation](#api-documentation)\n - [Configuration](#configuration)\n - [Code style](#code-style)\n - [Testing](#testing)\n - [New Version](#new-version)\n - [License](#license)\n\n---\n\n\n## Features\n\nThe Provider handles all non-blockchain related core functionality, including compute and storage interfaces, and connections to Ocean Keepers. Additionally, the Provider implements Ocean's Service Integrity and Orchestration capabilities, allowing for services to be requested, ordered, scheduled, verfied, and curated. \n\n## Running Locally, for Dev and Test\n\nIf you want to contribute to the development of the Provider, then you could do the following. (If you want to run a Provider in production, then you will have to do something else.)\n\nFirst, clone this repository:\n\n```bash\ngit clone git@github.com:oceanprotocol/provider.git\ncd provider/\n```\n\nThen run some things that the Provider expects to be running:\n\n```bash\ncd docker\ndocker-compose up\n```\n\nYou can see what that runs by reading [docker/docker-compose.yml](docker/docker-compose.yml).\nNote that it runs MongoDB but the Provider can also work with BigchainDB or Elasticsearch.\nIt also runs [Ganache](https://github.com/trufflesuite/ganache) with all [Ocean Protocol Keeper Contracts](https://github.com/oceanprotocol/keeper-contracts) and [Ganache CLI](https://github.com/trufflesuite/ganache-cli).\n\nThe most simple way to start is:\n\n```bash\npip install -r requirements_dev.txt # or requirements_conda.txt if using Conda\nexport FLASK_APP=provider/run.py\nexport CONFIG_FILE=oceandb.ini\n./scripts/deploy\nflask run\n```\n\nThat will use HTTP (i.e. not SSL/TLS).\n\nThe proper way to run the Flask application is using an application server such as Gunicorn. This allow you to run using SSL/TLS.\nYou can generate some certificates for testing by doing:\n\n```bash\nopenssl req -x509 -newkey rsa:4096 -nodes -out cert.pem -keyout key.pem -days 365\n```\n\nand when it asks for the Common Name (CN), answer `localhost`\n\nThen edit the config file `oceandb.ini` so that:\n\n```yaml\nprovider.scheme = https\nprovider.host = localhost\nprovider.port = 5000\n```\n\nThen execute this command:\n\n```bash\ngunicorn --certfile cert.pem --keyfile key.pem -b 0.0.0.0:5000 -w 1 provider.run:app\n```\n\n## API documentation\n\nOnce you have your application running you can get access to the documentation at:\n\n```bash\nhttps://127.0.0.1:5000/api/v1/docs\n```\n\n(or `http` if you're using HTTP.)\n\nTip: if your browser shows the swagger header across the top but says \"Failed to load spec.\" then we found that, in Chrome, if we went to chrome://flags/#allow-insecure-localhost and toggled it to Enabled, then relaunched Chrome, it worked.\n\nIf you want to know more about the ontology of the metadata, you can find all the information in\n[OEP-8](https://github.com/oceanprotocol/OEPs/tree/master/8).\n\n## Configuration\n\nYou can pass the configuration using the CONFIG_FILE environment variable (recommended) or locating your configuration in oceandb.ini file.\n\nIn the configuration there are now three sections:\n\n- oceandb: Contains different values to connect with oceandb. You can find more information about how to use OceanDB [here](https://github.com/oceanprotocol/oceandb-driver-interface).\n- keeper-contracts: This section help you to connect with the network where you have deployed the contracts. You can find more information of how to configure [here](https://github.com/oceanprotocol/squid-py#quick-start).\n ```yaml\n [keeper-contracts]\n keeper.host=0.0.0.0\n keeper.port=8545\n #contracts.folder=venv/contracts\n market.address=0xbc0be3598a31715bac5235718f96bb242804e61e\n auth.address=0x6ba5f72e5399aa67db5b22ee791851937d4910f5\n token.address=0xfd83b273b395b1029c41bb32071500bf662e6a8a\n provider.address=\n ```\n- resources: This section have properties to connect with the different resourcer provideres. At the moment we are only using Azure but this is going to increase quickly.\n ```yaml\n [resources]\n azure.account.name=testocnfiles\n azure.account.key=k2Vk4yfb88WNlWW+W54a8ytJm8MYO1GW9IgiV7TNGKSdmKyVNXzyhiRZ3U1OHRotj/vTYdhJj+ho30HPyJpuYQ==\n azure.container=testfiles\n ```\n\n\n## Code style\n\nThe information about code style in python is documented in this two links [python-developer-guide](https://github.com/oceanprotocol/dev-ocean/blob/master/doc/development/python-developer-guide.md)\nand [python-style-guide](https://github.com/oceanprotocol/dev-ocean/blob/master/doc/development/python-style-guide.md).\n\n## Testing\n\nAutomatic tests are setup via Travis, executing `tox`.\nOur test use pytest framework.\n\n## New Version\n\nThe `bumpversion.sh` script helps to bump the project version. You can execute the script using as first argument {major|minor|patch} to bump accordingly the version.\n\n## License\n\n```\nCopyright 2018 Ocean Protocol Foundation Ltd.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/oceanprotocol/provider", "keywords": "ocean-provider", "license": "Apache Software License 2.0", "maintainer": "", "maintainer_email": "", "name": "ocean-provider", "package_url": "https://pypi.org/project/ocean-provider/", "platform": "", "project_url": "https://pypi.org/project/ocean-provider/", "project_urls": { "Homepage": "https://github.com/oceanprotocol/provider" }, "release_url": "https://pypi.org/project/ocean-provider/0.1.1/", "requires_dist": null, "requires_python": "", "summary": "\ud83d\udc33 Ocean Provider.", "version": "0.1.1" }, "last_serial": 4385837, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "d27932a1910cc95359854f8cd5bc2276", "sha256": "d9cc7213287bbc952c1f59a7db6078279c013b024af898dad4bd24abdbd0879a" }, "downloads": -1, "filename": "ocean_provider-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "d27932a1910cc95359854f8cd5bc2276", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 15181, "upload_time": "2018-08-17T07:36:38", "url": "https://files.pythonhosted.org/packages/bd/f6/1303496c1f3533d2d8e0683a80c3d695af721a2694057a5f6139de1edaf8/ocean_provider-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3d8003004046c4c65ab8b089690a7474", "sha256": "734d3583c36b839e9a223e7da06aa81dff15754793acd317e3b63d402ebfcede" }, "downloads": -1, "filename": "ocean-provider-0.1.0.tar.gz", "has_sig": false, "md5_digest": "3d8003004046c4c65ab8b089690a7474", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 101791, "upload_time": "2018-08-17T07:36:39", "url": "https://files.pythonhosted.org/packages/ac/e9/ce80017a10fc20a942409437078c1a241d4a46d38d42b9569748a4857b13/ocean-provider-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "e8178b0c14946e54d74c81d03a207c02", "sha256": "b1aba8119fad096ac60853db9ceadb600ef417aecd02af407cbf0b0b708bbb91" }, "downloads": -1, "filename": "ocean_provider-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e8178b0c14946e54d74c81d03a207c02", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 18695, "upload_time": "2018-10-17T10:45:41", "url": "https://files.pythonhosted.org/packages/00/14/bf84e806e1c8c2363bb2f27dfdab32f0e5f3f734942ca7919836655672b9/ocean_provider-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ccfef0316ceb74a15d849582768c3a04", "sha256": "939cbc43a60b9d843f2bec74314fb73ab20d94f01113bf39ce28b5f83755dd48" }, "downloads": -1, "filename": "ocean-provider-0.1.1.tar.gz", "has_sig": false, "md5_digest": "ccfef0316ceb74a15d849582768c3a04", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22805, "upload_time": "2018-10-17T10:45:43", "url": "https://files.pythonhosted.org/packages/50/62/e6913ab0e20d59c9384bf32217e96fc9b4377e4b99268c554e6bdfdc55d5/ocean-provider-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e8178b0c14946e54d74c81d03a207c02", "sha256": "b1aba8119fad096ac60853db9ceadb600ef417aecd02af407cbf0b0b708bbb91" }, "downloads": -1, "filename": "ocean_provider-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e8178b0c14946e54d74c81d03a207c02", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 18695, "upload_time": "2018-10-17T10:45:41", "url": "https://files.pythonhosted.org/packages/00/14/bf84e806e1c8c2363bb2f27dfdab32f0e5f3f734942ca7919836655672b9/ocean_provider-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ccfef0316ceb74a15d849582768c3a04", "sha256": "939cbc43a60b9d843f2bec74314fb73ab20d94f01113bf39ce28b5f83755dd48" }, "downloads": -1, "filename": "ocean-provider-0.1.1.tar.gz", "has_sig": false, "md5_digest": "ccfef0316ceb74a15d849582768c3a04", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 22805, "upload_time": "2018-10-17T10:45:43", "url": "https://files.pythonhosted.org/packages/50/62/e6913ab0e20d59c9384bf32217e96fc9b4377e4b99268c554e6bdfdc55d5/ocean-provider-0.1.1.tar.gz" } ] }