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;
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/*
Unit Testing
Requires pytest version 5.3.5. Included as part of requirements.txt
If pytest is not installed. Run the following command:
pip install pytest==5.4.1
To run the pytest:
./test.sh
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
File details
Details for the file elastos_adenine-2.0.3.tar.gz
.
File metadata
- Download URL: elastos_adenine-2.0.3.tar.gz
- Upload date:
- Size: 13.7 kB
- Tags: Source
- Uploaded using 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.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
1e439b28faf6f19a76d9020516983652019dfca9688dd2f07802145eec173b54
|
|
MD5 |
d1b9569626ff540e82480efb854acf5d
|
|
BLAKE2b-256 |
cbbac5eff2867465d55ebbe6dda25be4685c1743cd5ceff6d421462bf7ae8b8f
|
File details
Details for the file elastos_adenine-2.0.3-py3-none-any.whl
.
File metadata
- Download URL: elastos_adenine-2.0.3-py3-none-any.whl
- Upload date:
- Size: 29.2 kB
- Tags: Python 3
- Uploaded using 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.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
895de2fc7b6ad6554d32f3bc98f502ebe774073ab1681c70e3c8bf0c757ce366
|
|
MD5 |
e48edd7f5d95aa505f11c1f2decc9dcb
|
|
BLAKE2b-256 |
dd5fe978b49e3882e9e37da8f0e213cf87f1b61b5ed602f63c4f7c3166d4cd18
|