Skip to main content

Web3.py

Project description

Join the chat at https://gitter.im/pipermerriam/web3.py

Build Status

A Python implementation of web3.js

  • Python 2.7, 3.4, 3.5 support

Read more in the documentation on ReadTheDocs. View the change log on Github.

Developer setup

If you would like to hack on web3.py, set up your dev environment with:

sudo apt-get install libssl-dev
# ^ This is for Debian-like systems. TODO: Add more platforms

git clone git@github.com:pipermerriam/web3.py.git
cd web3.py
virtualenv venv
. venv/bin/activate
pip install -r requirements-dev.txt
pip install -e .

For different environments, you can set up multiple virtualenvs, like:

Python 2

virtualenv -p python2 venvpy2
. venvpy2/bin/activate
pip install -r requirements-dev.txt
pip install -e .

Docs

virtualenv venvdocs
. venvdocs/bin/activate
pip install -r requirements-dev.txt
pip install -e .

Testing Setup

During development, you might like to have tests run on every file save.

Show flake8 errors on file change:

# Test flake8
when-changed -r web3/ tests/ -c "clear; git diff HEAD^ | flake8 --diff"

You can use pytest-watch, running one for every python environment:

pip install pytest-watch

cd venv
ptw --onfail "notify-send -t 5000 'Test failure ⚠⚠⚠⚠⚠' 'python 3 test on web3.py failed'" ../tests ../web3

#in a new console
cd venvpy2
ptw --onfail "notify-send -t 5000 'Test failure ⚠⚠⚠⚠⚠' 'python 2 test on web3.py failed'" ../tests ../web3

Or, you can run multi-process tests in one command, but without color:

# in the project root:
py.test --numprocesses=4 --looponfail --maxfail=1
# the same thing, succinctly:
pytest -n 4 -f --maxfail=1

Release setup

For Debian-like systems:

apt install pandoc

To release a new version:

bumpversion $$VERSION_PART_TO_BUMP$$
git push && git push --tags
make release

How to bumpversion

The version format for this repo is {major}.{minor}.{patch} for stable, and {major}.{minor}.{patch}-{stage}.{devnum} for unstable (stage can be alpha or beta).

To issue the next version in line, use bumpversion and specify which part to bump, like bumpversion minor or bumpversion devnum.

If you are in a beta version, bumpversion stage will switch to a stable.

To issue an unstable version when the current version is stable, specify the new version explicitly, like bumpversion --new-version 4.0.0-alpha.1 devnum

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

web3-3.16.3.tar.gz (53.0 kB view details)

Uploaded Source

Built Distribution

web3-3.16.3-py3-none-any.whl (73.1 kB view details)

Uploaded Python 3

File details

Details for the file web3-3.16.3.tar.gz.

File metadata

  • Download URL: web3-3.16.3.tar.gz
  • Upload date:
  • Size: 53.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for web3-3.16.3.tar.gz
Algorithm Hash digest
SHA256 b6209d557cd5501d9fbbc895d06ec8d26a92c053c32c5127a6abcbac996d24fe
MD5 134ea02a57ef52594ef06893890a8d0d
BLAKE2b-256 ff909a7a32144a564a26e1647f8000b8b5563797e8239264451f60adc62b57c4

See more details on using hashes here.

File details

Details for the file web3-3.16.3-py3-none-any.whl.

File metadata

File hashes

Hashes for web3-3.16.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1dc4536cf7c4bb37777ea26ed3b6b7c5bd25e2fb7225d8ecbaa3aa3612aee141
MD5 7e34069df25192a56b8f1ea719896b65
BLAKE2b-256 11a45862e2117e744edd868dca4bfc8d28fbf2bef7591d231236817ef0637f4d

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