Python Forum
trying to locate a working grpc to install
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
trying to locate a working grpc to install
#6
Quick test,homepage
Doing it in virtual environment,it's now build into Python newer versions as you use 3.7.
E:\div_code
λ python -m venv grpv_env

E:\div_code
λ cd grpv_env\

E:\div_code\grpv_env
λ E:\div_code\grpv_env\Scripts\activate

# Install into environment
(grpv_env) E:\div_code\grpv_env
λ pip install grpcio
Collecting grpcio
  Downloading .....
Installing collected packages: six, grpcio
Successfully installed grpcio-1.20.1 six-1.12.0

(grpv_env) E:\div_code\grpv_env
λ pip install ptpython
Collecting ptpython ....
  Installing collected packages: parso, jedi, docopt, pygments, wcwidth, prompt-toolkit, ptpython
Successfully installed docopt-0.6.2 jedi-0.13.3 parso-0.4.0 prompt-toolkit-2.0.9 ptpython-2.0.4 pygments-2.4.0 wcwidth-0.1.7
I also install ptpython into environment,this make a lot easier to explore a package that not has so much Python documentation.
(grpv_env) E:\div_code\grpv_env
λ ptpython
>>> import grpc

>>> grpc.__version__
'1.20.1'
So there is a lot of method under grpc eg grpc.Call ect...
As i using ptpython all methods is showing up automatically after grpc.,with doc string.
There is a lot method if list all without special methods(__something__).
Output:
>>> [i for i in dir(grpc) if not i.startswith('__')] ['AuthMetadataContext', 'AuthMetadataPlugin', 'AuthMetadataPluginCallback', 'Call', 'CallCredentials', 'Channel', 'ChannelConnectivity', 'ChannelCredentials', 'ClientCallDetails', 'Future', 'FutureCancelledError', 'FutureTimeoutError', 'GenericRpcHandler', 'HandlerCallDetails', 'RpcContext', 'RpcError', 'RpcMethodHandler', 'Server', 'ServerCertificateConfiguration', 'ServerCredentials', 'ServerInterceptor', 'ServiceRpcHandler', 'ServicerContext', 'Status', 'StatusCode', 'StreamStreamClientInterceptor', 'StreamStreamMultiCallable', 'StreamUnaryClientInterceptor', 'StreamUnaryMultiCallable', 'UnaryStreamClientInterceptor', 'UnaryStreamMultiCallable', 'UnaryUnaryClientInterceptor', 'UnaryUnaryMultiCallable', '_create_servicer_context', '_cygrpc', '_cython', '_grpcio_metadata', 'abc', 'access_token_call_credentials', 'channel_ready_future', 'composite_call_credentials', 'composite_channel_credentials', 'contextlib', 'dynamic_ssl_server_credentials', 'enum', 'insecure_channel', 'intercept_channel', 'logging', 'metadata_call_credentials', 'method_handlers_generic_handler', 'secure_channel', 'server', 'six', 'ssl_channel_credentials', 'ssl_server_certificate_configuration', 'ssl_server_credentials', 'stream_stream_rpc_method_handler', 'stream_unary_rpc_method_handler', 'sys', 'unary_stream_rpc_method_handler', 'unary_unary_rpc_method_handler']
Version pip show:
(grpv_env) E:\div_code\grpv_env
λ pip show grpcio
Name: grpcio
Version: 1.20.1
Summary: HTTP/2-based RPC framework
Home-page: https://grpc.io
Author: The gRPC Authors
Author-email: [email protected]
License: Apache License 2.0
Location: e:\div_code\grpv_env\lib\site-packages
Requires: six
Required-by:
Looking at doc there is also pip install grpcio-tools
With a hello world example after clone from Repo.
So can do a test of that:
(grpv_env) E:\div_code\grpv_env
λ pip install grpcio-tools
Collecting grpcio-tools
  Downloading .....      
Installing collected packages: protobuf, grpcio-tools
Successfully installed grpcio-tools-1.20.1 protobuf-3.7.1

(grpv_env) E:\div_code\grpv_env
λ git clone -b v1.20.0 https://github.com/grpc/grpc
Cloning into 'grpc'...
Checking out files: 100% (10008/10008), done.
Test server --> client.
(grpv_env) E:\div_code\grpv_env\grpc\examples\python\helloworld ((no branch))
λ python greeter_server.py
Now in a other cmder window.
(grpv_env) E:\div_code\grpv_env\grpc\examples\python\helloworld ((no branch))
λ python greeter_client.py
Greeter client received: Hello, you!
Reply


Messages In This Thread
RE: trying to locate a working grpc to install - by snippsat - May-09-2019, 06:20 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  My minoconda3 install is not working. Led_Zeppelin 1 1,524 Jan-26-2022, 09:49 PM
Last Post: snippsat
  install.bat pymem not working? ChickenNugget 1 1,864 Oct-31-2021, 02:04 PM
Last Post: snippsat
  How do I locate setup.py in my computer, or install the file? JaneTan 1 1,779 Aug-26-2021, 08:37 AM
Last Post: snippsat
Photo i want to locate an image according to the mouse position rachidel07 1 2,871 Feb-08-2021, 03:29 PM
Last Post: michael1789
  Pip install for mysqlclient not working burvil 4 50,846 Feb-04-2021, 08:16 PM
Last Post: nilamo
  Locate QR code on a page Pedroski55 0 1,384 Jan-21-2021, 07:11 AM
Last Post: Pedroski55
  TA-Lib pip install not working Mac (Fix Found) DrinkinBeer 3 7,998 Jan-15-2021, 03:04 AM
Last Post: DrinkinBeer
Photo Locate Noise floor level for a spectral data in Python Ranjan_Pal 1 3,104 Dec-19-2020, 10:04 AM
Last Post: Larz60+
  How to Locate an Attribute's Parent Object? calvinsomething 5 3,042 Nov-13-2020, 01:52 AM
Last Post: calvinsomething
  Locate user input in a string. MjBaca 3 3,254 Apr-23-2018, 06:55 AM
Last Post: Gribouillis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020