Skip to main content

Incubed client and provider for web3. Based on in3-c runtime.

Project description

Python Incubed client

coverage badge

This library is based on the C version of Incubed, which limits the compatibility for Cython, so please contribute by compiling it to your own platform and sending us a pull-request!

Go to our readthedocs page for more.

Quickstart

Install with pip

pip install in3

In3 Client API

import in3

in3_client = in3.Client()
# Sends a request to the Incubed Network, that in turn will collect proofs from the Ethereum client,
# attest and sign the response, then send back to the client, that will verify signatures and proofs.
block_number = in3_client.eth.block_number()
print(block_number) # Mainnet's block number

in3_client  # incubed network api
in3_client.eth  # ethereum api
in3_client.eth.account  # ethereum account api
in3_client.eth.contract  # ethereum smart-contract api

Developing & Tests

Install dev dependencies, IDEs should automatically recognize interpreter if done like this.

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

Compile local libraries and run tests. Make sure you have cmake installed.

./buidl_libs.sh
coverage run -m pytest --pylama && coverage report && coverage-badge -fo docs/coverage.svg

Index

Explanation of this source code architecture and how it is organized. For more on design-patterns see here or on Martin Fowler's Catalog of Patterns of Enterprise Application Architecture.

  • in3.init.py: Library entry point, imports organization. Standard for any pipy package.
  • in3.client: Incubed Client and API.
  • in3.model: MVC Model classes for the Incubed client module domain.
  • in3.transport: HTTP Transport function and error handling.
  • in3.wallet: WiP - Wallet API.
  • in3.exception: Custom exceptions.
  • in3.eth: Ethereum module.
  • in3.eth.api: Ethereum API.
  • in3.eth.account: Ethereum accounts.
  • in3.eth.contract: Ethereum smart-contracts API.
  • in3.eth.model: MVC Model classes for the Ethereum client module domain. Manages serialization.
  • in3.eth.factory: Ethereum Object Factory. Manages deserialization.
  • in3.libin3: Module for the libin3 runtime. Libin3 is written in C and can be found here.
  • in3.libin3.shared: Native shared libraries for multiple operating systems and platforms.
  • in3.libin3.enum: Enumerations mapping C definitions to python.
  • in3.libin3.lib_loader: Bindings using Ctypes.
  • in3.libin3.runtime: Runtime object, bridging the remote procedure calls to the libin3 instances.

Project details


Download files

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

Source Distribution

in3-3.3.3.tar.gz (8.6 MB view details)

Uploaded Source

File details

Details for the file in3-3.3.3.tar.gz.

File metadata

  • Download URL: in3-3.3.3.tar.gz
  • Upload date:
  • Size: 8.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.7.3

File hashes

Hashes for in3-3.3.3.tar.gz
Algorithm Hash digest
SHA256 eca3f2b2d7e748db527e789c13c5e019e14b7992a9a998041862460003dfffde
MD5 ebf9c6c5b6852c7d655e7f3bb45cff3c
BLAKE2b-256 9cafc7d8c8ce18974756f7ac8ed0ddc59a6dd111e1150df74e3af87a9edd29a0

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