gRPC Client library to interact with Elastos Smartweb Service
Project description
Python-gRPC-client
This repository contains the python client library to interact with Elastos Smart Web Service.
Prerequisites
First, install Python3:
brew install python3 // On Mac
sudo apt-get install python3 // On Ubuntu
Normally, pip comes with python3 if you're downloading the latest version (or any version above 3.4). If that is not the case, install pip by running the following:
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
python3 get-pip.py
Install virtualenv:
pip3 install virtualenv
Instructions on how to run from official pypi
Setup virtualenv:
virtualenv -p `which python3` venv;
source venv/bin/activate;
Install dependencies:
pip3 install -r requirements.txt;
Setup environment variables and update variables if needed:
cp .env.example .env;
Install elastos-adenine via pip:
pip3 install elastos-adenine==0.1.9
Run sample.py
python3 sample.py
Instructions on how to build and run locally
Clone the repository
git clone https://github.com/cyber-republic/python-grpc-adenine.git
cd python-grpc-adenine
Setup virtualenv:
virtualenv -p `which python3` venv;
source venv/bin/activate;
Install dependencies:
pip3 install -r requirements.txt;
Setup environment variables and update variables if needed:
cp .env.example .env;
Run sample.py:
python3 sample.py
How to package up the client library
Setup virtualenv:
virtualenv -p `which python3` venv;
source venv/bin/activate;
Install dependencies:
pip3 install -r requirements.txt;
Update setup.py if needed(eg. version number should be modified each time it's pushed to the pypi repo) and get the package ready
rm -rf dist/*;
python3 setup.py sdist bdist_wheel
Push to pypi repo:
- For testing purposes, do the following:
python3 -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
- For production, do the following:
python3 -m twine upload dist/*
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
Built Distribution
Hashes for elastos_adenine-1.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 22fd4d1e44c39ce01073eb1ca46ccb63f3db56cb35f998dcd8775d5fd4e7a107 |
|
MD5 | 213e9e54ee57cec6cdde086e82cd346f |
|
BLAKE2b-256 | 1a9f3821400f8fba302188d3681f0361cbd9b56dd2b4444c6ee45d8dc4764e06 |