ocean-keeper
Wraps keeper contracts and web3 functions.
How to
The main class is Keeper and all contracts are accessible directly from the keeper instance.
Each deployed contract has a python wrapper class exposing the main functions and validating
inputs. It is possible to access the Web3 Contract functions directly by using the contract_concise
attribute of the wrapper instance.
import os
from ocean_keeper import Keeper
from ocean_keeper.contract_handler import ContractHandler
from ocean_keeper.web3_provider import Web3Provider
from ocean_keeper.utils import get_account
# Init the web3 instance
Web3Provider.init_web3('http://localhost:8545') # Assume running with local parity node
# set the contract handler path to abi files
ContractHandler.set_artifacts_path(os.path.expanduser('~/.ocean/keeper-contracts/artifacts'))
# get keeper instance
keeper = Keeper.get_instance()
# Do stuff with keeper and it's contracts
account = get_account(0)
keeper.did_registry.register('0x10101010101010101010', '', 'http://localhost:5000/api/v1/assets', account)
Account can be specified using the following environment variables:
- PARITY_ADDRESS: the ethereum address
- PARITY_PASSWORD: the password to decrypt key in the
PARITY_ENCRYPTED_KEYorPARITY_KEYFILE - PARITY_KEY: the private key of this account (matches the
PARITY_ADDRESS), password is not required when this is specified - PARITY_ENCRYPTED_KEY: the encrypted key in a json str (same content of the
PARITY_KEYFILE) - PARITY_KEYFILE: path to the json file that has the encrypted key specified in json document
Note: The keys are loaded in this order: PARITY_KEY, PARITY_ENCRYPTED_KEY, PARITY_KEYFILE. If PARITY_KEY is
specified the password and other environment variables are ignored.
For more details refer to the keeper-contracts repo at https://github.com/oceanprotocol/keeper-contracts
Metadata
Release files for ocean-keeper 0.3.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ocean-keeper-0.3.5.tar.gz | 70.0 kB | Without provenance | Details for ocean-keeper-0.3.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ocean_keeper-0.3.5-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for ocean_keeper-0.3.5-py2.py3-none-any.whl |
Total release size: 116.9 kB
Release files / ocean-keeper-0.3.5.tar.gz
| Download URL | ocean-keeper-0.3.5.tar.gz |
|---|---|
| Size | 70.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e948ca7a1ec3e0244a188dfa895c5c296501485e1b04b0348d32a816d96bbf8
|
|
BLAKE2b-256 checksum How to use checksums |
7d3330e5a516309fe8049b5fc85d57da0a3a57ec346fe794f695551c4c8258e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.7
|
Release files / ocean_keeper-0.3.5-py2.py3-none-any.whl
| Download URL | ocean_keeper-0.3.5-py2.py3-none-any.whl |
|---|---|
| Size | 46.9 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
a2221bda2cff6a737949f875ee395f513c668b6ba1f9a8475b5e178bb55bcf46
|
|
BLAKE2b-256 checksum How to use checksums |
f709f63038606650cb1fd24a36dd1dc14bddd387455129693c942bf0c3b89d9f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.7
|
Security for ocean-keeper 0.3.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.