
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
This is tool for auto generating *.proto and mapping django model with protobuf.
Install using pip
pip install grpc-tls
Add 'grpc_tls' to your INSTALLED_APPS setting.
INSTALLED_APPS = (
...
'grpc_tls',
)
Update list apps your want migrate to protobuf:
GRPC_TLS_MODELS_APP=['core']
Update proto file name:
GRPC_TLS_BASE_PROTO='app_name'
.
Note: This name must be unique if your app run multiple *.proto file
Generate *.proto file
python manage.py grpc_tls
All files will be generated in grpc_dir/*
Let's take a look at a quick example of running gRPC server.
First generate proto files by running command line above.
Then create a django command line: run_grpc.py
.
import grpc
from concurrent import futures
from django.core.management.base import BaseCommand
from grpc_dir import auto_grpc_app, grpc_app_pb2_grpc
class Command(BaseCommand):
help = 'Start gRPC server'
def handle(self, *args, **options):
server = grpc.server(futures.ThreadPoolExecutor(
max_workers=10))
grpc_app_pb2_grpc.add_GRPCAPPServicer_to_server(
auto_grpc_app.AutoGRPC(), server)
server.add_insecure_port('[::]:50051')
server.start()
print('server started on port 50051 ...')
try:
while True:
pass
except KeyboardInterrupt:
server.stop(0)
Start gRPC server:
python manage.py run_grpc
You can now send request at http://127.0.0.1:50051/
DO NOT FILES IN grpc_dir
FAQs
This tools for generating grpc files
We found that grpc-tls demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.